aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-29ixgbe: add support for older QSFP active DA cablesEmil Tantilov2-10/+50
This patch adds support for QSFP active direct attach (DA) cables which pre-date SFF-8436 v3.6. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: include QSFP PHY types in ixgbe_is_sfp()Emil Tantilov1-0/+4
This patch makes sure that QSFP+ modules use the SFP+ code path for setting up link. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: add 1Gbps support for QSFP+Emil Tantilov3-11/+33
This patch adds GB speed support for QSFP+ modules. Autonegotiation is not supported with QSFP+. The user will have to set the desired speed on both link partners using ethtool advertise setting. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: fix SFF data dumps of SFP+ modules from an offsetEmil Tantilov1-5/+4
This patch fixes the read loop for the I2C data to account for the offset. Also includes a whitespace cleanup and removes ret_val as it is not needed. CC: Ben Hutchings <bhutchings@solarflare.com> Reported-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: cleanup some log messagesDon Skidmore2-5/+3
Some minor log messages cleanup, changing the level one message is logged, adding a bit of detail to another and put all the text on one line. 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>
2013-08-29ixgbe: zero out mailbox buffer on initEmil Tantilov1-2/+2
This patch initializes the msgbuf array to 0 in order to avoid using random numbers from the memory as MAC address for the VF. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: fix link test when connected to 1Gbps link partnerEmil Tantilov1-17/+10
This patch is a partial reverse of: commit dfcc4615f09c33454bc553567f7c7506cae60cb9 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Thu Nov 8 07:07:08 2012 +0000 ixgbe: ethtool ixgbe_diag_test cleanup Specifically forcing the laser before the link check can lead to inconsistent results because it does not guarantee that the link will be negotiated correctly. Such is the case when dual speed SFP+ module is connected to a gigabit link partner. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: fix incorrect limit value in ring transverseDon Skidmore1-1/+1
We were transversing the tx_ring with IXGBE_NUM_RX_QUEUES. Now this define happens to have the correct value but this is misleading and a change later could easily make this no longer true. I updated it to netdev->num_tx_queues like we use in ixgbe_get_strings(). 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>
2013-08-29ixgbe: Check return value on eeprom readsMark Rustad4-39/+107
This patch fixes the possible use of uninitialized memory by checking the return value on eeprom reads. These issues were identified by static analysis. In many cases error messages will be produced so that corrupted eeprom issues will be more visible. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-29ixgbe: disable link when adapter goes downJacob Keller3-0/+25
This patch fixes an issue with the 82599 adapter where it can potentially keep link lights up when the adapter has gone down. The patch adds a function which ensures link is disabled, and calls this function when the adapter transitions to a down state. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller3-11/+10
Merge net into net-next to setup some infrastructure Eric Dumazet needs for usbnet changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLLCong Wang2-9/+9
Eliezer renames several *ll_poll to *busy_poll, but forgets CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too. Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-31ixgbe: add support for quad-port x520 adapterDon Skidmore6-17/+358
This is a x520 based quad-port (4x10Gbps) NIC with a single QSFP+ connector. Changes were required to our identify functions due to different eeprom address which is also included here. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-31ixgbe: clear semaphore bits on timeoutsEmil Tantilov1-24/+21
This patch changes the error code path in ixgbe_acquire_swfw_sync() to deal with cases where acquiring SW semaphore times out. In cases where the SW/FW semaphore bits were set (i.e. due to a crash) the driver will hang on load. With this patch the driver will clear the stuck bits if the semaphore was not acquired in the allotted time. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-31ixgbe: rename LL_EXTENDED_STATS to use queue instead of qJacob Keller1-6/+6
This patch renames the stats introduced by the busy poll feature so that they are more inline with the current statistics naming schemes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-31ixgbe: fix lockdep annotation issue for ptp's work itemJacob Keller3-12/+14
This patch fixes a lockdep issue created due to ixgbe_ptp_stop always running cancel_work_sync even if the work item had not been created properly with INIT_WORK. This is caused because ixgbe_ptp_stop did not check to actually ensure PTP was running first. The new implementation introduces a state in the &adapter->state field which is used to indicate that PTP is running. (This replaces the IXGBE_FLAG2_PTP_ENABLED field). This state will use the atomic set_bit, test_bit, and test_and_clear_bit functions. ixgbe_ptp_stop will check to ensure that PTP was enabled, (and if not, it will not attempt to do any cleanup work from ixgbe_ptp_init). This resolves the lockdep annotation warning found by Stephen Hemminger Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Acked-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>
2013-07-31ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidthJacob Keller1-7/+129
This patch uses the new pcie_get_minimum_link function to perform a check to ensure that the adapter is hooked into a slot which is capable of providing the necessary bandwidth. This check supersedes the original method which only checked the current pci device. The new method is capable of determining the minimum speed and link of an entire PCI chain. -v2- * update the error message to include encoding loss CC: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: fix SFF data dumps of SFP+ modulesEmil Tantilov3-60/+18
This patch fixes several issues with the previous implementation of the SFF data dump of SFP+ modules: - removed the __IXGBE_READ_I2C flag - I2C access locking is handled in the HW specific routines - fixed the read loop to read data from ee->offset to ee->len - the reads fail if __IXGBE_IN_SFP_INIT is set in the process - this is needed because on some HW I2C operations can take long time and disrupt the SFP and link detection process Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reported-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: fix semaphore lock for I2C read/writes on 82598Emil Tantilov4-148/+182
ixgbe_read/write_i2c_phy_82598() does not hold the SWFW_SYNC semaphore for the entire function. Instead the lock is held only during the phy.ops.read/write_reg operations. As result when the function is being called simultaneously the I2C read/writes can be corrupted. The following patch introduces the SWFW_SYNC semaphore for the entire ixgbe_read/write_i2c_phy_82598() function. To accomplish this I had to create 2 separate functions: ixgbe_read_phy_reg_mdi() ixgbe_write_phy_reg_mdi() Those functions are identical to ixgbe_read/write_phy_reg_generic() sans the locking, and can be used in ixgbe_read/write_i2c_phy_82598() with the SWFW_SYNC semaphore being held. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: bump version numberDon Skidmore1-1/+1
Bump the version number to better match with a similar version of the out of tree driver. 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>
2013-07-30ixgbe: add new media type.Don Skidmore4-7/+95
This patch adds support for a new media type fiber_fixed. This is useful to avoid all the SFP+ hot plug support path on devices who's fix fiber need not worry about such things. This patch is needed for a following patch that adds support for "fiber_fixed" devices. v2: cleaned up logging message based on feedback from David Miller Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: fix fc autoneg ethtool reporting.Don Skidmore4-16/+40
Originally ixgbe_device_supports_autoneg_fc() was only expected to be called by copper devices. This would lead to false information to be displayed via ethtool. v2: changed ixgbe_device_supports_autoneg_fc() to a bool function, it returns bool. Based on feedback from David Miller Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assignedAlexander Duyck1-34/+1
This change makes it so that the ixgbe driver uses the generic helper pci_vfs_assigned instead of the ixgbe specific function ixgbe_vfs_are_assigned. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-30ixgbe: Retain VLAN filtering in promiscuous + VT modeGreg Rose2-2/+75
When using the new bridge FDB interface to allow SR-IOV virtual function network devices to communicate with SW bridged network devices the physical function is placed into promiscuous mode and hardware VLAN filtering is disabled. This defeats the ability to use VLAN tagging to isolate user networks. When the device is in promiscuous mode and VT mode simultaneously ensure that VLAN hardware filtering remains enabled. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-07-28ixgbe: Fix Tx Hang issue with lldpad on 82598EBJacob Keller1-2/+1
This patch fixes an issue with the 82598EB device, where lldpad is causing Tx Hangs on the card as soon as it attempts to configure DCB for the device. The adapter will continually Tx hang and reset in a loop. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Stable <stable@vger.kernel.org> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-10net: rename ll methods to busy-pollEliezer Tamir1-2/+2
Rename ndo_ll_poll to ndo_busy_poll. Rename sk_mark_ll to sk_mark_napi_id. Rename skb_mark_ll to skb_mark_napi_id. Correct all useres of these functions. Update comments and defines in include/net/busy_poll.h Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-10net: rename include/net/ll_poll.h to include/net/busy_poll.hEliezer Tamir1-1/+1
Rename the file and correct all the places where it is included. Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-10ixgbe: add extra stats for ndo_ll_pollEliezer Tamir3-0/+60
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-10ixgbe: add support for ndo_ll_pollEliezer Tamir3-8/+177
Add the ixgbe driver code implementing ndo_ll_poll. Adds ndo_ll_poll method and locking between it and the napi poll. When receiving a packet we use skb_mark_ll to record the napi it came from. Add each napi to the napi_hash right after netif_napi_add(). Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-21IXGBE: Set the SW prio_tc values at initialization to the HW setting.Amir Hanania4-0/+29
Set the SW prio_tc values at initialization to the HW setting. Setting the SW prio_tc default values to be the HW setting by reading the rtrup2tc register. For any TC change we need to reset the device. This will remove the need to reset the device at the first time we call ixgbe_dcbnl_ieee_setets. Signed-off-by: Amir Hanania <amir.hanania@intel.com> Tested-by: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-25ixgbe: add mac type to the version in ethtool_regsEmil Tantilov1-1/+2
This patch adds the mac type to the version in ethtool_regs. This will make it easier to check the mac type when dumping registers with ethtool. The drawback of this is that older versions of ethtool will only be able to dump in hex format for 82599 and above when used with the updated driver. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-25ixgbe: add support for disabling link at boot time on 82599Emil Tantilov2-2/+20
This patch adds support for disabling link during boot time. This feature was requested by customers and is configurable through the EEPROM. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-25ixgbe: cache AUTOC readsEmil Tantilov2-16/+25
This patch removes majority of the AUTOC register reads by using a cached value instead. The reason for this change is to avoid writing corrupted values to AUTOC due to bad FW. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-25ixgbe: fix register access during ethtool loopback testEmil Tantilov1-12/+14
This patch cleans up the logic in ixgbe_setup_loopback_test() to only access registers applicable to the MAC type. AUTOC is only valid on MACs older than X540. MACC is used for X540. In addition it removes a read of AUTOC and uses the stored value to force the link up. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-25ixgbe: fix EICR write in ixgbe_msix_otherJacob Keller1-0/+10
Previously, the ixgbe_msix_other was writing the full 32bits of the set interrupts, instead of only the ones which the ixgbe_msix_other is handling. This resulted in a loss of performance when the X540's PPS feature is enabled due to sometimes clearing queue interrupts which resulted in the driver not getting the interrupt for cleaning the q_vector rings often enough. The fix is to simply mask the lower 16bits off so that this handler does not write them in the EICR, which causes them to remain high and be properly handled by the clean_rings interrupt routine as normal. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: stable <stable@vger.kernel.org> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-24ixgbe: add WOL support for new subdevice IDEmil Tantilov2-0/+2
This patch adds a define and WOL support for a new subdevice ID. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-24ixgbe: add SFP+ LX module supportDon Skidmore4-10/+25
This patch adds LX support to 82599 devices. This is an alternate patch to the one suggested by Stefan Behte <s.behte@babiel.com> In addition this patch includes some cleanups such as: - removed parenthesis around "x == y ||" lines inside an if statement for consistency. - grouped the sx/lx sfp types along with srlr in ixgbe_get_settings() since they all have the same supported, advertised and port values. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reported-by: Stefan Behte <s.behte@babiel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-24ixgbe: rename wol_supported to more fitting wol_enabledJacob Keller3-4/+4
The variable wol_supported really is just checking whether it is enabled, rather than whether it is supported. If it is enabled it will be supported, but this does not necessarily hold true the other way around. This patch renames the variable to avoid confusion. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-24ixgbe: add driver support for x520 OCP adapter.Don Skidmore2-0/+9
This patch adds support for the new OCP x520 adapter. This support includes WoL. 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>
2013-04-24ixgbe: fix possible divide by zero in ixgbe_update_itrDon Skidmore1-0/+3
Protect the code by bailing out of ixgbe_update_itr() when this occurs. The next call to ixgbe_update_itr will continue to dynamically update ITR. Signed-of-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>
2013-04-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+6
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c include/net/scm.h net/batman-adv/routing.c net/ipv4/tcp_input.c The e{uid,gid} --> {uid,gid} credentials fix conflicted with the cleanup in net-next to now pass cred structs around. The be2net driver had a bug fix in 'net' that overlapped with the VLAN interface changes by Patrick McHardy in net-next. An IGB conflict existed because in 'net' the build_skb() support was reverted, and in 'net-next' there was a comment style fix within that code. Several batman-adv conflicts were resolved by making sure that all calls to batadv_is_my_mac() are changed to have a new bat_priv first argument. Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO rewrite in 'net-next', mostly overlapping changes. Thanks to Stephen Rothwell and Antonio Quartulli for help with several of these merge resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: add protocol argument to packet tagging functionsPatrick McHardy1-1/+1
Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: prepare for 802.1ad VLAN filtering offloadPatrick McHardy1-4/+6
Change the rx_{add,kill}_vid callbacks to take a protocol argument in preparation of 802.1ad support. The protocol argument used so far is always htons(ETH_P_8021Q). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*Patrick McHardy2-7/+7
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-18ixgbe: Remove unnecessary #ifdef CONFIG_DEBUG_FS testsJoe Perches2-10/+5
Add some empty static inlines instead to make the code more readable. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Add support for WoL on 82599 SFP+ LOMJacob Keller2-0/+2
This patch adds software support for WoL for the 82599 SFP+ LOM device, (ID 0x8976) Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: in shutdown, do netif_running() under rtnl_lockakepner1-2/+2
During shutdown it's possible for __dev_close() (which holds rtnl_lock) to clear the __LINK_STATE_START bit, and for ixgbe to then read that bit (without holding rtnl_lock), and then not fail to free irqs, etc. The result is a crash like this: ------------[ cut here ]------------ kernel BUG at drivers/pci/msi.c:313! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map CPU 1 Pid: 5910, comm: reboot Tainted: P ---------------- 2.6.32 #1 empty RIP: 0010:[<ffffffff81305c2b>] [<ffffffff81305c2b>] free_msi_irqs+0x11b/0x130 RSP: 0018:ffff880185c9bc88 EFLAGS: 00010282 RAX: ffff880219f58bc0 RBX: ffff88021ac53b00 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000246 RDI: 000000000000004a RBP: ffff880185c9bcc8 R08: 0000000000000002 R09: 0000000000000106 R10: 0000000000000000 R11: 0000000000000006 R12: ffff88021e524778 R13: 0000000000000001 R14: ffff88021e524000 R15: 0000000000000000 FS: 00007f90821b7700(0000) GS:ffff880028220000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f90818bd010 CR3: 0000000132c64000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process reboot (pid: 5910, threadinfo ffff880185c9a000, task ffff88021bf04a80) Stack: ffff880185c9bc98 000000018130529d ffff880185c9bcc8 ffff88021e524000 <0> 0000000000000004 ffff88021948c700 0000000000000000 ffff880185c9bda7 <0> ffff880185c9bce8 ffffffff81305cbd ffff880185c9bce8 ffff88021948c700 Call Trace: [<ffffffff81305cbd>] pci_disable_msix+0x3d/0x50 [<ffffffffa00501d5>] ixgbe_reset_interrupt_capability+0x65/0x90 [ixgbe] [<ffffffffa00512f6>] ixgbe_clear_interrupt_scheme+0xb6/0xd0 [ixgbe] [<ffffffffa005330b>] __ixgbe_shutdown+0x5b/0x200 [ixgbe] [<ffffffffa00534ca>] ixgbe_shutdown+0x1a/0x60 [ixgbe] [<ffffffff812f6c7c>] pci_device_shutdown+0x2c/0x50 [<ffffffff813727fb>] device_shutdown+0x4b/0x160 [<ffffffff8107d98c>] kernel_restart_prepare+0x2c/0x40 ehci timer_action, mod_timer io_watchdog [<ffffffff8107d9e6>] kernel_restart+0x16/0x60 [<ffffffff8107dbfd>] sys_reboot+0x1ad/0x200 [<ffffffff811676cf>] ? __d_free+0x3f/0x60 [<ffffffff81167748>] ? d_free+0x58/0x60 [<ffffffff8116f7c0>] ? mntput_no_expire+0x30/0x100 [<ffffffff81152b11>] ? __fput+0x191/0x200 [<ffffffff816565fe>] ? do_page_fault+0x3e/0xa0 [<ffffffff8100b132>] system_call_fastpath+0x16/0x1b Code: 4c 89 ef e8 98 8c e3 ff 4d 39 f4 48 8b 43 10 75 cf 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f c9 c3 49 8b 7d 20 e8 07 5a d3 ff eb c9 <0f> 0b 0f 1f 00 eb fb 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 ehci timer_action, mod_timer io_watchdog RIP [<ffffffff81305c2b>] free_msi_irqs+0x11b/0x130 RSP <ffff880185c9bc88> ---[ end trace 27de882a0fe75593 ]--- (This was seen on a pretty old kernel/driver, but looks like the same bug is still possible.) Signed-off-by: <akepner@riverbed.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Fix a bug in setting VF VLAN via PFGreg Rose1-0/+6
The PF driver does not check if the administrator has already set a VF VLAN via the PF driver before setting the new VLAN. This results in the following scenario: A) Administrator sets VF <n> to VLAN 100 B) Administrator sets VF <x> to VLAN 100 C) Administrator sets VF <n> to VLAN 200 D) The VF <n> driver continues to be able to receive traffic on VLAN 100 because the VLVFB pool enable bit for that VF was left set instead of being cleared as it should be. This fix ensures that the old VLAN filter for VF <n> is first removed and the pool bit enable for VF <n> is cleared so that it no longer receives traffic on VLAN 100. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17ixgbe: bump version numberDon Skidmore1-1/+1
Bump the version number reflect the corresponding functionality in the out of tree driver. Signed-of-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>
2013-04-17ixgbe: Fix 1G link WoLDon Skidmore3-2/+8
We reset during the shutdown path which will reset AUTOC register. This would change LMS to 10G. If we were currently linked at 1G we will lose link, which is a bad thing if we wanted WoL to work. For the fix I needed to know if WoL is supported so I created a new bool in the ixgbe_hw struct. If this is set we will not allow the reset to change the current LMS value in AUTOC. 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>