aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2010-12-12sungem: update gp->reset_task flushingTejun Heo
gp->reset_task_pending is always set right before reset_task is scheduled and as there is no synchronization between the setting and scheduling, busy looping on reset_task_pending before flushing reset_task doesn't really buy anything. Directly flush gp->reset_task on suspend and cancel on detach. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org
2010-12-12igb[v],ixgbe: don't use flush_scheduled_work()Tejun Heo
All three drivers use flush_scheduled_work() similarly during driver detach. Replace it with explicit cancels. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: e1000-devel@lists.sourceforge.net Cc: netdev@vger.kernel.org
2010-12-12iseries_veth: don't use flush_scheduled_work()Tejun Heo
flush_scheduled_work() is on its way out. Remove its usage from iseries_veth. * Cancelling a delayed work, queueing it for immediate execution if cancelled and then waiting for completion can be done by simply calling flush_delayed_work_sync(). * Explicitly cancel cnx->statemachine_wq on module unload. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Santiago Leon <santil@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org
2010-12-12ehea: don't use flush_scheduled_work()Tejun Heo
Directly cancel port->reset_task from ehea_shutdown_single_port() instead. As this cancels the work for each port on driver detach, flushing system_wq from ehea_remove() or ehea_module_exit() is no longer necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org
2010-12-12ehea: kill unused ehea_rereg_mr_taskTejun Heo
ehea_rereg_mr_task is not used. Remove it and drop @work parameter from ehea_rereg_mrs(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org
2010-12-12drivers/net: don't use flush_scheduled_work()Tejun Heo
flush_scheduled_work() is on its way out. This patch contains simple conversions to replace flush_scheduled_work() usage with direct cancels and flushes. Directly cancel the used works on driver detach and flush them in other cases. The conversions are mostly straight forward and the only dangers are, * Forgetting to cancel/flush one or more used works. * Cancelling when a work should be flushed (ie. the work must be executed once scheduled whether the driver is detaching or not). I've gone over the changes multiple times but it would be much appreciated if you can review with the above points in mind. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jay Cliburn <jcliburn@gmail.com> Cc: Michael Chan <mchan@broadcom.com> Cc: Divy Le Ray <divy@chelsio.com> Cc: e1000-devel@lists.sourceforge.net Cc: Vasanthy Kolluri <vkolluri@cisco.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Andrew Gallatin <gallatin@myri.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Cc: Matt Carlson <mcarlson@broadcom.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Shreyas Bhatewara <sbhatewara@vmware.com> Cc: netdev@vger.kernel.org
2010-12-12drivers/net: remove unnecessary flush_scheduled_work() callsTejun Heo
janz-ican3, sh_eth, skge and vxge don't use workqueue at all and there is no reason to flush the system_wq. Drop flush_scheduled_work() calls and references to workqueue. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Cc: Sivakumar Subramani <sivakumar.subramani@exar.com> Cc: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Cc: Jon Mason <jon.mason@exar.com> Cc: netdev@vger.kernel.org
2010-12-11net: au1000_eth: remove unused global variable.Manuel Lauss
The driver global au_macs[] is unused in the entire kernel tree, so remove it. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-11s2io: Using static const generally increases object text and decreases data ↵Jon Mason
size. It also generally decreases overall object size. text data bss dec hex filename 109387 389 24432 134208 20c40 drivers/net/s2io.o.old 109358 389 24432 134179 20c23 drivers/net/s2io.o.new Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-11s2io: Update Driver VersionJon Mason
Update Driver Version Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-11s2io: make strings at tables constJon Mason
Put immutable data in read/only section. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-11s2io: rx_ring_sz bounds checkingJon Mason
modparm rx_ring_sz can be set to be greater than the maximum allowable number of blocks. This results in an array overrun when probing the driver, and causes memory corruption. Also, the MAX_RX_DESC_1 multiply the max number of rings by max number of blocker per ring by 127, but the driver does the same calculation with 127+1. This results in the possibility of the value being set being larger than the maximum allowable value. Finally, clean-up the s2io_ethtool_gringparam code to be more intuitive. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10igb: Add new function to read part number from EEPROM in string formatCarolyn Wyborny
New adapters will have part numbers stored in string format rather than simple hex format. This function will read part number formats in either hex or string. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: increment the driver versionBruce Allan
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: static analysis tools complain of a possible null ptr p dereferenceBruce Allan
Adding this default case resolves the issue. v2- Removed "break" in default case based on feedback Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: minor error message correctionsBruce Allan
Correct error messages when setting up Rx resources and when checking module parameters. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: prevent null ptr dereference in e1000_tx_queue()Bruce Allan
tx_desc can be dereferenced as a null pointer when count is passed in as 0. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: support new PBA format from EEPROMBruce Allan
Provide support to e1000e for displaying the new format of the PBA found in the EEPROM. The unique PBA identifier is no longer restricted to hexadecimal numbers and must now be read and displayed as a string. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82579 PHY incorrectly identified during initBruce Allan
During init, reading the 2 PHY ID registers back-to-back in the default fast mode could return invalid data (all F's) and in slow mode could return data to the second read the data from the first read. To resolve the issue in fast mode, set to slow mode before any PHY accesses; to resolve the issue in slow mode, put in a delay for every 82579 PHY access. Since this PHY is currently only paired with the pch2lan MAC and the PHY type is not known before the first PHY access which can fail this way, check for this based on MAC-type. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82577/8/9 mis-configured OEM bits during S0->SxBruce Allan
The LPLU (Low Power Link Up) and Gigabit Disable bits (a.k.a. OEM bits) were being configured incorrectly when device goes to D3 state. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82571 Serdes can fail to get linkBruce Allan
When link partner is sending continuous Config symbols, the 82571 Serdes FIFO can overflow resulting in Invalid bit getting set. To resolve this, if Sync and Config bits are both 1 ignore the Invalid bit and restart auto-negotiation. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82577/8 must acquire h/w semaphore before workaroundBruce Allan
The workaround function e1000_configure_k1_pchlan() assumes the h/w semaphore is already acquired. This was originally missed when setting up the part for the ethtool loopback test. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82574/82583 performance improvementBruce Allan
Increasing the transmit fifo by 4K (by decreasing the receive fifo size specified in .pba by the same amount) increases Tx performance. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: 82571-based mezzanine card can fail ethtool link testBruce Allan
On certain 82571-based mezzanine NICs in some blade servers, the ethtool link test can fail due to the serdes_has_link flag not set correctly. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10e1000e: fix double initialization in blink pathHolger Eitzenberger
The kernel goes BUG() at the time 'ethtool -p eth0 3' comes back, which is due to adapter->led_blink_task initialized several times. At the time it is still running this results in a corrupted task_list of the associated workqueue. The fix is to move the workqueue initialization to the probe function instead. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10ixgbe: cleanup string function calls to use bound checking versions.Don Skidmore
Some minor cleanup to use string calls that use bound checks just to be extra safe. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10ixgbe: fix ntuple supportEmil Tantilov
commit f62bbb5e62c6e4a91fb222d22bc46e8d4d7e59ef ixgbe: Update ixgbe to use new vlan accleration. removed ETH_FLAG_NTUPLE from the supported flags. This patch puts it back on to allow for setting ntuple via ethtool. CC: Jesse Gross <jesse@nicira.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10ixgbe: fix X540 to use it's own info structDon Skidmore
This patch enables X540 hardware to use it's own set of support functions. This is useful as it has no need of SFP+ support. A couple minor bugs with the eeprom semaphore were also cleaned up. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10ixgbe: fix X540 phy id to correct valueDon Skidmore
The existing PHY ID for X540 was from early production hardware and is no longer correct. This patch corrects that. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10ixgb: Don't check for vlan group on transmitEmil Tantilov
Based on a patch from Jesse Gross. Enable vlan tag insertion even when vlan group is not configured. For ixgb HW both CTRL0.VME and VLE bit in the Tx descriptor need to be set in order to enable HW acceleration. Introduced separate functions for enabling/disabling of vlan tag stripping similar to ixgbe. CC: Jesse Gross <jesse@nicira.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10Intel Wired LAN drivers: Use static constJeff Kirsher
Based on work by Joe Perches <joe@perches.com> Using static const to decrease data and overall object size. CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
2010-12-10e1000: fix return value not set on errorDean Nelson
Dean noticed that 'err' wasn't being set when the "goto err_dma" statement is executed in the following hunk from the commit. It's value will be zero as a result of a successful call to e1000_init_hw_struct(). This patch changes the error condition to be correctly propagated. CC: stable@kernel.org Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-10bonding: add the debugfs facility to the bonding driverTaku Izumi
This patch provides the debugfs facility to the bonding driver. The "bonding" directory is created in the debugfs root and directories of each bonding interface (like bond0, bond1...) are created in that. # mount -t debugfs none /sys/kernel/debug # ls /sys/kernel/debug/bonding bond0 bond1 Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Move enic port profile handling code to a new 802.1Qbh provisioning ↵Roopa Prabhu
info type Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: update driver versionJon Mason
Update vxge driver version to 2.5.1 Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: independent interrupt moderationJon Mason
Configure the workload clock register and TIM register for independent interrupt moderation based on the individual vpath utilization instead of common link utilization. This greatly improves latency. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: hotplug stallJon Mason
When hot-unplugging a vxge adapter while running, the driver's remove routine prints warning and then stalls the calling thread. This is due to vxge_remove calling vxge_device_unregister to unregister the netdev before calling flush_scheduled_work clear any pending work. Swapping the order of these two functions resolves the issue. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: transmit timeout deadlockJon Mason
Use a workqueue to handle the device reset during a transmit timeout, as there can be a deadlock during bringup. Also, set the netif carrier off before the watchdog reset is started to prevent the timeout from reoccurring while still processing the first. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: use pci_request_region()Jon Mason
Only BAR0 is ever accessed, thus making the calls to pci_request_regions overkill. Change calls of pci_request_regions to pci_request_region to reduce the size of the mapped area. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: fix crash of VF when unloading PFJon Mason
Calling pci_disable_sriov when unloading a SR-IOV physical function driver from a host when a guest is using a virtual function from that device can cause a host crash or VM crash. The crash is caused by the virtual config space no longer being present when PF is removed (due to the pci_disable_sriov). This can be avoided by not calling pci_disable_sriov to disable the PCI space when shutting down the PF. Each function in the X3100 operates independently and in this case will operate properly in the absence of the PF. Also, added improved logic in the detection of SR-IOV initialization. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: code cleanup and reorganizationJon Mason
Move function locations to remove the need for internal declarations and other misc clean-ups. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Arpit Patel <arpit.patel@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10netdev: Use default implementation of ethtool_ops::get_link where possibleBen Hutchings
Various drivers are using implementations of ethtool_ops::get_link that are equivalent to the default ethtool_op_get_link(). Change them to use that instead. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Use VF mac set by IFLA_VF_MAC in port profile provisioning dataRoopa Prabhu
This patch adds support in enic 802.1Qbh port profile provisioning code to use the mac address set by IFLA_VF_MAC. For now we handle this mac as a special case for a VM mac address sent to us by libvirt. The VM mac address is sent to the switch along with the rest of the port profile provisioning data. This patch also adds calls to register and deregister the mac address during port profile association/deassociation. Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Add ndo_set_vf_mac support for enic dynamic devicesRoopa Prabhu
This patch implements the ndo_set_vf_mac netdev operation for enic dynamic devices. It treats the mac address set by IFLA_VF_MAC as a special case to use it in the port profile provisioning data. Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Add ndo_set_rx_mode support for enic vnicsRoopa Prabhu
Add ndo_set_rx_mode support to register unicast and multicast address filters for enic devices Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10sfc: convert references to LRO to GROstephen hemminger
This driver now uses Generic Receive Offload, not the older LRO. Change references to LRO in names and comments. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10stmmac: Remove redundant unlikely()Tobias Klauser
IS_ERR() already implies unlikely(), so it can be omitted here. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10ifb: use the lockless variants of skb_queueChangli Gao
rq and tq are both protected by tx queue lock, so we can simply use the lockless variants of skb_queue. skb_queue_splice_tail_init() is used instead of the open coded and slow one. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10ifb: remove unused macro TX_TIMEOUTChangli Gao
Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10ifb: remove the useless debug statsChangli Gao
These debug stats are not exported, and become useless. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>