aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
AgeCommit message (Collapse)AuthorFilesLines
2012-07-18ixgbe: Add support for SR-IOV w/ DCB or RSSAlexander Duyck4-47/+423
This change essentially makes it so that we can enable almost all of the features all at once. This patch allows for the combination of SR-IOV, DCB, and FCoE in the case of the x540. It also beefs up the SR-IOV by adding support for RSS to the PF. The testing matrix gets to be very complex for this patch as there are a number of different features and subsets for queueing options. I tried to narrow these down a bit by restricting the PF to only supporting 4TC DCB when it is enabled in addition to SR-IOV. Cc: Greg Rose <[email protected]> Cc: John Fastabend <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbe: Update configure virtualization to allow for multiple PF poolsAlexander Duyck1-12/+12
This change allows all pools from the default pool forward to be enabled vi ixgbe_configure_virtualization. This is needed as we are planning to use queues belonging to adjacent pools for FCoE when SR-IOV and FCoE are both enabled. In addition this patch contains some minor formatting changes as there were a few spots that seemed to be in need of some cleanup. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparamAlexander Duyck1-70/+83
In ixgbevf_get_ringparam we could run into a NULL pointer dereference if the rings were not allocated when we attempted the call. To prevent that we can just access the tx/rx_ring_count values instead of attempting to access the rings to get the count. This change corrects a memory leak and memory corruption in ixgbevf_set_ringparam. The memory leak was due to us not freeing the resources from the ring before overwriting them. This change corrects the memory leak by making certain to call ixgbe_free_tx/rx_resources on the rings prior to freeing them. The memory corruption was because we were replacing the rings but not updating the q_vectors. It addresses the memory corruption by leaving the rings in place and instead just copying the contents of the new rings into the existing rings. Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbevf: Consolidate Tx context descriptor creation codeAlexander Duyck2-180/+163
There is a good bit of redundancy between the Tx checksum and segmentation offloads. In order to reduce some of this I am moving the code for creating a context descriptor into a separate function. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbevf: Add netdev to ring structureAlexander Duyck3-34/+28
This change adds the netdev to the ring structure. This allows for a quicker transition from ring to netdev without having to go from ring to adapter to netdev. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbevf: Do not rewind the Rx ring before bumping tailAlexander Duyck1-5/+2
The driver is going back one step from its' previous location before bumping tail. This is incorrect. We should just be writing the value of next_to_use into the tail register. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18ixgbevf: fix VF untagging when 802.1 prio is setPascal Bouchareine1-1/+1
We have had an issue when using ixgbe+ixgbevf and 802.1 VLAN tagging. When attaching a VLAN to a VF, frames with a 802.1q priority appeared untagged on the VF hence not reaching the VLAN, where frames with priority 0 where tagged as expected and seen by the VLAN device. This seems due to the way ixgbevf is looking up the full tag (prio+cfi+vlan) against the adapter active_vlans, as a condition to mark the skb tagged. Signed-off-by: Pascal Bouchareine <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-18tilegx net: use eth_hw_addr_random(), not eth_random_addr()Chris Metcalf1-1/+1
Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18tilegx net driver: handle payload data not in fragsChris Metcalf1-18/+18
The original driver implementation assumed that for TSO, all the payload data would be in the frags. This isn't always true; change the driver to support payload data at skb->data between "skb_transport_offset(skb) + tcp_hdrlen(skb)" and "skb->hdr_len", followed by the data in the frags. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18net: tilegx driver bugfix (be explicit about percpu queue number)Chris Metcalf1-8/+15
Avoid packets belonging to queue/cpu A trying to transmit on cpu B. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18driver: net: ethernet: cpsw: runtime PM supportMugunthan V N1-9/+14
Enabling runtime PM support for cpsw driver Signed-off-by: Mugunthan V N <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18driver: net: ethernet: davinci_mdio: runtime PM supportMugunthan V N1-13/+12
Enabling runtime PM support for davinci mdio driver Signed-off-by: Mugunthan V N <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18jme: netpoll supportPeter Wu1-0/+14
This patch adds the netpoll function to support netconsole. Tested and works fine on my "JMC250 PCI Express Gigabit Ethernet Controller" (PCI ID 0250). Signed-off-by: Peter Wu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18net: ethernet: davinci_emac: add OF supportHeiko Schocher1-1/+88
add OF support for the davinci_emac driver. Signed-off-by: Heiko Schocher <[email protected]> Acked-by: Sekhar Nori <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Wolfgang Denk <[email protected]> Cc: Anatoly Sivov <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18qlge: fix an "&&" vs "||" bugDan Carpenter1-1/+1
The condition is always true so WOL will never work. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jitendra Kalsaria <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18net: ftgmac100/ftmac100: dont pull too much dataEric Dumazet2-6/+14
Drivers should pull only ethernet header from page frag to skb->head. Pulling 64 bytes is too much for TCP (without options) on IPv4. However, it makes sense to pull all the frame if it fits the 128 bytes bloc allocated for skb->head, to free one page per small incoming frame. Signed-off-by: Eric Dumazet <[email protected]> Cc: Po-Yu Chuang <[email protected]> Acked-by: Yan-Pai Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18b44: add 64 bit statsKevin Groeneveld2-41/+58
Add support for 64 bit stats to Broadcom b44 ethernet driver. Signed-off-by: Kevin Groeneveld <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18be2net: Ignore physical link async event for LancerPadmanabh Ratnakar2-0/+6
The ability of driver to transmit packets depends on logical state of the link. Ignore physical link status. Signed-off-by: Padmanabh Ratnakar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18be2net: Fix VF driver load for LancerPadmanabh Ratnakar2-1/+9
Lancer FW has added new capability checks for VFs. Driver should only use those capabilities which are allowed for VFs. Signed-off-by: Padmanabh Ratnakar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18Merge branch 'master' of ↵David S. Miller4-175/+183
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jerr Kirsher says: ==================== This series contains updates to ixgbe & ixgbevf. ... Alexander Duyck (6): ixgbe: Ping the VFs on link status change to trigger link change ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources calls ixgbe: Move configuration of set_real_num_rx/tx_queues into open ixgbe: Update the logic for ixgbe_cache_ring_dcb and DCB RSS configuration ixgbe: Cleanup logic for MRQC and MTQC configuration ixgbevf: Update descriptor macros to accept pointers and drop _ADV suffix ==================== Signed-off-by: David S. Miller <[email protected]>
2012-07-18Merge branch 'davem-next.r8169' of git://violet.fr.zoreil.com/romieu/linuxDavid S. Miller1-12/+3
Francois Romieu says: ==================== Francois Romieu (1): r8169: verbose error message. Hayes Wang (1): r8169: remove rtl_ocpdr_cond. ==================== Signed-off-by: David S. Miller <[email protected]>
2012-07-18Merge branch 'for-davem' of ↵David S. Miller14-153/+181
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next Ben Hutchings says: ==================== 1. Fix potential badness when running a self-test with SR-IOV enabled. 2. Fix calculation of some interface statistics that could run backward. 3. Miscellaneous cleanup. ==================== Signed-off-by: David S. Miller <[email protected]>
2012-07-17ixgbevf: Update descriptor macros to accept pointers and drop _ADV suffixAlexander Duyck2-15/+15
This change updates the descriptor macros to accept pointers, updates the name to drop the _ADV suffix, and include the IXGBEVF name in the macro. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbe: Cleanup logic for MRQC and MTQC configurationAlexander Duyck1-50/+66
This change is meant to make the code much more readable for MTQC and MRQC configuration. The big change is that I simplified much of the logic so that we are essentially handling just 4 cases and their variants. In the cases where RSS is disabled we are actually just programming the RETA table with all 1s resulting in a single queue RSS. In the case of SR-IOV I am treating that as a subset of VMDq. This all results int he following configuration for the hardware: DCB En Dis VMDq En VMDQ/DCB VMDq/RSS Dis DCB/RSS RSS Cc: John Fastabend <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbe: Update the logic for ixgbe_cache_ring_dcb and DCB RSS configurationAlexander Duyck2-50/+42
This change cleans up some of the logic in an attempt to try and simplify things for how we are configuring DCB w/ RSS. In this patch I basically did 3 things. I updated the logic for getting the first register index. I applied the fact that all TCs get the same number of queues to simplify the looping logic in caching the DCB ring register. Finally I updated how we configure the RQTC register to match the fact that all TCs are assigned the same number of queues. Cc: John Fastabend <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbe: Move configuration of set_real_num_rx/tx_queues into openAlexander Duyck2-56/+38
It makes much more sense for us to configure the real number of Tx and Rx queues in the ixgbe_open call than it does in ixgbe_set_num_queues. By setting the number in ixgbe_open we can avoid a number of unecessary updates and only have to make the calls once. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources callsAlexander Duyck1-4/+16
Previously we were exiting without cleaning up the memory internally on the ixgbe_setup_rx_resources and ixgbe_setup_tx_resources calls. Instead of forcing the caller to clean things up for us we should instead just unwind the rings and free the memory as we go. This way we can more gracefully clean up the rings in the event of an allocation failure. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbe: Ping the VFs on link status change to trigger link changeAlexander Duyck1-0/+6
When the link status changes on the PF we need to notify the VFs. In order to do this we should ping all of the VFs in order to trigger a link status change on them as well. This fixes issues in which the PF would reset, but the VF didn't because the NAK flag was not set in the VF mailbox. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17r8169: verbose error message.Francois Romieu1-1/+2
Signed-off-by: Francois Romieu <[email protected]> Cc: Hayes Wang <[email protected]>
2012-07-17r8169: remove rtl_ocpdr_cond.Hayes Wang1-11/+1
It is not needed for mac_ocp_{write / read}. Actually bit 31 of OCPDR does not change and r8168_mac_ocp_read always returns ~0. Signed-off-by: Hayes Wang <[email protected]> Tested-by: Francois Romieu <[email protected]>
2012-07-178250: three way resolve of the 8250 diffsAlan Cox1-10/+12
This resolves the differences between the original 8250 patch, the revised 8250 patch and the independant clean up of the octeon driver (to use platform devices properly yay!) Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-17sfc: Correct some comments on enum reset_typeBen Hutchings1-4/+4
Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Fix interface statistics running backwardBen Hutchings3-10/+28
Some interface statistics are computed in such a way that they can sometimes decrease (and even underflow). Since the computed value will never be greater than the true value, we fix this by only storing the computed value when it increases. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Disable VF queues during register self-testBen Hutchings5-60/+76
Currently VF queues and drivers may remain active during this test. This could cause memory corruption or spurious test failures. Therefore we reset the port/function before running these tests on Siena. On Falcon this doesn't work: we have to do some additional initialisation before some blocks will work again. So refactor the reset/register-test sequence into an efx_nic_type method so efx_selftest() doesn't have to consider such quirks. In the process, fix another minor bug: Siena does not have an 'invisible' reset and the self-test currently fails to push the PHY configuration after resetting. Passing RESET_TYPE_ALL to efx_reset_{down,up}() fixes this. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Explain why efx_mcdi_exit_assertion() ignores result of efx_mcdi_rpc()Ben Hutchings1-3/+8
Fix CID 113952 in Coverity report on Linux. This is the one instance where we don't, and shouldn't, check the return code from efx_mcdi_rpc(). It wasn't immediately obvious to me why we didn't, so I think an explanation is in order. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Use dev_kfree_skb() in efx_end_loopback()Ben Hutchings1-1/+1
Fix CID 102619 in the Coverity report on Linux. efx_end_loopback() iterates over an array of skb pointers of which some may be null (if efx_begin_loopback() failed). It should not use dev_kfree_skb_irq(), which requires non-null pointers. In practice this is safe because it does not run in interrupt context and therefore always ends up calling dev_kfree_skb(), which does allow null pointers. But we should make that explicit. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Use strlcpy() to copy ethtool stats namesBen Hutchings1-1/+1
Fix CID 113703 in the Coverity report on Linux. ethtool stats names are limited to 32 bytes including a null terminator. Use strlcpy() to ensure that we will always include the null terminator even if a source string becomes longer than this. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Stop changing header offsets on TXBen Hutchings1-9/+0
There is nothing in the VLAN driver or core VLAN support that invalidates the TCP and IP header offsets. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Remove dead write to tso_state::packet_spaceBen Hutchings1-1/+0
tso_state::packet_space is always set in tso_start_packet(); the value set in tso_start() is not used, and is also incorrect. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Use generic DMA API, not PCI-DMA APIBen Hutchings5-63/+62
Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17sfc: Work around bogus 'uninitialised variable' warningBen Hutchings1-1/+1
With some gcc versions & optimisations, the compiler will warn that 'depth' in efx_filter_insert_filter() may be used without being initialised, although this is not the case. This is related to inlining of efx_filter_search(), which only has one caller since commit 8db182f4a8a6e2dcb8b65905ea4af56210e65430 ('sfc: Remove now-unused filter function'). Shut the compiler up by initialising it to 0. Signed-off-by: Ben Hutchings <[email protected]>
2012-07-17ixgbevf: Use igb style interrupt masks instead of ixgbe styleAlexander Duyck3-146/+105
The interrupt registers accessed in ixgbevf are more similar to the igb style registers than they are to the ixgbe style registers. As such we would be better off setting up the code for the EICS, EIMS, EICS, EIAM, and EIAC like we do in igb instead of ixgbe. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Move Tx clean-up into NAPI contextAlexander Duyck3-182/+89
Currently the VF driver is processing all of the transmits in interrupt context. This can be messy since the Rx is all handled in NAPI and this may result in interrupts being disabled. In order to resolve this move all of the Tx packet processing into NAPI and combine all of the interrupt and polling routines into just a pair of functions. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Update q_vector to contain ring pointers instead of bitmapsAlexander Duyck2-105/+65
For most cases the ixgbevf driver will only ever contain a single Tx and single Rx queue. In order to track that it makes more sense to use a pointer instead of using a bitmap which must be search in order to locate the ring on an adapter index. As such I am changing the code to use pointers and an iterator to access all rings on a given q_vector. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Fix panic when loading driverAlexander Duyck1-0/+3
This patch addresses a kernel panic seen when setting up the interface. Specifically we see a NULL pointer dereference on the Tx descriptor cleanup path when enabling interrupts. This change corrects that so it cannot occur. Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-17ixgbevf: Cleanup accounting for space needed at start of xmit_frameAlexander Duyck1-22/+24
This change cleans up the accounting needed at the start of xmit_frame so that we can avoid doing too much work to determine how many descriptors we will need. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Drop use of eitr_low and eitr_high for hard coded valuesAlexander Duyck2-10/+4
This patch drops the use of eitr_low and eitr_high as values being stored in the adapter structure. Since the values have no external way to be changed they might as well just be hard coded values and save us the space on the adapter structure. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Make use of NETIF_F_RXCSUM instead of keeping our own flagAlexander Duyck2-20/+2
The IXGBE_FLAG_RX_CSUM_ENABLED flag is redundant since NETIF_F_RXCSUM is keeping the value we want to already have. As such we can drop the redundant flag and just make use of NETIF_F_RXCSUM. Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Drop netdev_registered value since that is already stored in netdevAlexander Duyck2-6/+1
There is no need to keep a separate netdev_registered value since that is already stored in the netdev itself. Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-07-17ixgbevf: Drop all dead or unnecessary codeAlexander Duyck3-228/+22
There is a large amount of code present in this driver to support features that either do no exist or are not supported such ask packet split, DCA, or RSC. This patch strips out almost all of that code and in the case of conditionals based on unused flags I am flatting the code out to just the path that would have been selected. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>