aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-03ethernet: Use eth_<foo>_addr instead of memsetJoe Perches1-2/+2
Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-03i40e: Fix dependencies in the i40e driver on configfsGreg Rose4-8/+17
Module dependencies are broken in the case where CONFIG_I40E=y and CONFIG_CONFIGFS_FS=m. This fixes the broken dependency. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24i40e/i40evf: Update driver versionsSravanthi Tangeda2-3/+3
Bump i40e to 1.2.9 and i40evf 1.2.3 Also update the copyright year. Change-ID: I345d777e94abd0acffe6a28793f675d251a86299 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40evf: Add more info to interrupt vector namesCarolyn Wyborny1-1/+2
This patch adds the netdev name to the VF misc vector name. Without this patch, all the interrupts show the same info, so it difficult to distinguish them. Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Use ethtool private flags to display NPAR statusGreg Rose2-0/+44
Allow an application to query the i40e driver's private flags to get the status of NPAR enablement. This will be used by applications to determine if there are NPAR specific features available. Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Set FLAG_RD when sending buffer FW must readKevin Scott1-1/+1
Set FLAG_RD for send_driver_version AQ command. Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: print Rx packet split statusMitch Williams1-2/+4
Add the RX routine in use to the features log message. Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: setup FCoE device typeVasu Dev1-0/+6
Setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Set BUF flag for Set Version AQ commandKevin Scott1-1/+1
BUF flag must be set for indirect AQ command. Change-ID: I6819718a47baf69d1a91ebaed89f735ed6e86025 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add support for getlink, setlink ndo opsNeerav Parikh6-22/+196
Add support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in case of a PF VSI and not available for any other VSI type. By default the i40e driver inserts a bridge as part of the bring-up when a FDIR type VSI and/or a FCoE VSI is created. This bridge is created in VEB mode by default i.e. after creating the bridge using "Add VEB" AQ command the loopback for the PF's default VSI is enabled. The patch adds capability where all the VSIs created as downlink to the bridge inherits the loopback property and enables loopback only if the uplink bridge is operating in VEB mode. Hence, there is no need to explicitly enable loopback as part of allocating resources for SR-IOV VFs and call to do that has been removed. In case a user-request is made either via "bridge" utility or using the bridge netlink interface that requires to change the hardware bridge mode then that would require a PF reset and rebuild of the switch hierarchy. Also update the copyright year. Change-ID: I4d78fc1c83158efda29ba7be92239b74f75d6d25 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Implement configfs for NPAR BW configurationGreg Rose4-8/+369
Add configfs controls to get, set and commit NPAR BW configurations. We export three controls: min_bw - Can take a value from 0 to 100 inclusive max_bw - Can take a value from 1 to 100 inclusive commit - A write-only control that accepts only a value of 1 and will cause the BW settings to be permanently committed to NVM so that they are persistent across power cycles and system resets The BW values are relative and are expressed as percentages. For more information on the interpretation of the BW settings see the Dell specifications for NPAR. Also update the copyright year. Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add NPAR BW get and set functionsGreg Rose5-1/+273
We need to be able to get, set and commit permanently the NPAR partition BW configuration through configfs. These are necessary precursor functions for that feature. Also update the copyright year. Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: enable packet split only when IOMMU presentMitch Williams2-2/+7
When an IOMMU is in use, the packet split receive path shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. However, this is not an advantage for systems with no IOMMU. At init time, check to see if an IOMMU is enabled and enable packet split receives. Change-ID: I4f70d2e9c31bbea3dc8fd0c5734959a6e6602210 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40evf: allow enabling of debug prints via ethtoolAshish Shah1-2/+4
Copy setting from ethtool to the HW specific struct to actually enable prints. Change print from i40e to i40evf to differentiate drivers in bare metal scenarios. Also update the copyright year. Change-ID: I06fee26247299a08f2e1c70fc811a9ea0931c4dd Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add method to keep track of current rxnfc settingsCarolyn Wyborny2-1/+12
This patch adds a struct to the VSI struct to keep track of rxnfc settings done via ethtool. Without this patch, the device can only list the options available, not the current settings and this is not clear to the user. Without current settings, the available settings never changing looks like a bug. Also update the copyright year. Change-ID: I087bbfdb33b330496a671630a7586773e3b3e589 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settingsCatherine Sullivan4-124/+173
Add a requested speed variable to the link_status struct to store the last speeds we requested from the firmware (the speeds the FW will be advertising with if autoneg is enabled). Use the advertised speed settings in get_settings in ethtool now that we have it. Also set the requested speed settings in set_settings in ethtool as they are requested and initialize them in probe based on what the firmware remembers as the last requested speeds. To accommodate some longer lines in this new code, and improve readability I have added two functions i40e_get_settings_link_up and i40e_get_settings_link_down which get_settings now calls first. It then does all of the settings that happen regardless of link state. Some PHY types that supported the same settings were also combined. Also update the copyright year. Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e/i40evf: Fix output of i40e_debug_aq() for big endian machinesPaul M Stillwell Jr2-23/+37
The function i40e_debug_aq() prints information helpful in debugging admin queue commands, but it doesn't do so correctly on big endian machines. This patch adds the appropriate LExx_TO_CPU wrappers for big endian architectures. Also update the copyright year. Change-ID: I4b2dc229ed5bf6dfe35632a58cddf53c21aff4b0 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40evf: don't wait foreverMitch Williams1-2/+13
Under rare circumstances, after a reset, set_rx_mode might get called while the watchdog is running, which will cause a deadlock on the critical section lock. To correct this, add a counter and give up trying to get the lock after fifty tries. Log a message if this happens but don't take any other action. Because this happens after a reset, all of the Rx filters are still in place and the device won't lose connectivity. We can also get stuck during shutdown, if the PF has stopped communicating with us, or if a reset is occurring. If we can't get the lock after a reasonable amount of time, just error out. Something else bad is happening anyway, so adding this filter is the least of our concern right now. Change-ID: I159731e2a82a06b389ee31b34ce336548e05baa0 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40evf: refactor resetMitch Williams1-10/+31
A recent change to the shutdown flow messed up the reset flow. Since i40evf_down now holds the critical section lock, we cannot call it from the reset handler, which also holds the lock. To do so causes a deadlock accompanied by wailing and gnashing of teeth. This is easily triggered by running an ethtool self-test on the PF device. Instead, we move the relevant portions of i40evf_down into the reset handler and bend them to our will. Additionally, we can optimize the reinit path by not deleting the MAC and VLAN filters and then adding them back again. Instead, we just set the 'add' flag and let the watchdog resynchronize the filter list with the PF driver. We also reword a few messages to make them more consistent with the rest of the driver. Change-ID: I03dd92ae736f7719fca3564b12a2cf9b98c6cb18 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40evf: disable NAPI polling soonerMitch Williams1-2/+1
When closing the interface, disable NAPI polling before any other activities. This fixes an occasional panic during close caused by the driver trying to delete and clean rings at the same time. Change-ID: Ib4d427b13d310258ea85b248d535da70ecf0c1e9 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Fix i40e_ndo_set_vf_spoofchkGreg Rose1-1/+2
The netdev op that allows the operator to turn MAC/VLAN spoof checking on and off did not include the flag for VLAN spoof checking. This patch fixes that problem. Change-ID: Ib4c9e639024a854592d97af22706544881ac3fcb Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Bump Driver VersionsSravanthi Tangeda2-2/+2
Bump i40e to 1.2.8 and i40evf to 1.2.2 Change-ID: I64f47c3367ea8ff2a53068e895d7a1f60726c871 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Remove unused variable an_enable and function update_link_infoCatherine Sullivan6-38/+6
An_enable was never used only set so lets remove it. The function update_link_info only did two things, call get_link_info and set an_enabled. Therefore we should also remove update_link_info and change all references to it to get_link_info. Change-ID: Ie3022680fa7a94bfd495a4f5fc76a73701d85569 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Fix the EMPR interrupt received handlingAnjali Singhai Jain2-4/+3
We shouldn't trigger another EMPR when we receive an EMPR event. This patch handles EMPR event reception with a different state so that we can do the right thing for NVM. Change-ID: I9cac70b3658600f016a65beb6fb157e1c1f9adf9 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: i40e_register.h updatesAnjali Singhai Jain4-74/+50
Some registers have been removed so take them out and stop updating and looking at them. Change-ID: I33da922c8de993a94dd8b8d8a2ae2146b8ca1a27 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Use #define for the VSI connection typeNeerav Parikh2-4/+4
Use #defined VSI connection type values instead of using magic numbers. Change-ID: I2f6cf7bf394d391e1c0fe61779e9e4ad8858154a Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: restrict VC opcodes to their initial valuesNicholas Nunley2-44/+40
Until the time a more robust versioning scheme is needed/implemented all established virtual channel opcode values should remain consistent between updates to the opcode enum. This patch repositions I40E_VIRTCHNL_OP_CONFIG_RSS to the end of the enum. In its current position this opcode displaces the initial value of I40E_VIRTCHNL_OP_EVENT and will cause PF/VF compatibility issues. Going forward the expectation is either: a) All future opcode additions will be added as the last element of the enum. Once VF drivers start making use of the new commands the virtual channel version will need to be incremented and drivers will need to implement a simple version check whereby VF drivers can only load on PFs with a >= version. b) or, if needed, design and implement a more complicated API negotiation capability. In either case PF drivers should always maintain backwards compatibility with earlier VF driver versions. Change-ID: Ie245daa09a231b6680ed793d648bdcc76caefe58 Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Refactor the receive routinesMitch Williams6-214/+651
Split the receive hot path code into two, one for packet split and one for single buffer. This improves receive performance since we only need to check if the ring is in packet split mode once per NAPI poll time, not several times per packet. The single buffer code is further improved by the removal of a bunch of code and several variables that are not needed. On a receive-oriented test this can improve single-threaded throughput. Also refactor the packet split receive path to use a fixed buffer for headers, like ixgbe does. This vastly reduces the number of DMA mappings and unmappings we need to do, allowing for much better performance in the presence of an IOMMU. Lastly, correct packet split descriptor types now that we are actually using them. Change-ID: I3a194a93af3d2c31e77ff17644ac7376da6f3e4b Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: rename debugfs clear_stats optionShannon Nelson1-5/+9
Change debugfs command from "clear_stats pf" to "clear_stats port" to be clearer what the action is. Also, limit the action to the base PF, not the NPAR partitions. Change-ID: I22aa39c0962d83a83a985097b1000ed7f8c66f3f Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: update Shadow RAM read/write functionsKamil Krawczyk2-27/+71
This change is to refactor the read/write functions to support future work. Change-ID: I13150d5e3042f2c617362c0140dc7e6473ebcdee Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23igbvf: cleanup msleep() and min/max() usageJeff Kirsher2-6/+6
Fixed a few cases of when we used msleep() when we should have been using usleep_range(). Also updated the usage of min/max() to use min_t/max_t(). Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
2015-02-23igbvf: Fix code comments and whitespaceJeff Kirsher9-516/+500
Fix the code comments to align with the drivers/net/ commenting style. Also fix other checkpatch errors such as using tabs where possible and properly wrap lines to conform to the 80 char limit (unless it is a string). Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
2015-02-23e1000e: initial support for i219David Ertman9-83/+768
i219 is the next-generation LOM that will be available on systems with the Sunrise Point Platform Controller Hub (PCH) chipset from Intel. This patch provides the initial support for the device. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Tested-by: Carmen Edwards <carmenx.edwards@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40e: Fix for stats init function call in Rx setupCarolyn Wyborny2-2/+2
This patch fixes indentation issue and error found in argument reported by static analysis. Without this patch, sparse and other static analysis errors will be found. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-09i40e/i40evf: Add call to u64_stats_init to initCarolyn Wyborny2-0/+4
This patch adds a call to u64_stats_init to Rx setup. This done in order to avoid lockdep errors with seqcount on newer kernels. Change-ID: Ia8ba8f0bcbd1c0e926f97d70aeee4ce4fd055e93 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40e: Enable Loopback for the FCOE vsi as wellAnjali Singhai Jain1-0/+1
For all VSIs on a VEB, Loopback mode should be either on or off. Our configuration requires them to be ON so that VSIs can directly talk to each other without going out on the wire. Change-ID: I77b8310bc846329972b13b185949ab1431a46c30 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40e: use dev_port for fcoe netdevVasu Dev1-0/+6
Set different dev_port value 1 for FCoE netdev than the default zero dev_port value for PF netdev, this helps biosdevname user tool to differentiate them correctly while both attached to the same PCI function. Change-ID: I8fb90e4ef52a1242f7580e49a3f0918735aee8ef Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40e: Fix function headerGreg Rose1-1/+1
s/enable/disable Change-ID: Ic0572a6c59d03e05a0a35d2e2e9d532e0512638d Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40e: fix led blink toggle to enable steady stateMatt Jared1-2/+4
Make sure to clear the GPIO blink field, instead of OR'ing against zero if the field is already '1'. Change-ID: Ie52a52abd48f6f52b20778a6b8b0c542dfc9245c Signed-off-by: Matt Jared <matthew.a.jared@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-09i40evf: Force Tx writeback on ITRAnjali Singhai Jain3-4/+39
This patch forces Tx descriptor writebacks on ITR by kicking off the SWINT interrupt when we notice that there are non-cache-aligned Tx descriptors waiting in the ring while interrupts are disabled under NAPI. Change-ID: dd6d9675629bf266c7515ad7a201394618c35444 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: stop the service task at shutdownMitch Williams1-0/+2
Stop the service task in the shutdown handler, preventing it from accessing the admin queue after it had been closed. This fixes a panic that could occur when the system was shut down with a lot of VFs enabled. Change-ID: I286735e3842de472385bbf7ad68d30331e508add Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40evf: stop the watchdog for shutdownMitch Williams1-0/+6
Stop the watchdog during shutdown. Failing to do this causes a log full of admin queue errors and the occasional hang when the system is shut down. Change-ID: Ib2fd11213cca2fa589eb68577e86b1000c23c250 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40evf: ignore bogus messages from FWMitch Williams1-1/+1
Occasionally on shutdown, the FW will hand us a bunch of messages filled with zeros, which can cause us to spin trying to handle them. Just ignore these and get on with shutting down. Change-ID: I347e9648f7153ad5a7b7e0847b87f7aad5f3e0da Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40evf: reset on module unloadMitch Williams1-5/+10
When the module is being unloaded, don't wait for the PF to politely handle all of our admin queue requests, as that might take forever with a lot of VFs enabled. Instead, just stop everything and request a VF reset. When the original shutdown code was written, VF resets were unreliable, so we avoided them. But with production hardware and firmware, and the 1.x PF driver, this is no longer the case. This fixes a potential multi-minute delay on driver unload, VF disable, or system shutdown. Change-ID: Ib43d6d860ef6b9b8f26e8dce0615a0302608c7d9 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: add locking around VF resetMitch Williams2-6/+8
During VF deallocation, we need to lock out the VF reset code. However, we cannot depend on simply masking the interrupt, as this does not lock out the service task, which can still call the reset routine. Instead, leave the interrupt enabled, but add locking around the VF disable and reset routines. For the disable code, we wait to get the lock, as the reset code will take a finite amount of time to run. For the reset code, we just return if we fail to get the lock. Since we know that the VFs are being disabled, we don't need to handle the reset. This fixes a panic when disabling SR-IOV. Change-ID: Iea0a6cdef35c331f48c6d5b2f8e6f0e86322e7d8 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: Use even more ARQ descriptorsMitch Williams1-2/+2
When enabling 64 VFs and loading the VF driver in the host kernel, we can easily overrun the PF's admin receive queue. Double the size of this queue, and increase the work limit to allow the PF to handle more requests in a single pass through the service task. Change-ID: I0efbbdc61954bffad422a2f33c4b948a59370bf5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: delay after VF resetMitch Williams1-6/+6
Delay a minimum of 10ms after VF reset, to allow the hardware's internal FIFOs to flush. Change-ID: I8a02ddb28c9f0d7303a1eb21d0b2443e5b4c1cda Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: avoid use of uninitialized v_budget in i40e_init_msixJohn W Linville1-5/+5
This I40E_FCOE block increments v_budget before it has been initialized, then v_budget gets overwritten a few lines later. This patch just reorders the code hunks in what I believe was the intended sequence. Coverity: CID 1260099 Signed-off-by: John W Linville <linville@tuxdriver.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-08i40e: i40e_fcoe.c: Remove unused functionRickard Strandqvist1-9/+0
Remove the function i40e_rx_is_fip() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-05ixgbe: add Tx anti spoofing supportDon Skidmore4-0/+47
This patch enables the ethertype Anti-Spoofing feature for affected devices. It is configured such that LLDP packets sent by a VF will be dropped. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>