aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-06i40e: increase ARQ sizeMitch Williams1-1/+1
The ARQ needs to have at least as many entries as VFs, or the VFs will get errors from the FW when they send messages to the PF. Since we don't know how many VFs we'll end up with, just set up 128 descriptors. Change-ID: I04ae3d1c7faf09110eb782214e9c05aeb62a6c59 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-18i40e: Modify Tx disable wait flow in case of DCB reconfigurationNeerav Parikh1-0/+1
When DCB TC configuration changes the firmware suspends the port's Tx. Now, as DCB TCs may have changed the PF driver tries to reconfigure the TC configuration of the VSIs it manages. As part of this process it disables the VSI queues but the Tx queue disable will not complete as the port's Tx has been suspended. So, waiting for Tx queues to go to disable state in this flow may lead to detection of Tx queue disable timeout errors. Hence, this patch adds a new PF state so that if a port's Tx is in suspended state the Tx queue disable flow would just put the request for the queue to be disabled and return without waiting for the queue to be actually disabled. Once the VSI(s) TC reconfiguration has been done and driver has called firmware AQC "Resume PF Traffic" the driver checks the Tx queues requested to be disabled are actually disabled before re-enabling them again. Change-ID: If3e03ce4813a4e342dbd5a1eb1d2861e952b7544 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-11i40e: don't do link_status or stats collection on every ARQShannon Nelson1-1/+2
The ARQ events cause a service_task execution, and we do a link_status check and full stats gathering for each service_task. However, when there are a lot of ARQ events, such as when doing an NVM update, we end up doing 10's if not 100's of these per second, thereby heavily abusing the PCI bus and especially the Firmware. This patch adds a check to keep the service_task from running these periodic tasks more than once per second, while still allowing quick action to service the events. Change-ID: Iec7670c37bfae9791c43fec26df48aea7f70b33e Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Patrick Lu <patrick.lu@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-09-04i40e: Fix an issue when PF reset failsAnjali Singhai Jain1-0/+1
We shouldn't restart Admin queue subtask if PF reset fails since we do not have the AQ setup at that point. This patch makes sure we disable AQ clean subtask when PF reset fails. This will resolve an occasional kernel panic when PF reset fails for some reason. Change-ID: I11a747773362a8c5c0ad7a10cd34be0bda8eb9e8 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-27i40e/i40evf: Ignore a driver perceived Tx hang if the number of desc pending < 4Anjali Singhai Jain1-0/+1
We are seeing situations where the driver sees a hang with less than 4 desc pending, if the driver chooses to ignore it the queue progresses forward and the stack never experiences a real hang. With this patch we will log a stat when this situation happens "tx_sluggish" will increment and we can see some more details at a higher debug level. Other than that we will ignore this particular case of Tx hang. Change-ID: I7d1d1666d990e2b12f4f6bed0d17d22e1b6410d5 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-27i40e: Add a FD flush counter to ethtoolAnjali Singhai Jain1-0/+1
This helps know how many times the interface had to flush and replay FD filter table, which gives an indication on how often we are getting FD table full situation. Also check on certain pf states before proceeding to add or delete filters since we can't add or delete filters if we are in those states. Change-ID: I97f5bbbea7146833ea61af0e08ea794fccba1780 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-26i40e: ATR policy change to flush the table to clean stale ATR rulesAnjali Singhai Jain1-0/+6
Instead of disabling ATR when we get a programming error, we now will wait it out to see if some room gets created by ATR rule deletion. If we still have too many errors and ATR filter count did not change much, its time to flush and replay. We no more auto-disable ATR when we have errors in programming. The disabling of ATR when we get programming error was buggy and was still adding new rules and causing continuous errors. With this policy change we flush instead when we see too many errors. ATR is still disabled if we add a SB rule for TCP/IPv4 flow type, more logic is added to re-enable it once all SB TCP/IPv4 rules are gone. Change-ID: I77edcbeab9500c72a7e0bd7b5c5b113ced133a9c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-02i40e: Adds FCoE related code to i40e core driverVasu Dev1-0/+62
Adds FCoE specific code to existing i40e core driver to:- 1. have separate FCoE VSI with additional FCoE queues pairs. 2. have FCoE related hash defines. 3. have additional FCoE related stats code. 4. export and then re-use existing functions required by FCoE build. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-16i40e: fix race conditions on queuing skb for HW time stampJakub Kicinski1-0/+1
i40e has a single set of TX time stamping resources per NIC. Use a simple bit lock to avoid race conditions and leaking skbs when multiple TX rings try to claim time stamping. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Tested-By: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-07-16i40e: Add ndo_get_phys_port_id() callback supportNeerav Parikh1-0/+1
This patch adds a new API to get the port mac address from firmware. It also adds support to the ndo_get_phys_port_id() callback to provide port specific unique id to the netdev layer. If the adapter has a valid per-port mac address then that would be used for this purpose and is expected to be unique on a per-port basis. The information can be viewed by reading the phys_port_id attribute in sysfs for each netdev or via IF netlink interface. Change-ID: I341fa6fff9c112f1f6d987189309e730e0b50e8b Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-26i40e: Fix the FD sideband logic to detect a FD table full conditionAnjali Singhai Jain1-1/+2
Hardware does not have a way of telling a PF how much of the global shared FD table space is still available or is consumed. Previously, every PF but PF0 would think there was still space available when there wasn't. The PFs would continue to try to add filters and fail. With this new logic if a filter programming error is detected we just check if we are close to the guaranteed space full and that can be used as a hint to say, there might not be space and we should turn off the features. This way we can turn off the feature in SW for all PFs in time. Change-ID: I725cb2fab16c033f883056362b4542c1400503c5 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-24i40e: reapply LAA after resetShannon Nelson1-0/+1
The LAA is lost on a reset, so be sure to replay it when rebuilding the switch after any reset. Change-ID: I6e643f9a59dfd899b6cbdf84d93b4bc9c37bb949 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-24i40e: Fix ethtool coalesce settingsCarolyn Wyborny1-0/+1
This patch fixes the i40e_set_coalesce function to allow 0 as a disable value. Also, added message to user about invalid value and provides valid range. Change-ID: I6c9ff11a9861f2045bd543745a3d132999ffbbd8 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-20i40e/i40evf: Update RSS configurationCarolyn Wyborny1-0/+1
This patch changes the RSS configuration to set table size and write to hardware to confirm RSS table size being used. Change-ID: I455a4c09c9dd479f5791ee1f09fdc83ff9908df5 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-19i40e: Fix scheduling while atomic bug during NAPINeerav Parikh1-0/+1
The bug is encountered when all the Tx hang recovery mechanisms have failed and driver tries to bring down the interface in the interrupt context. The patch defers this and schedules it for next cycle. Change-ID: Id9cd1da15b0e5c018dce18da4d0eed5ef1e8a809 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-19i40e: Helper routine for Rx/Tx queue enable/disable waitNeerav Parikh1-0/+1
Introduce helper routines that would wait for the Rx/Tx queue to reach the enable or disable state as requested. Change-ID: I518d9d0e2afef3f45107af3b46e9af402ff587c3 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-11i40e/i40evf: Add Flow director stats to PF statsAnjali Singhai Jain1-0/+13
Add members to stat struct to keep track of Flow director ATR and SideBand filter packet matches. Change-ID: Ibbb31a53c7adcc2bb96991dd80565442a2f2513c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-11i40e: Separate out DCB capability and enabled flagsNeerav Parikh1-0/+1
Currently if the firmware reports DCB capability the driver enables I40E_FLAG_DCB_ENABLED flag. When this flag is enabled the driver inserts a tag when transmitting a packet from the port even if there are no DCB traffic classes configured at the port. This patch adds a new flag I40E_FLAG_DCB_CAPABLE that will be set when the DCB capability is present and the existing flag I40E_FLAG_DCB_ENABLED will be set only if there are more than one traffic classes configured at the port. Change-ID: I24ccbf53ef293db2eba80c8a9772acf729795bd5 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-11i40e: Change the notion of src and dst for FD_SB in ethtoolAnjali Singhai Jain1-0/+1
In XL710 devices we program FD filter's fields from Tx perspective of the flow. However the user interface exposed in ethtool should be compliant with the previous generation of drivers where a filter src and dst field are from the RX perspective. This patch changes the ethtool interface in this regard to match the other drivers. Change-ID: Iec6ccddd87357c4fb53ccf33aa0fae699faf70cf Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08i40e: remove unused variable and memory allocationShannon Nelson1-1/+0
This was a vestige of early driver development that no longer has any actual use. Change-ID: I95b5b19c4bbfaff8759197af671ebaf716cb6ab5 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08i40e: allow for more VSIsMitch Williams1-0/+2
The number of VSIs that the firmware reports to us is a guaranteed minimum, not an absolute maximum. The hardware actually supports far more than the reported value, which we often need. To allow for this, we allocate space for a larger number of VSIs than is guaranteed by the firmware, with the knowledge that we may fail to get them all in the future. Note that we are just allocating pointers here, the actual (much larger) VSI structures are allocated on demand. Change-ID: I6f4e535ce39d3bf417aef78306e04fbc7505140e Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08i40e/i40evf: Clean up a few thingsAkeem G Abodunrin1-1/+0
1. There is no ixgbe_watchdog_task function in the driver, so change the comment to the correct function name, i40e_watchdog_subtask. 2. Remove num_msix_entries from interrupt set_up routine because it is never used. 3. Remove some TBD comments that are not needed. Change-ID: I37697a04007074b797f85fd83d626672e4df1ad1 Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: remove irqs only when they are set upShannon Nelson1-0/+1
Use an extra state variable to keep track of when the IRQs are fully set up. This keeps us from trying to unhook IRQs that already were left unhooked in a failed reset recovery, e.g. when firmware is broken. Change-ID: I073eb081e4ef8aedcbdf1ee0717c0ed64fa172f2 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29i40e: Report cmd->data in ETHTOOL_GRXCLSRLCNT instead of ETHTOOL_GRXCLSRULEAnjali Singhai Jain1-0/+9
Based on review feedback from upstream cmd->data is not defined in ETHTOOL_GRXCLSRULE but needs to be reported in ETHTOOL_GRXCLSRLCNT. Also use a helper function to calculate the total filter count. Change-ID: Iaacbf729527b73290c4fdad837b379b44fd7dd20 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-21i40e: add required includeMitch Williams1-4/+0
On some architectures, this header must be explicitly included. Change-ID: I4bc2eb0531956a7b676489f79d347d55cfe12421 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-04-28i40e: remove ptp_tx_work timestamp work itemJacob Keller1-2/+0
This patch removes the unnecessary ptp_tx_work item. It conflicts with the interrupt-based handler, and will cause spurious warning messages to be displayed in the kernel log. Since the hardware can properly trigger an interrupt, we do not need to poll for an available timestamp in a work queue any more. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-28i40e: eeprom integrity check on load and emprShannon Nelson1-0/+1
The driver needs to verify the eeprom checksum and firmware crc status bits, and shutdown the driver if they fail. This code stops the processing of traffic, but doesn't kill the PF netdev so that the NVMUpdate process should still have a chance at fixing the image. The eeprom is checked on driver load and after an EMP reset, the latter of which should be generated after an NVMUpdate. Change-ID: I34deef21d2e16bf5a43c603cf8af27e6a29dc9d2 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-19i40e: Refactor and cleanup i40e_open(), adding i40e_vsi_open()Elizabeth Kappler1-1/+2
This patch cleans up and moves a portion of i40e_open to i40e_vsi_open, in order to have a shorter vsi_open function that does only that. Change-ID: I1c418dda94dcfc0eb7d4386a70c330692ef5ecc9 Signed-off-by: Elizabeth Kappler <elizabeth.m.kappler@intel.com> Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-19i40e: Patch to enable Ethtool/netdev feature flag for NTUPLE controlAnjali Singhai Jain1-0/+1
This enables option '-k/-K' in ethtool for NTUPLE control. NTUPLE control requires a reset, to take effect. When the feature is turned off, the SW list of stored FD SB filters gets cleaned up. Change-ID: I9d564b67a10d4afa11de3b320d601c3d2e6edc1f Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-14i40e: Add code to handle FD table full conditionAnjali Singhai Jain1-1/+6
Add code to enforce the following policy: - If the HW reports filter programming error, we check if it's due to a full table. - If so, we go ahead and turn off new rule addition for ATR and then SB in that order. - We monitor the programmed filter count, if enough room is created due to filter deletion/reset, we then re-enable SB and ATR new rule addition. Change-ID: I69d24b29e5c45bc4fa861258e11c2fa7b8868748 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-14i40e: Define a new state variable to keep track of feature auto disableAnjali Singhai Jain1-0/+3
This variable is a bit mask. It is needed to differentiate between user enforced feature disables and auto disable of features due to HW resource limitations. Change-ID: Ib4b4f6ae1bb2668c12e482d2555100bc8ad713d5 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-06i40e: fix nvm version and remove firmware reportJesse Brandeburg1-7/+7
The driver needs to use the format that the current NVM uses when printing the version of the NVM. It should remain this way from now on forward. The driver was reporting when firmware was less than an expected version number, but this is not a requirement for the product and we print the firmware number at init and in ethtool -i output. Just remove the print. Change-ID: Ide0b856cd454ebf867610ef9a0d639bb358a4a60 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-06i40e: Flow Director sideband accountingJoseph Gasparakis1-5/+18
This patch completes implementation of the ethtool ntuple rule management interface. It adds the get, update and delete interface reset. Change-ID: Ida7f481d9ee4e405ed91340b858eabb18a52fdb5 Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-17i40e: add DCB and DCBNL supportNeerav Parikh1-2/+14
This patch adds capability to configure DCB on i40e network interfaces using Intel XL710 adapter firmware APIs. By default all VSIs are only enabled for the default traffic class enabled by firmware for any given PF. The driver would query the firmware for the traffic classes that are enabled for the port and reconfigure the LAN VSI to match to the port traffic class settings. All other VSIs are only enabled for the default traffic class settings for now. The driver registers and listens to firmware events that may require change in the DCB settings. It may reconfigure the VSI settings based on these events. This patch exposes IEEE DCBNL interfaces for the i40e driver to allow any application to query the DCB settings on the adapter. Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-By: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17i40e: rename definesJesse Brandeburg1-2/+2
The FLAG_FDIR_* defines can be renamed to be more descriptive. This patch is in preparation for the following where the fdir code is refactored. Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17i40e: Change firmware workaroundJesse Brandeburg1-1/+0
Remove a workaround that is no longer necessary and implement a better understanding of what firmware is returning in the MSI-X vector count. This makes it so that the driver ends up with the right amount of queues when using all available MSI-X vectors. Change-ID: I34e60cc71dcfb1b5412f37df956fedcc49ade187 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16drivers/net: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. This covers everything under drivers/net except for wireless, which has been submitted separately. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-14i40e: whitespace fixesJesse Brandeburg1-1/+0
Fix some whitespace and comment issues. Change-ID: I1587599e50ce66fd389965720e86f9e331d86643 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-10i40e: enable PTPJacob Keller1-0/+26
New feature: Enable PTP support in the i40e driver. Change-ID: I6a8e799f582705191f9583afb1b9231a8db96cc8 Cc: Richard Cochran <richardcochran@gmail.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Matthew Vick <matthew.vick@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-10i40e: Update the Current NVM version Low valueAnjali Singhai Jain1-1/+1
The current driver will warn the user if the NVM version is out of date, this raises the bar to a newer version. Change-ID: I5ec21d8efa4e7c3fdacb56f85d310bb2229b1483 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Fix GPL headerGreg Rose1-4/+3
The GPL header included in each file in the i40e driver doesn't need to include the "this program" text since this driver is already part of the larger kernel. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Remove unnecessary prototypesAnjali Singhai Jain1-7/+0
These functions don't need a prototype as they are defined in the file before they are called. Change-Id: Ie17ffad4a29a9c0df434c4ebc4681128a6095c65 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: I40E_FLAG_MQ_ENABLED is not usedNeerav Parikh1-14/+13
Remove references to I40E_FLAG_MQ_ENABLED from the code as it doesn't seem to be used anywhere. Change-Id: I4c89fb65b2cdd26fbb0c58fccbbb4b03f0e5f1b3 Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Fix ring allocationNeerav Parikh1-3/+0
The allocation and clearing of rings for a VSI should be using the alloc_queue_pairs and not num_queue_pairs. The alloc_queue_pairs per VSI is a pre-allocated number of queues assigned to a VSI; based on number of TCs enabled only certain number of queues may be used from that. This is mainly valid only for the LAN VSI case as that is the only VSI that may be enabled with multiple traffic classes. In the future the number of TCs may change based on DCBX configuration. The actual number of queues that are enabled/configured is based on the number of TCs enabled for a given VSI and that is stored in num_queue_pairs. With this change num_[tr]x_queues is unused so remove them. Change-Id: I9c2f84778bb25f7313c630e9b002a0caa883ce29 Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: use functions to enable and disable icr 0Mitch Williams1-0/+1
Introduce i40e_irq_dynamic_disable_icr0 and use it and its previously- extant counterpart when appropriate. Change-Id: Ieb4037874fba2e96fc2354b34a97a3cb8f6490f3 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: Dump the whole NVM, not halfAnjali Singhai Jain1-1/+1
Debugfs was reading exactly half the number of words, fix it. Change-Id: Ieb217f3c6dca455d44e50a0dc61a6664c0cb2265 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03i40e: refactor VF reset flowMitch Williams1-0/+1
Fix the VF reset flow so that it works on real hardware. After discussions with the HW team, the reset flow has been changed somewhat. - Change the i40e_reset_vf function to a void type, and fix up the callers to reflect this. - Move the MSI-X disable code to i40e_free_vf_res since it must be done every time the VF is freed, regardless of whether or not it is reset. - Ensure that the PCIe bus is quiet before polling the reset bit. - Don't clear the VFGEN_RSTAT1 register at the beginning as it is cleared by the reset. - Poll longer for the reset to be done. - Disable the queues using an existing function rather than rolling our own. - Free and reallocate the VSI after reset to avoid rx hang. Change-Id: I11e2590431cb73e8663714d1cc5b23d59b809033 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03i40e: Rx checksum offload for VXLANJoseph Gasparakis1-0/+1
This implements receive offload for VXLAN for i40e. The hardware supports checksum offload/verification of the inner/outer header. Change-Id: I450db300af6713f2044fef1191a0d1d294c13369 Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03i40e: Implementation of VXLAN ndo'sJeff Kirsher1-1/+9
This adds the implementation for the VXLAN ndo's. This allows the hardware to do RX checksum offload for inner packets on the UDP ports that VXLAN notifies us about. Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03i40e: add wake-on-lan supportShannon Nelson1-0/+1
Wake on LAN is disabled by default and will remain that way for most platforms, but there is an NVM setting that allows vendors to enable it for a port if they think they've provided the right power environment for the device. This patch adds code to check the NVM setting and enable Magic Packet use if WoL is enabled for the port. Since only Magic Packet is supported, there's not a lot of HW configuration needed. Change-Id: I44e904a7b15695e34683009f487064cd86ea59b0 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>