summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mlx4_en: map entire pages to increase throughputThadeu Lima de Souza Cascardo2012-07-192-109/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In its receive path, mlx4_en driver maps each page chunk that it pushes to the hardware and unmaps it when pushing it up the stack. This limits throughput to about 3Gbps on a Power7 8-core machine. One solution is to map the entire allocated page at once. However, this requires that we keep track of every page fragment we give to a descriptor. We also need to work with the discipline that all fragments will be released (in the sense that it will not be reused by the driver anymore) in the order they are allocated to the driver. This requires that we don't reuse any fragments, every single one of them must be reallocated. We do that by releasing all the fragments that are processed and only after finished processing the descriptors, we start the refill. We also must somehow guarantee that we either refill all fragments in a descriptor or none at all, without resorting to giving up a page fragment that we would have already given. Otherwise, we would break the discipline of only releasing the fragments in the order they were allocated. This has passed page allocation fault injections (restricted to the driver by using required-start and required-end) and device hotplug while 16 TCP streams were able to deliver more than 9Gbps. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: initialize dynamic sysfs attributes for lockdepMichal Schmidt2012-07-191-0/+1
| | | | | | | | | | Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in .data! Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: e100: ucode is optional in some casesBjørn Mork2012-07-191-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 9ac32e1b firmware: convert e100 driver to request_firmware() did a straight conversion of the in-driver ucode to external files. This introduced the possibility of the driver failing to enable an interface due to missing ucode. There was no evaluation of the importance of the ucode at the time. Based on comments in earlier versions of this driver, and in the source code for the FreeBSD fxp driver, we can assume that the ucode implements the "CPU Cycle Saver" feature on supported adapters. Although generally wanted, this is an optional feature. The ucode source is not available, preventing it from being included in free distributions. This creates unnecessary problems for the end users. Doing a network install based on a free distribution installer requires the user to download and insert the ucode into the installer. Making the ucode optional when possible improves the user experience and driver usability. The ucode for some adapters include a bugfix, making it essential. We continue to fail for these adapters unless the ucode is available. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* asix: AX88172A driver depends on phylibChristian Riesch2012-07-191-0/+1
| | | | | | | | | | | | Since commit 16626b0cc3d5afe250850f96759b241f8a403b52 the asix driver depends on the phylib. Select phylib when the asix driver is selected. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: kernel-janitors@vger.kernel.org Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Tested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* asix: Add support for programming the EEPROMChristian Riesch2012-07-194-0/+87
| | | | | | | | This patch adds the asix_set_eeprom() function to provide support for programming the configuration EEPROM via ethtool. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* asix: Rework reading from EEPROMChristian Riesch2012-07-194-32/+24
| | | | | | | | | | | | | | | | The current code for reading the EEPROM via ethtool in the asix driver has a few issues. It cannot handle odd length values (accesses must be aligned at 16 bit boundaries) and interprets the offset provided by ethtool as 16 bit word offset instead as byte offset. The new code for asix_get_eeprom() introduced by this patch is modeled after the code in drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c and provides read access to the entire EEPROM with arbitrary offsets and lengths. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Add ip version to dts bindingsDinh Nguyen2012-07-191-2/+6
| | | | | | | | | Because there are multiple variants to the stmmac/dwmac driver, the dts bindings should be updated to include version of the IP used. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: Set vlan_feature on net_devicebrenohl@br.ibm.com2012-07-191-0/+4
| | | | | | | | | | cxgb3 interface has a bad performance when VLAN is set. On my current setup, a PowerLinux 7R2, I am able to get around 7 Gbps on a TCP_STREAM (8 instances, 4k message). With this patch, I am able to reach 9.5 Gbps. Signed-off-by: Breno Leitao <brenohl@br.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4_en: Add accelerated RFS supportAmir Vadai2012-07-194-1/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | Use RFS infrastructure and flow steering in HW to keep CPU affinity of rx interrupts and application per TCP stream. A flow steering filter is added to the HW whenever the RFS ndo callback is invoked by core networking code. Because the invocation takes place in interrupt context, the actual setup of HW is done using workqueue. Whenever new filter is added, the driver checks for expiry of existing filters. Since there's window in time between the point where the core RFS code invoked the ndo callback, to the point where the HW is configured from the workqueue context, the 2nd, 3rd etc packets from that stream will cause the net core to invoke the callback again and again. To prevent inefficient/double configuration of the HW, the filters are kept in a database which is indexed using hash function to enable fast access. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* {NET,IB}/mlx4: Add rmap support to mlx4_assign_eqAmir Vadai2012-07-193-3/+15
| | | | | | | | | Enable callers of mlx4_assign_eq to supply a pointer to cpu_rmap. If supplied, the assigned IRQ is tracked using rmap infrastructure. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4: Move MAC_MASK to a common placeAmir Vadai2012-07-194-7/+4
| | | | | | | | Define this macro is one common place instead of duplicating it over the code Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Cleanup holes in flags after removing several of themAlexander Duyck2012-07-181-25/+25
| | | | | | | | | | This change is just meant to defragment the flags as there are several hole that have been introduced since several features, or the flags for them, have been removed. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Retire RSS enabled and capable flagsAlexander Duyck2012-07-184-37/+8
| | | | | | | | | | | All of our hardware supports RSS even if it is only for a single queue. So instead of toting around the RSS enable flag I am updating the code so that all devices are enabled and if we want to disable RSS it is indicated via the RSS mask. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Add support for SR-IOV w/ DCB or RSSAlexander Duyck2012-07-184-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 <gregory.v.rose@intel.com> Cc: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Update configure virtualization to allow for multiple PF poolsAlexander Duyck2012-07-181-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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparamAlexander Duyck2012-07-181-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 <alexander.h.duyck@intel.com> Acked-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>
* ixgbevf: Consolidate Tx context descriptor creation codeAlexander Duyck2012-07-182-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 <alexander.h.duyck@intel.com> 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>
* ixgbevf: Add netdev to ring structureAlexander Duyck2012-07-183-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 <alexander.h.duyck@intel.com> 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>
* ixgbevf: Do not rewind the Rx ring before bumping tailAlexander Duyck2012-07-181-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 <alexander.h.duyck@intel.com> 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>
* ixgbevf: fix VF untagging when 802.1 prio is setPascal Bouchareine2012-07-181-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 <pascal@gandi.net> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* team: refine IFF_XMIT_DST_RELEASE capabilityJiri Pirko2012-07-181-0/+5
| | | | | | | | | | | | | | | | Cloned patch of Eric Dumazet for bonding. Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability on output net device, avoiding dirtying dst refcount. team currently disables IFF_XMIT_DST_RELEASE unconditionally. If all ports have the IFF_XMIT_DST_RELEASE bit set, then team dev can also have it in its priv_flags. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver: net: ethernet: cpsw: runtime PM supportMugunthan V N2012-07-181-9/+14
| | | | | | | Enabling runtime PM support for cpsw driver Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver: net: ethernet: davinci_mdio: runtime PM supportMugunthan V N2012-07-181-13/+12
| | | | | | | Enabling runtime PM support for davinci mdio driver Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* jme: netpoll supportPeter Wu2012-07-181-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 <lekensteyn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: davinci_emac: add OF supportHeiko Schocher2012-07-181-1/+88
| | | | | | | | | | | | | | | | | | add OF support for the davinci_emac driver. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: netdev@vger.kernel.org Cc: davinci-linux-open-source@linux.davincidsp.com Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Anatoly Sivov <mm05@mail.ru> Cc: David Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* ISDN: Add check for usb_alloc_urb() resultKarsten Keil2012-07-182-10/+26
| | | | | | | | | usb_alloc_urb() return value needs to be checked to avoid later NULL pointer access. Reported by rucsoftsec@gmail.com via bugzilla.kernel.org #44601. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ISDN: Add check for return value of pnp_activate_dev()Karsten Keil2012-07-181-0/+5
| | | | | | | | | pnp_activate_dev() return value needs to be checked to make sure that following calls calls to the PNP functions do work correctly. Fix for report #44491 on bugzilla.kernel.org. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: fix an "&&" vs "||" bugDan Carpenter2012-07-181-1/+1
| | | | | | | | The condition is always true so WOL will never work. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ftgmac100/ftmac100: dont pull too much dataEric Dumazet2012-07-182-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 <edumazet@google.com> Cc: Po-Yu Chuang <ratbert@faraday-tech.com> Acked-by: Yan-Pai Chen <yanpai.chen@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: qmi_wwan: add ZTE MF821DBjørn Mork2012-07-181-0/+9
| | | | | | | | Sold by O2 (telefonica germany) under the name "LTE4G" Tested-by: Thomas Schäfer <tschaefer@t-online.de> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* asix: Fix return value in AX88172A driver bind functionChristian Riesch2012-07-181-0/+1
| | | | | | | | Return -ENOTSUPP if the initialization fails because the device is configured for a mode that is not supported by the driver. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: refine IFF_XMIT_DST_RELEASE capabilityEric Dumazet2012-07-181-0/+5
| | | | | | | | | | | | | | | | Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability on output net device, avoiding dirtying dst refcount. bonding currently disables IFF_XMIT_DST_RELEASE unconditionally. If all slaves have the IFF_XMIT_DST_RELEASE bit set, then bonding master can also have it in its priv_flags Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: qmi_wwan: make dynamic device IDs workBjørn Mork2012-07-181-1/+18
| | | | | | | | | | | | | | | | | | | | The usbnet API use the device ID table to store a pointer to a minidriver. Setting a generic pointer for dynamic device IDs will in most cases make them work as expected. usbnet will otherwise treat the dynamic IDs as blacklisted. That is rarely useful. There is no standard class describing devices supported by this driver, and most vendors don't even provide enough information to allow vendor specific wildcard matching. The result is that most of the supported devices must be explicitly listed in the device table. Allowing dynamic IDs to work both simplifies testing and verification of new devices, and provides a way for end users to use a device before the ID is added to the driver. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* b44: add 64 bit statsKevin Groeneveld2012-07-182-41/+58
| | | | | | | | Add support for 64 bit stats to Broadcom b44 ethernet driver. Signed-off-by: Kevin Groeneveld <kgroeneveld@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: Ignore physical link async event for LancerPadmanabh Ratnakar2012-07-182-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 <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: Fix VF driver load for LancerPadmanabh Ratnakar2012-07-182-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 <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2012-07-184-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 <davem@davemloft.net>
| * ixgbevf: Update descriptor macros to accept pointers and drop _ADV suffixAlexander Duyck2012-07-172-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 <alexander.h.duyck@intel.com> 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>
| * ixgbe: Cleanup logic for MRQC and MTQC configurationAlexander Duyck2012-07-171-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 <john.r.fastabend@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Update the logic for ixgbe_cache_ring_dcb and DCB RSS configurationAlexander Duyck2012-07-172-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 <john.r.fastabend@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Move configuration of set_real_num_rx/tx_queues into openAlexander Duyck2012-07-172-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 <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources callsAlexander Duyck2012-07-171-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 <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Ping the VFs on link status change to trigger link changeAlexander Duyck2012-07-171-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 <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | Merge branch 'davem-next.r8169' of git://violet.fr.zoreil.com/romieu/linuxDavid S. Miller2012-07-181-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 <davem@davemloft.net>
| * | r8169: verbose error message.Francois Romieu2012-07-171-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Hayes Wang <hayeswang@realtek.com>
| * | r8169: remove rtl_ocpdr_cond.Hayes Wang2012-07-171-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 <hayeswang@realtek.com> Tested-by: Francois Romieu <romieu@fr.zoreil.com>
* | Merge branch 'for-davem' of ↵David S. Miller2012-07-1814-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 <davem@davemloft.net>
| * sfc: Correct some comments on enum reset_typeBen Hutchings2012-07-171-4/+4
| | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * sfc: Fix interface statistics running backwardBen Hutchings2012-07-173-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 <bhutchings@solarflare.com>
| * sfc: Disable VF queues during register self-testBen Hutchings2012-07-175-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 <bhutchings@solarflare.com>