aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc
Commit message (Collapse)AuthorAgeFilesLines
...
| * igc: Remove dead code related to flower filterAndre Guedes2020-04-172-4/+0
| | | | | | | | | | | | | | | | | | IGC driver has no support for tc-flower filters so this patch removes some leftover code, probably copied from IGB driver by mistake. Signed-off-by: Andre Guedes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Fix NFC queue redirection supportAndre Guedes2020-04-172-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for ethtool Network Flow Classification (NFC) queue redirection based on destination MAC address is currently broken in IGC. For instance, if we add the following rule, matching frames aren't enqueued on the expected rx queue. $ ethtool -N IFNAME flow-type ether dst 3c:fd:fe:9e:7f:71 queue 2 The issue here is due to the fact that igc_rar_set_index() is missing code to enable the queue selection feature from Receive Address High (RAH) register. This patch adds the missing code and fixes the issue. Signed-off-by: Andre Guedes <[email protected]> Acked-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Remove copper fiber switch controlSasha Neftin2020-04-172-11/+0
| | | | | | | | | | | | | | | | | | | | i225 device support copper mode only PHY signal detect indication for copper fiber switch not applicable to i225 part Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Enable NETIF_F_HW_TC flagSasha Neftin2020-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This assignment of the feature NETIF_F_HW_TC occurs prior to the initial setup of the local hw_features variable. This ensures that NETIF_F_HW_TC are marked as user changeable, and also enables it by default when the driver loads. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Fix double definitionSasha Neftin2020-04-171-3/+1
| | | | | | | | | | | | | | | | | | IGC_START_ITR has beed defined twice This patch come to fix it Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Fix overwrites when dumping registersAndre Guedes2020-04-171-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes some register overwriting when dumping registers via ethtool. We have a total of 16 RAL registers, starting at offset 139. So RAH offset should be 139 + 16 = 155, not 145. As result some RAL registers are overwritten. Likewise, RAH registers are also overwritten by TDBAL, TDBAH, TDLEN, and TDH registers. To fix this bug while preserving the ABI, this patch re-writes RAL and RAH registers at the end of 'regs_buff' and bumps regs->version. It also removes some pointless comments in the middle of igc_set_regs(). Signed-off-by: Andre Guedes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * 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: Remove unused CTRL_EXT_LINK_MODE_MASKSasha Neftin2020-04-171-3/+0
| | | | | | | | | | | | | | | | | | We support only copper mode Not applicable for i225 parts Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Remove unused MDIC_DEST maskSasha Neftin2020-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | Formally Destination bit should be kept reserved to support legacy drivers and ignore on write/read operation Not applicable for i225 parts Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
| * igc: Add support for ETF offloadingVinicius Costa Gomes2020-04-173-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for ETF offloading for the i225 controller. For i225, the LaunchTime feature is almost a subset of the Qbv feature. The main change from the i210 is that the launchtime of each packet is specified as an offset applied to the BASET register. BASET is automatically incremented each cycle. For i225, the approach chosen is to re-use most of the setup used for taprio offloading. With a few changes: - The more or less obvious one is that when ETF is enabled, we should set add the expected launchtime to the (advanced) transmit descriptor; - The less obvious, is that when taprio offloading is not enabled, we add a dummy schedule (all queues are open all the time, with a cycle time of 1 second). 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]>
| * igc: Add support for taprio offloadingVinicius Costa Gomes2020-04-177-1/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * igc: Add GSO partial supportSasha Neftin2020-04-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Partial generic segmentation offload is a hybrid between TSO and GSO. What is effectively does is take advantage of certain traits of TCP and tunnels so that instead of having to rewrite the packet headers for each segment only in the inner-most transport header and possible the outer-most network header need to be updated. This allows devices that do not support tunnel offload or tunnels offloads with checksum to still make use of segmentation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* | PM: sleep: core: Rename DPM_FLAG_NEVER_SKIPRafael J. Wysocki2020-04-241-1/+1
|/ | | | | | | | | | | | | | | Rename DPM_FLAG_NEVER_SKIP to DPM_FLAG_NO_DIRECT_COMPLETE which matches its purpose more closely. No functional impact. Suggested-by: Alan Stern <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> # for PCI parts Acked-by: Jeff Kirsher <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Acked-by: Alex Deucher <[email protected]>
* net: igc: let core reject the unsupported coalescing parametersJakub Kicinski2020-03-121-21/+1
| | | | | | | | | | | | | | | Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters. This driver was rejecting almost all unsupported parameters already, it was only missing a check for tx_max_coalesced_frames_irq. As a side effect of these changes the error code for unsupported params changes from ENOTSUPP to EOPNOTSUPP. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[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-204-0/+75
| | | | | | | | 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: Add pcie error handler supportSasha Neftin2020-02-201-0/+103
| | | | | | | | Add pcie error detection, slot reset and resume capability 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-203-1/+4
| | | | | | | | | | | | | 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-196-1/+338
| | | | | | | | | 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: Complete to commit Add legacy power management supportSasha Neftin2020-02-191-0/+27
| | | | | | | | | | commit 9513d2a5dc7f ("igc: Add legacy power management support") Add power management resume and schedule suspend requests. Add power management get and put synchronization. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: make non-global functions staticChen Zhou2020-02-191-2/+2
| | | | | | | | | | | | | Fix sparse warning: drivers/net/ethernet/intel/igc/igc_ptp.c:512:6: warning: symbol 'igc_ptp_tx_work' was not declared. Should it be static? drivers/net/ethernet/intel/igc/igc_ptp.c:644:6: warning: symbol 'igc_ptp_suspend' was not declared. Should it be static? Reported-by: Hulk Robot <[email protected]> Signed-off-by: Chen Zhou <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add PHY power management controlSasha Neftin2020-01-173-1/+17
| | | | | | | | | | PHY power management control should provide a reliable and accurate indication of PHY reset completion and decrease the delay time after a PHY reset Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add support for TSOSasha Neftin2020-01-172-1/+116
| | | | | | | | | | | TCP segmentation offload allows a device to segment a single frame into multiple frames with a data payload size specified in socket buffer. As a result we can now send data approximately up to seven percents fast than was previously possible on my system. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add SKU for i225 deviceSasha Neftin2020-01-173-0/+3
| | | | | | | | Add support for blank NVM SKU Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove unused definitionSasha Neftin2020-01-171-2/+0
| | | | | | | | Remove the unused IGC_FUNC_0 definition and make the code cleaner Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Fix typo in a commentSasha Neftin2020-01-171-1/+1
| | | | | | | | Fix typo in a context descriptor comment Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Use Start of Packet signal from PHY for timestampingVinicius Costa Gomes2020-01-062-1/+6
| | | | | | | | | For better accuracy, i225 is able to do timestamping using the Start of Packet signal from the PHY. 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 ethtool GET_TS_INFO commandVinicius Costa Gomes2020-01-061-0/+34
| | | | | | | | | | This command allows igc to report what types of timestamping are supported. ptp4l uses this to detect if the hardware supports timestamping. 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 TX timestampingVinicius Costa Gomes2020-01-064-0/+158
| | | | | | | | | | | | | 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-065-0/+340
| | | | | | | | | | | | | | | 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-066-1/+439
| | | | | | | | | 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: Remove no need declaration of the igc_sw_initSasha Neftin2020-01-051-743/+740
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_sw_init function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_write_itrSasha Neftin2020-01-051-17/+16
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_write_itr function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_assign_vectorSasha Neftin2020-01-051-62/+61
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_assign_vector function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_free_q_vectorSasha Neftin2020-01-051-21/+20
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_free_q_vector function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_free_q_vectorsSasha Neftin2020-01-051-14/+13
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_free_q_vectors function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_irq_disableSasha Neftin2020-01-051-34/+33
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_disable function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_irq_enableSasha Neftin2020-01-051-24/+23
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_enable function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_configure_msixSasha Neftin2020-01-051-45/+44
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_configure_msix function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_set_rx_modeSasha Neftin2020-01-051-177/+176
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_set_rx_mode function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_set_interrupt_capabilitySasha Neftin2020-01-051-72/+70
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_set_interrupt_capability function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_alloc_mapped_pageSasha Neftin2020-01-051-48/+46
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_alloc_mapped_page function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_configureSasha Neftin2020-01-051-46/+45
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_configure function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_set_default_mac_filterSasha Neftin2020-01-051-46/+45
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_set_default_mac_filter function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_power_down_linkSasha Neftin2020-01-051-11/+10
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_power_down_link function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove no need declaration of the igc_clean_tx_ringSasha Neftin2020-01-051-38/+37
| | | | | | | | | We want to avoid forward-declarations of function if possible. Rearrange the igc_clean_tx_ring function implementation. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Remove serdes comments from a description of methodsSasha Neftin2019-12-311-2/+2
| | | | | | | | | Serdes interface is not applicable for i225 devices. Remove this from comments and make comments more clearly. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
* igc: Add legacy power management supportSasha Neftin2019-12-314-0/+246
| | | | | | | | | | 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]>