aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel
AgeCommit message (Collapse)AuthorFilesLines
2011-10-17igb: Check if subordinate VFs are assigned to virtual machinesGreg Rose2-30/+150
Kvm and the Xen pci-back driver will set a flag in the virtual function pci device dev_flags when the VF is assigned to a guest VM. Before destroying subordinate VFs check to see if the flag is set and if so skip the call to pci_disable_sriov() to avoid system crashes. Copy the maintainer for the Xen pci-back driver. Also CC'ing maintainers of all drivers found to call pci_disable_sriov(). V2 - Fix uninitialized variable warning Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Christian Benvenuti <[email protected]> Cc: Sathya Perla <[email protected]> Cc: Dimitris Michailidis <[email protected]> Cc: Jon Mason <[email protected]> Cc: James Smart <[email protected]> Signed-off-by: Greg Rose <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-17igbvf: Fix trunk vlanGreg Rose1-2/+2
Changes to clean up the VLAN Rx path by Jiri Pirko broke trunk VLAN. Trunk VLANs in a VF driver are those set using "ip link set <pfdev> vf <n> <vlanid>" Signed-off-by: Greg Rose <[email protected]> CC: Jiri Pirko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-16igbvf: convert to ndo_fix_featuresMichał Mirosław2-62/+20
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM. Removing this needs deeper surgery. Things noticed: - HW VLAN acceleration probably can be toggled, but it's left as is - the resets on RX csum offload change can probably be avoided - there is A LOT of copy-and-pasted code here Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-16igb: enable l4 timestamping for v2 event packetsJacob Keller1-0/+1
When enabling hardware timestamping for ptp v2 event packets, the software does not setup the queue for l4 packets, although layer 4 packets are valid for v2. This patch adds the flag which enables setting up a queue and enabling udp packet timestamping. Signed-off-by: Jacob E Keller <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-16ixgbe: Add new netdev op to turn spoof checking on or off per VFGreg Rose4-10/+52
Implements the new netdev op to allow user configuration of spoof checking on a per VF basis. V2 - Change netdev spoof check op setting to bool Signed-off-by: Greg Rose <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-16e1000e: locking bug introduced by commit 67fd4fcbBruce Allan2-8/+14
Commit 67fd4fcb (e1000e: convert to stats64) added the ability to update statistics more accurately and on-demand through the net_device_ops .ndo_get_stats64 hook, but introduced a locking bug on 82577/8/9 when linked at half-duplex (seen on kernels with CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_PROVE_LOCKING=y). The commit introduced code paths that caused a mutex to be locked in atomic contexts, e.g. an rcu_read_lock is held when irqbalance reads the stats from /sys/class/net/ethX/statistics causing the mutex to be locked to read the Phy half-duplex statistics registers. The mutex was originally introduced to prevent concurrent accesses of resources (the NVM and Phy) shared by the driver, firmware and hardware a few years back when there was an issue with the NVM getting corrupted. It was later split into two mutexes - one for the NVM and one for the Phy when it was determined the NVM, unlike the Phy, should not be protected by the software/firmware/hardware semaphore (arbitration of which is done in part with the SWFLAG bit in the EXTCNF_CTRL register). This latter semaphore should be sufficient to prevent resource contention of the Phy in the driver (i.e. the mutex for Phy accesses is not needed), but to be sure the mutex is replaced with an atomic bit flag which will warn if any contention is possible. Also add additional debug output to help determine when the sw/fw/hw semaphore is owned by the firmware or hardware. Signed-off-by: Bruce Allan <[email protected]> Reported-by: Francois Romieu <[email protected]> Tested-by: Jeff Pieper <[email protected]>
2011-10-13e1000e: fix skb truesize underestimationEric Dumazet1-2/+2
e1000e allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <[email protected]> CC: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-13ixgbe: fix skb truesize underestimationEric Dumazet1-1/+1
ixgbe allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <[email protected]> CC: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-13igb: fix skb truesize underestimationEric Dumazet1-1/+1
e1000 allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-13e1000: fix skb truesize underestimationEric Dumazet1-1/+1
e1000 allocates a full page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-12igb: Version bump.Carolyn Wyborny1-2/+2
This change updates the driver version to 3.2.10. Signed-off-by: Carolyn Wyborny <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: Loopback functionality supports for i350 devicesAkeem G. Abodunrin2-6/+24
This patch adds VMDq loopback pf support for i350 devices. The patch is necessary since the register that enabled loopback was moved and renamed from DTXSWC to TXSWC. Signed-off-by: "Akeem G. Abodunrin" <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: fix static function warnings reported by sparseEmil Tantilov1-6/+3
igb_update/validate_nvm_checksum_with_offset() should be static. Also removes unneeded prototypes for the above functions. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: Add workaround for byte swapped VLAN on i350 local trafficAlexander Duyck3-6/+25
On i350 when traffic is looped back from a VF to the PF the value is byte swapped from the normal format. In order to address this we need to add a flag indicating that the ring will need to byte swap the loopback packets prior to processing them. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: Drop unnecessary write of E1000_IMS from igb_msix_otherAlexander Duyck1-6/+0
Since we mask interrupts in EIMS not in IMS there is no need to re-enable mask bits in that register. As such we can remove the write to IMS from the end of igb_msix_other. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: Fix features that are currently 82580 only and should also be i350Alexander Duyck1-9/+6
This change allows support for per packet timesync and global device reset on the i350 adapter. These features were supported on both 82580 and i350 however it looks like several checks where not updated and as such the i350 support was not enabled. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: Make certain one vector is always assigned in igb_request_irqAlexander Duyck1-6/+6
This change makes certain that one interrupt is always initialized in igb_request_irq. In addition we drop the use of adapter->pdev and instead just call pdev since we made a local copy of the pointer earlier in the function. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12igb: avoid unnecessarily creating a local copy of the q_vectorAlexander Duyck1-29/+17
This is mostly a drop of unnecessary pointer defines for q_vector when we don't have issues with line width and don't have multiple references to the pointer. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12ixgbe: Correct check for change in FCoE priorityMark Rustad1-2/+10
Correct a check for change in FCoE priority when IEEE mode DCB is in use. In IEEE mode a different function has to be used to get the FCoE priority mask. Also, the check for the mask assumed that only one priority was set. In case there should be more than one, check just the bit. These changes help avoid link flapping issues that can come up when IEEE DCB is in use. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12ixgbe: Add FCoE DDP allocation failure counters to ethtool stats.Amir Hanania5-11/+56
Add 2 new counters to ethtool: 1. Count DDP allocation failure since we max the number of buffers allowed in one DDP context. 2. Count DDP allocation failure since we max the number of buffers allowed in one DDP context when we alloc an extra buffer. Signed-off-by: Amir Hanania <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-12ixgbe: Add protection from VF invalid target DMAGreg Rose2-1/+175
It is possible for a VF to set an invalid target DMA address in its Tx/Rx descriptor buffer pointers. The workarounds in this patch will guard against such an event and issue a VFLR to the VF in response. The VFLR will shut down the VF until an administrator can take action to investigate the event and correct the problem. Signed-off-by: Greg Rose <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller4-334/+411
2011-10-07igb: add support for NETIF_F_RXHASHAlexander Duyck1-17/+35
This patch adds support for Rx hashing. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: move TX hang check flag into ring->flagsAlexander Duyck2-4/+3
This change moves the Tx hang check into the ring flags. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: fix recent VLAN changes that would leave VLANs disabled after resetAlexander Duyck1-14/+4
This patch cleans up several issues with VLANs on igb after the recent changes that were meant to leave the VLANs enabled/disable via the netdev->features flags. Specifically the Rx VLAN settings were being dropped after reset due to the fact that they were not being restored correctly. In addition I removed the IRQ disable/enable since those were in place to protect the setting of vlgrp. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: leave staterr in place and instead us a helper function to check bitsAlexander Duyck3-28/+39
Instead of doing a byte swap on the staterr bits in the Rx descriptor we can save ourselves a bit of space and some CPU time by instead just testing for the various bits out of the Rx descriptor directly. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: retire the RX_CSUM flag and use the netdev flag insteadAlexander Duyck2-17/+6
Since the netdev now has its' own checksum flag to indicate if Rx checksum is enabled we might as well use that instead of using the ring flag. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: cleanup IVAR configurationAlexander Duyck1-64/+56
This change is meant to cleanup some of the IVAR register configuration. igb_assign_vector had become pretty large with multiple copies of the same general code for setting the IVAR. This change consolidates most of that code by adding the igb_write_ivar function which allows us just to compute the index and offset and then use that information to setup the IVAR. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: Move ITR related data into work container within the q_vectorAlexander Duyck4-123/+118
This change moves information related to interrupt throttle rate configuration into a separate q_vector sub-structure called a work container. A similar change has already been made for ixgbe and this work is based off of that. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: Consolidate all of the ring feature flags into a single valueAlexander Duyck2-14/+19
This change moves all of the ring flags into a single value. The advantage to this is that there is one central area for all of these flags and they can all make use of the set/test bit operations. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: avoid unnecessary conversions from u16 to intAlexander Duyck2-7/+7
There are a number of places where we have values that are stored as u16 but are being converted to int unnecessarily. In order to avoid that we should convert all variables that deal with the next_to_clean, next_to_use, and count to u16 values. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: Use node specific allocations for the q_vectors and ringsAlexander Duyck2-5/+79
This change is meant to update the ring and vector allocations so that they are per node instead of allocating everything on the node that ifconfig/modprobe is called on. By doing this we can cut down significantly on cross node traffic. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07igb: push data into first igb_tx_buffer sooner to reduce stack usageAlexander Duyck2-50/+54
Instead of storing most of the data for the TX hot path in the stack until we are ready to write the descriptor we can save ourselves some time and effort by pushing the SKB, tx_flags, gso_size, bytecount, and protocol into the first igb_tx_buffer since that is where we will end up putting it anyway. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones8-32/+0
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-07igb: consolidate creation of Tx buffer info and data descriptorAlexander Duyck2-142/+184
This change will combine the writes of tx_buffer_info and the Tx data descriptors into a single function. The advantage of this is that we can avoid needless memory reads from the buffer info struct and speed things up by keeping the accesses to the local registers. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Combine all flag info fields into a single tx_flags structureAlexander Duyck2-16/+17
This change is meant to combine all of the TX flags fields into one u32 flags field so that it can be stored into the tx_buffer_info structure. This includes the time stamp flag as well as mapped_as_page flag info. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Cleanup protocol handling in transmit pathAlexander Duyck1-12/+11
This change is meant to cleanup the protocol handling in the transmit path so that it correctly offloads software VLAN tagged frames. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Create separate functions for generating cmd_type and olinfoAlexander Duyck3-44/+65
This change is meant to improve the readability of the driver by separating out the cmd_type configuration and the olinfo configuration into their own functions. By doing this it is much easier to determine which ingredients go into setting up these to portions of the descriptor. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Make first and tx_buffer_info->next_to_watch into pointersAlexander Duyck2-31/+37
This change converts two tx_buffer_info index values into pointers. The advantage to this is that we reduce unnecessary computations and in the case of next_to_watch we get an added bonus of the value being able to provide additional information as a NULL value indicates it is unset versus a 0 not having any meaning for the index value. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Consolidate creation of Tx context descriptors into a single functionAlexander Duyck1-127/+106
This patch is meant to simplify the transmit path by reducing the overhead for creating a transmit context descriptor. The current implementation is split with igb_tso and igb_tx_csum doing two separate implementations on how to setup the tx_buffer_info structure and the tx_desc. By combining them it is possible to reduce code and simplify things since now only one function will create context descriptors. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: split buffer_info into tx_buffer_info and rx_buffer_infoAlexander Duyck3-88/+92
In order to be able to improve the performance of the TX path it has been necessary to add addition info to the tx_buffer_info structure. However a side effect is that the structure has gotten larger and this in turn has also increased the size of the RX buffer info structure. In order to avoid this in the future I am splitting the single buffer_info structure into two separate ones and instead I will join them by making the buffer_info pointer in the ring a union of the two. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Make Tx budget for NAPI user adjustableAlexander Duyck3-53/+87
This change is to make the NAPI budget limits for transmit adjustable. Currently they are only set to 128, and when the changes/improvements to NAPI occur to allow for adjustability, it would be possible to tune the value for optimal performance with applications such as routing. v2: remove tie between NAPI and interrupt moderation fix work limit define name (s/IXGBE/IGB/) Update patch description to better reflect patch Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Tested-by: Aaron Brown <[email protected]>
2011-10-06e1000e: bad short packets received when jumbos enabled on 82579Bruce Allan1-1/+1
When short packets are received with jumbos enabled on 82579, they can be interpreted to have a receive address that does not match any configured address. This is due to a hardware bug that can be worked around by reducing the number of IPG octets added when the packet is transferred from the PHY to the MAC. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06e1000: convert to private mutex from rtnlJesse Brandeburg2-9/+31
The e1000 driver when running with lockdep could run into some possible deadlocks between the work items acquiring rtnl and the rtnl lock being acquired before work items were cancelled. Use a private mutex to make sure lock ordering isn't violated. The private mutex is only used to protect areas not generally covered by the rtnl lock already. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Thomas Gleixner <[email protected]> CC: Tushar Dave <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06e1000: convert mdelay to msleepJesse Brandeburg2-12/+12
With the previous commit, there are several functions that are only ever called from thread context, and are able to sleep with msleep instead of mdelay. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Thomas Gleixner <[email protected]> CC: Tushar Dave <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06e1000: convert hardware management from timers to threadsJesse Brandeburg2-84/+55
Thomas Gleixner (tglx) reported that e1000 was delaying for many milliseconds (using mdelay) from inside timer/interrupt context. None of these paths are performance critical and can be moved into threads/work items. This patch implements the work items and the next patch changes the mdelays to msleeps. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Thomas Gleixner <[email protected]> CC: Tushar Dave <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06ixgbe: bump version numberDon Skidmore1-2/+2
Bump the version string to better match pair up with the out of tree driver that contains the same functionality. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Alternate MAC Address Updates for Func2&3Akeem G. Abodunrin1-0/+5
Only function 1 has support for Alternate MAC Address in the EEPROM before, this update now allow function 2 and 3 to have support for Alternate MAC Address in the EEPROM. Signed-off-by: "Akeem G. Abodunrin" <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Alternate MAC Address EEPROM UpdatesAkeem G. Abodunrin1-2/+2
This code check word 0x37 in the EEPROM, if it is 0xFFFF _or_ 0x0000, then there is no Alternate MAC Address in the EEPROM. Signed-off-by: "Akeem G. Abodunrin" <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-10-06igb: Code to prevent overwriting SFP I2CAkeem G. Abodunrin1-0/+6
This patch fixes "overwrite" problem. without this fix, SFP I2C EEPROM data, which is located at A0 can be overwritten by the phy write function. Signed-off-by: "Akeem G. Abodunrin" <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>