aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc.h
Commit message (Collapse)AuthorAgeFilesLines
...
* igc: Remove forward declarationSasha Neftin2020-04-171-197/+194
| | | | | | | | | | Move igc_adapter and igc_ring structures up to avoid forward declaration It is not necessary to forward declare these structures Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for taprio offloadingVinicius Costa Gomes2020-04-171-0/+7
| | | | | | | | | | | | | | | | | Adds support for translating taprio schedules into i225 cycles. This will allow schedules to run in the hardware, making the schedules enforcement more precise and saving CPU time. Right now, the only simple schedules are allowed, complex schedules are rejected. "simple" in this context are schedules that each HW queue is opened and closed only once in each cycle. Changing schedules is still not supported as well. Signed-off-by: Vinicius Costa Gomes <[email protected]> Reviewed-by: Andre Guedes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* intel: Replace zero-length array with flexible-array memberGustavo A. R. Silva2020-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
* igc: Add commentSasha Neftin2020-02-201-0/+2
| | | | | | | | | Separate interrupt and flag definitions. Made the code clear. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add WOL supportSasha Neftin2020-02-201-0/+1
| | | | | | | | This patch adds a define and WOL support for an i225 parts. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Complete to commit Add basic skeleton for PTPSasha Neftin2020-02-201-0/+1
| | | | | | | | | | | | | commit 5f2958052c58 ("igc: Add basic skeleton for PTP") added basic support for PTP, what's missing is support for suspending. Legacy power management has been added. Now we can add the suspend method to the igc_shutdown. By cleaning the runtime storage for timestamp this avoids a possible invalid memory access when the system comes back from suspend state. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Fix the typo in commentSasha Neftin2020-02-201-1/+1
| | | | | | | | Fix the typo and comment to correspond to the i225 device Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add dump optionsSasha Neftin2020-02-191-0/+4
| | | | | | | | | Placeholder for debugging functionality. In this patch, we add some registers and rings summary dumps. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for TX timestampingVinicius Costa Gomes2020-01-061-0/+2
| | | | | | | | | | | | | This adds support for timestamping packets being transmitted. Based on the code from i210. The basic differences is that i225 has 4 registers to store the transmit timestamps (i210 has one). Right now, we only support retrieving from one register, support for using the other registers will be added later. Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for RX timestampingVinicius Costa Gomes2020-01-061-0/+17
| | | | | | | | | | | | | | | This adds support for timestamping received packets. It is based on the i210, as many features of i225 work the same way. The main difference from i210 is that i225 has support for choosing the timer register to use when timestamping packets. Right now, we only support using timer 0. The other difference is that i225 stores two timestamps in the receive descriptor, right now, we only retrieve one. Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add basic skeleton for PTPVinicius Costa Gomes2020-01-061-0/+26
| | | | | | | | | This allows the creation of the /dev/ptpX device for i225, and reading and writing the time. Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add legacy power management supportSasha Neftin2019-12-311-0/+2
| | | | | | | | | | Add suspend, resume, runtime_suspend, runtime_resume and runtime_idle callbacks implementation. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Clean up unused shadow_vfta pointerSasha Neftin2019-10-211-1/+0
| | | | | | | | | VLAN filter table array not implemented yet and shadow_vfta pointer not used. Clean up the code and remove the unused shadow_vfta pointer. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add tx_csum offload functionalitySasha Neftin2019-09-091-0/+4
| | | | | | | | Add IP generic TX checksum offload functionality. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for statisticsSasha Neftin2019-03-191-0/+4
| | | | | | | | Add support for statistics and show basic counters. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Extend the ethtool supportingSasha Neftin2019-03-191-3/+52
| | | | | | | | | | Add show and configure network flow classification (NFC) methods to the ethtool. Show the specifies Rx ntuple filters. Configures receive network flow classification option or rules. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add multiple receive queues control supportingSasha Neftin2019-03-191-0/+9
| | | | | | | | | | | | | Enable the multi queues to receive. Program the direction of packets to specified queues according to the mode selected in the MRQC register. Multiple receive queues defined by filters and RSS for 4 queues. Enable/disable RSS hashing and also to enable multiple receive queues. This patch will allow further ethtool support development. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add ethtool supportSasha Neftin2019-02-061-2/+32
| | | | | | | | | This patch adds basic ethtool support to the device to allow for configuration. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove obsolete IGC_ERR defineSasha Neftin2018-11-211-2/+0
| | | | | | | | | | Address community comment. Remove obsolete IGC_ERR define and use dev_err method. Suggested by Joe Perches. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Clean up codeSasha Neftin2018-11-071-9/+0
| | | | | | | | | | Address few community comments. Remove unused code, will be added per demand. Remove blank lines and unneeded includes. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add watchdogSasha Neftin2018-10-171-0/+12
| | | | | | | | | Code completion, remove obsolete code Add watchdog methods Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add setup link functionalitySasha Neftin2018-10-171-0/+1
| | | | | | | | | | Add link establishment methods Add auto negotiation methods Add read MAC address method Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add code for PHY supportSasha Neftin2018-10-171-0/+16
| | | | | | | | | | | Add PHY's ID support Add support for initialization, acquire and release of PHY Enable register access Signed-off-by: Sasha Neftin <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add NVM supportSasha Neftin2018-10-171-0/+6
| | | | | | | | | | Add code for NVM support and get MAC address, complete probe method. Signed-off-by: Sasha Neftin <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add transmit and receive fastpath and interrupt handlersSasha Neftin2018-10-171-0/+66
| | | | | | | | | | | | | | This patch adds support for allocating, configuring, and freeing Tx/Rx ring resources. With these changes in place the descriptor queues are in a state where they are ready to transmit or receive if provided buffers. This also adds the transmit and receive fastpath and interrupt handlers. With this code in place the network device is now able to send and receive frames over the network interface using a single queue. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for Tx/Rx ringsSasha Neftin2018-10-171-0/+125
| | | | | | | | | This change adds the defines and structures necessary to support both Tx and Rx descriptor rings. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add interrupt supportSasha Neftin2018-10-171-0/+127
| | | | | | | | This patch set adds interrupt support for the igc interfaces. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add netdevSasha Neftin2018-10-171-0/+48
| | | | | | | | | Now that we have the ability to configure the basic settings on the device we can start allocating and configuring a netdev for the interface. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for PFSasha Neftin2018-10-171-0/+13
| | | | | | | | | | | | This patch adds the basic defines and structures needed by the PF for operation. With this it is possible to bring up the interface, but without being able to configure any of the filters on the interface itself. Add skeleton for a function pointers. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller supportSasha Neftin2018-10-171-0/+29
This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>