Commit graph

101272 commits

Author SHA1 Message Date
Carolyn Wyborny
9835fd7321 igb: Add new function to read part number from EEPROM in string format
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-10 22:14:01 -08:00
Bruce Allan
c920aa8b87 e1000e: increment the driver version
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-10 22:13:57 -08:00
Bruce Allan
61c7581667 e1000e: static analysis tools complain of a possible null ptr p dereference
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-10 22:13:49 -08:00
Bruce Allan
e926244723 e1000e: minor error message corrections
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-10 22:13:46 -08:00
Bruce Allan
36b973df71 e1000e: prevent null ptr dereference in e1000_tx_queue()
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-10 22:13:41 -08:00
Bruce Allan
073287c037 e1000e: support new PBA format from EEPROM
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-10 22:13:37 -08:00
Bruce Allan
664dc878ed e1000e: 82579 PHY incorrectly identified during init
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-10 22:13:34 -08:00
Bruce Allan
ce54afd16d e1000e: 82577/8/9 mis-configured OEM bits during S0->Sx
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-10 22:13:27 -08:00
Bruce Allan
d9c76f99c2 e1000e: 82571 Serdes can fail to get link
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-10 22:13:14 -08:00
Bruce Allan
cbd006cb7d e1000e: 82577/8 must acquire h/w semaphore before workaround
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-10 22:13:11 -08:00
Bruce Allan
ed5c2b0b78 e1000e: 82574/82583 performance improvement
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-10 22:13:08 -08:00
Bruce Allan
a82a14f4cd e1000e: 82571-based mezzanine card can fail ethtool link test
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-10 22:13:05 -08:00
Holger Eitzenberger
9633e63bb1 e1000e: fix double initialization in blink path
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-10 22:13:01 -08:00
Don Skidmore
9fe93afdd0 ixgbe: cleanup string function calls to use bound checking versions.
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-10 22:12:58 -08:00
Emil Tantilov
5136cad37b ixgbe: fix ntuple support
commit f62bbb5e62
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-10 22:12:55 -08:00
Don Skidmore
d994653db4 ixgbe: fix X540 to use it's own info struct
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-10 22:12:52 -08:00
Don Skidmore
2b264909c6 ixgbe: fix X540 phy id to correct value
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-10 22:12:46 -08:00
Emil Tantilov
ae54496f9e ixgb: Don't check for vlan group on transmit
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-10 22:12:36 -08:00
Jeff Kirsher
667445008d Intel Wired LAN drivers: Use static const
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-10 22:12:32 -08:00
Dean Nelson
19a0b67afd e1000: fix return value not set on error
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-10 22:12:29 -08:00
David S. Miller
a5d62a149b isdn: Fix printed out copy_from_user() return value after previous change.
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 16:52:38 -08:00
Taku Izumi
f073c7ca29 bonding: add the debugfs facility to the bonding driver
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-10 16:24:33 -08:00
Roopa Prabhu
6c2c9d964e enic: Move enic port profile handling code to a new 802.1Qbh provisioning 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-10 16:23:51 -08:00
Dan Carpenter
36accaed22 isdn: return -EFAULT if copy_from_user() fails
We should be returning -EFAULT here.

Mostly this patch is to silence a smatch warning.  The upper levels
of this driver turn all non-zero return values from isar_load_firmware()
into 1.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 16:15:59 -08:00
Jon Mason
5d52040d4d vxge: update driver version
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-10 16:08:24 -08:00
Jon Mason
b55e7b153f vxge: independent interrupt moderation
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-10 16:08:24 -08:00
Jon Mason
9c16388716 vxge: hotplug stall
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-10 16:08:23 -08:00
Jon Mason
2e41f6449c vxge: transmit timeout deadlock
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-10 16:08:23 -08:00
Jon Mason
dc66daa9be vxge: use pci_request_region()
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-10 16:08:22 -08:00
Jon Mason
c92bf70dcb vxge: fix crash of VF when unloading PF
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-10 16:08:22 -08:00
Jon Mason
528f727279 vxge: code cleanup and reorganization
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-10 16:08:21 -08:00
Ben Hutchings
ed4ba4b5b9 netdev: Use default implementation of ethtool_ops::get_link where possible
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-10 15:55:24 -08:00
Roopa Prabhu
29639059a0 enic: Use VF mac set by IFLA_VF_MAC in port profile provisioning data
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-10 15:42:22 -08:00
Roopa Prabhu
0b1c00fc3e enic: Add ndo_set_vf_mac support for enic dynamic devices
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-10 15:42:21 -08:00
Roopa Prabhu
319d7e8473 enic: Add ndo_set_rx_mode support for enic vnics
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-10 15:39:42 -08:00
stephen hemminger
4afb7527ac sfc: convert references to LRO to GRO
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-10 15:03:24 -08:00
Tobias Klauser
0e51d67ebb stmmac: Remove redundant unlikely()
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-10 14:57:34 -08:00
Changli Gao
957fca95e3 ifb: use the lockless variants of skb_queue
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-10 14:34:34 -08:00
Changli Gao
c6350362cb ifb: remove unused macro TX_TIMEOUT
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-10 14:34:34 -08:00
Changli Gao
e1f9150502 ifb: remove the useless debug stats
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>
2010-12-10 14:34:33 -08:00
Jan Glauber
a6a5ff2697 qeth: buffer count imbalance
The used buffers counter is not incremented in case of an error so
the counter can become negative. Increment the used buffers counter
before checking for errors.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 14:28:48 -08:00
Frank Blaschka
91d4576bfe qeth: l3 add vlan hdr in passthru frames
OSA l3 mode is hw accelerated VLAN only for IPv4. Take care we
add the vlan hdr to a passthru frame in the device driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 14:28:48 -08:00
Einar Lueck
f154b79cd7 qeth: support VIPA add/del in offline mode
Only work through the IP adddress to do list if the card is UP or
SOFTSETUP. Enables to configure VIPA add/del in offline mode.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 14:28:47 -08:00
Einar Lueck
d0ddf30fdd qeth: support ipv6 query arp cache for HiperSockets
Function qeth_l3_arp_query now queries for IPv6 addresses, too, if
QETH_QARP_WITH_IPV6 is passed as parameter to the ioctl. HiperSockets
and GuestLAN in HiperSockets mode provide corresponding entries.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10 14:28:47 -08:00
David S. Miller
cf78f8ee3d Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6 2010-12-10 10:20:43 -08:00
David S. Miller
1e13f863ca Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
	drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
2010-12-10 09:50:47 -08:00
Vladislav Zolotarov
f404c2fea3 bnx2x: Update version number and a date.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-09 20:50:02 -08:00
Vladislav Zolotarov
5cd737c2e8 bnx2x: Fixed a compilation warning
bnx2x_src_init_t2() is used only when BCM_CNIC is defined.
So, to avoid a compilation warning, we won't define it unless
BCM_CNIC is defined.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-09 20:50:01 -08:00
Vladislav Zolotarov
d245a11112 bnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-09 20:50:01 -08:00
Vladislav Zolotarov
2297a2da5a bnx2x: LSO code was broken on BE platforms
Make the LSO code work on BE platforms: parsing_data field of
a parsing BD (PBD) for 57712 was improperly composed which made FW read wrong
values for TCP header's length and offset and, as a result, the corresponding
PCI device was performing bad DMA reads triggering EEH.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-09 20:50:00 -08:00