Commit graph

23770 commits

Author SHA1 Message Date
Joe Perches 75a84eb5d1 tulip: Use DEFINE_PCI_DEVICE_TABLE and static const
Moves the PCI table to the right read-only section.
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:09 -08:00
Joe Perches 5591c75dc3 usb: Use static const, consolidate code
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Consolidate duplicated code into new fix_crc_bug function
and declare data in that function static const.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:09 -08:00
Joe Perches b6bc765067 drivers/net/*.c: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:08 -08:00
Joe Perches 895950c2a6 tg3: Use DEFINE_PCI_DEVICE_TABLE
Moves the PCI tables to the right read-only section.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:08 -08:00
David S. Miller d9993be65a Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-20 13:24:14 -08:00
Dan Carpenter f955e1415f vmxnet3: locking problems in xmit
There were several paths that didn't release their locks.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-20 10:44:25 -08:00
Dan Carpenter 914e5cea14 typhoon: memory corruption in typhoon_get_drvinfo()
info->version only has space for 32 characters but my UTS_RELEASE is
"2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
This is supposed to be the version of the driver, not the kernel
version.  This driver doesn't have a version so lets just leave it
blank.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-20 10:43:02 -08:00
Andreas Mohr bbccc16c8a net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
Due to active notification of the new MCS7832 version by the manufacturer
(Mr. Milton; thanks!) -- quote: "functionality same as MCS7830",
I'm now submitting this patch (on -rc6), intended for networking.git and -stable.

- add MCS7832 USB PID to be able to support this new device variant, too
- add related descriptions

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-20 10:38:47 -08:00
Breno Leitao 782615aea8 ehea: Fixing some message level
Currently there are some info message that is set as error, and an error
message that is set as debug. This patch just fixes it.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-20 10:35:25 -08:00
Tejun Heo ba27d85c96 vxge: add missing flush of reset_task
Commit 6e07ebd84 (drivers/net: remove unnecessary
flush_scheduled_work() calls) incorrectly removed the flush call
without replacing it with the appropriate work specific operation.
Fix it by flushing vdev->reset_task explicitly.

Pointed out by Jon Mason.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jon Mason <jon.mason@exar.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-19 21:54:32 -08:00
Eric Dumazet 1a75972c61 ifb: use netif_receive_skb() instead of netif_rx()
In ri_tasklet(), we run from softirq, so can directly handle packet
through netif_receive_skb() instead of netif_rx().
There is no risk of recursion.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-19 21:44:30 -08:00
David S. Miller b4aa9e05a6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x.h
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-core.h
	drivers/vhost/vhost.c
2010-12-17 12:27:22 -08:00
Arnaud Ebalard f4680d3db7 asix: add USB ID for Logitec LAN-GTJ U2A
Logitec LAN-GTJ U2A (http://www.pro.logitec.co.jp/pro/g/gLAN-GTJU2A/)
USB 2.0 10/10/1000 Ethernet adapter is based on ASIX AX88178 chipset.

This patch adds missing USB ID for the device.

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17 11:50:20 -08:00
Rajesh Borundia 1dc0f3c54c qlcnic: reset pci function unconditionally during probe
Some boot code drivers dont have cleanup routine, so pci function
remains in unknown state prior to driver load. So during driver load
issue FLR unconditionally.

Update driver version to 5.0.14.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17 11:39:02 -08:00
Rajesh Borundia b5006dcb10 qlcnic: fix ocm window register offset calculation
OCM window register offset was calculated incorrectly for
pci function greater than zero.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17 11:39:01 -08:00
Sucheta Chakraborty c75822a309 qlcnic: fix LED test when interface is down.
When interface is down, create temporary context to config LED.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17 11:39:01 -08:00
Ben Hutchings 46814e08d8 tehuti: Firmware filename is tehuti/bdx.bin
My conversion of tehuti to use request_firmware() was confused about
the filename of the firmware blob.  Change the driver to match the
blob.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17 10:17:12 -08:00
Eric Dumazet 7edc3453e5 ifb: fix a lockdep splat
After recent ifb changes, we must use lockless __skb_dequeue() since
lock is not anymore initialized.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jamal Hadi Salim <hadi@cyberus.ca>
Cc: Changli Gao <xiaosuo@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:54:52 -08:00
Michał Mirosław 0d0b16727f net: Fix drivers advertising HW_CSUM feature to use csum_start
Some drivers are using skb_transport_offset(skb) instead of skb->csum_start
for NETIF_F_HW_CSUM offload.  This does not matter now, but if someone
implements checksumming of encapsulated packets then this will break silently.

TSO output paths are left as they are, since they are for IP+TCP only
(might be worth converting though).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:43:15 -08:00
Michał Mirosław 55508d601d net: Use skb_checksum_start_offset()
Replace skb->csum_start - skb_headroom(skb) with skb_checksum_start_offset().

Note for usb/smsc95xx: skb->data - skb->head == skb_headroom(skb).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:43:14 -08:00
Michał Mirosław 0b7967503d net/veth: Fix packet checksumming
We can't change ip_summed from CHECKSUM_PARTIAL to CHECKSUM_NONE
or CHECKSUM_UNNECESSARY because checksum in packet's headers is
not valid and will cause invalid checksum when frame is forwarded.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:41:35 -08:00
Ivan Vecera 2984961c38 be2net: use mutex instead of spin lock for mbox_lock
Since the mbox polling uses the schedule_timeout, the mbox_lock should be
a mutex and not a spin lock.
The commit f25b03a replaced udelay() with schedule_timeout() but didn't
change mbox_lock to semaphore or mutex.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:12:26 -08:00
Taku Izumi caafa84251 bonding: add the debugfs interface to see RLB hash table
This patch provices the debugfs interface to see RLB hash table
like the following:

# cat /sys/kernel/debug/bonding/bond0/rlb_hash_table
SourceIP        DestinationIP   Destination MAC   DEV
10.124.196.205  10.124.196.205  ff:ff:ff:ff:ff:ff eth4
10.124.196.205  10.124.196.81   00:19:99:XX:XX:XX eth3
10.124.196.205  10.124.196.1    00:21:d8:XX:XX:XX eth0

This is helpful to check if the receive load balancing works as expected.

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-16 13:16:05 -08:00
Taku Izumi 411204a5a1 bonding: migrate some macros from bond_alb.c to bond_alb.h
This patch simply migrates some macros from bond_alb.c to bond_alb.h.

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-16 13:16:05 -08:00
Dimitris Michailidis ad6bad3efb cxgb4: NUMA-aware Tx queue allocations
Allocate Tx queue memory on the node indicated by the new
netdev_queue_numa_node_read.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:04 -08:00
Dimitris Michailidis 23d88e1d3e cxgb4: extend VPD parsing
Current code parses the VPD RO section for keywords but makes static
assumptions about the location of the section.  Remove them and parse
the VPD to find it.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:04 -08:00
Joe Perches 005b5717fa cxgb4: add const to static arrays
Patch originally from Joe Perches, unmodified.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:03 -08:00
Dimitris Michailidis 8f3a76769e cxgb4: remove a bitmap
The driver keeps a bitmap of the netdevs it registered so it knows what to
unregister later.  Remove that and look at reg_state instead.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:03 -08:00
Dimitris Michailidis b1a3c2b698 cxgb4: remove the name field from the adapter structure
Remove a field the driver uses to keep track of the name of the first
netdev it manages to register.  Do this by changing the registration
loop to stop the first time it fails so the first registered device is
trivial to tell.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:02 -08:00
Dimitris Michailidis ba27816cd8 cxgb4: correct formatting of MSI-X interrupt names
The last byte of the buffer for MSI-X names could not be used due to a
bogus -1.  Also do not explicitly clear the last byte, snprintf will do
the right thing.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:02 -08:00
Dimitris Michailidis 8cd18ac47f cxgb4: allocate more space for MSI-X interrupt names
Currently MSI-X names for netdevs with long names are truncated in
/proc/interrupts due to insufficient space.  Use IFNAMSIZ to size the
needed space.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:01 -08:00
Dimitris Michailidis 118969ed21 cxgb4: print port information after registering each netdev
Print information about each port when its netdev is registered instead
of looping separately over the ports at the end.  The bulk of this patch
is due to indentation change.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:01 -08:00
Dimitris Michailidis 7d5e77aafa cxgb4: distinguish between 1-lane KR/KX and 4-lane KR/KX/KX4 ports
And fix the supported flags ethtool reports for the two cases.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:00 -08:00
Dimitris Michailidis a57cabe09f cxgb4: set the number of queues before device registration
The number of queues is known early, move the calls to
netif_set_real_num_[rt]x_queues before register_netdev.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:16:00 -08:00
Dimitris Michailidis ec16400823 cxgb4: do not read the clock frequency from VPD
No need to read the clock frequency from VPD, we already get it a bit
later from FW, after any potential adjustments.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:59 -08:00
Dimitris Michailidis ef306b50b9 cxgb4: enable PCIe relaxed ordering
Enable relaxed ordering for descriptor reads and packet I/O.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:59 -08:00
Vladislav Zolotarov 986d730a69 bnx2x: update version to 1.62.00-2
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-16 13:15:58 -08:00
Vladislav Zolotarov 5928c8baf6 bnx2x: replace FW to 6.2.5
Includes FCoE releated fixes in FW flows

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:57 -08:00
Vladislav Zolotarov bcab15c5d7 bnx2x: Add DCB/PFC support - link layer
Add appropriate HW DCB/PFC configuration

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:55 -08:00
Vladislav Zolotarov e4901dde12 bnx2x: add DCB support
Adding DCB initialization and handling on 57712 FW/HW

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Shmulik Ravid-Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:55 -08:00
Vladislav Zolotarov 8307fa3e86 bnx2x: add a select queue callback
This callback required to allow FCoE traffic to be
sent on separate priority queue from other L2 traffic,
which is managed by PFC in HW.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Shmulik Ravid-Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:54 -08:00
Vladislav Zolotarov ec6ba94521 bnx2x: add FCoE ring
Includes new driver structures and FW/HW configuration for FCoE ring

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Shmulik Ravid-Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 13:15:54 -08:00
Ben Hutchings f88a4a9b65 bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion
bond_na_send() attempts to insert a VLAN tag in between building and
sending packets of the respective formats.  If the slave does not
implement hardware VLAN tag insertion then vlan_put_tag() will mangle
the network-layer header because the Ethernet header is not present at
this point (unlike in bond_arp_send()).

Fix this by adding the tag out-of-line and relying on
dev_hard_start_xmit() to insert it inline if necessary.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 12:43:22 -08:00
Ben Hutchings ffa95ed50f bonding: Change active slave quietly when bond is down
bond_change_active_slave() may be called when a slave is added, even
if the bond has not been brought up yet.  It may then attempt to send
packets, and further it may use mcast_work which is uninitialised
before the bond is brought up.  Add the necessary checks for
netif_running(bond->dev).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 12:43:22 -08:00
Ben Hutchings 8387451e55 bonding/vlan: Remove redundant VLAN tag insertion logic
A bond may have a mixture of slave devices with and without hardware
VLAN tag insertion capability.  Therefore it always claims this
capability and performs software VLAN tag insertion if the slave does
not.

Since commit 7b9c609037, this has
also been done by dev_hard_start_xmit().  The result is that VLAN-
tagged skbs are now double-tagged when transmitted through slave
devices without hardware VLAN tag insertion!

Remove the now-redundant logic from bond_dev_queue_xmit().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 12:43:21 -08:00
Ken Kawasaki 42dccd1f75 axnet_cs: move id (0x1bf, 0x2328) to axnet_cs
axnet_cs:
    Accton EN2328 or compatible (id: 0x01bf, 0x2328) uses Asix chip.
    So it works better with axnet_cs instead of pcnet_cs.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 12:39:06 -08:00
Hillf Danton af3e5bd5f6 bonding: Fix slave selection bug.
The returned slave is incorrect, if the net device under check is not
charged yet by the master.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 12:24:02 -08:00
David S. Miller 82cc4f5cb8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-12-15 09:43:13 -08:00
Eduardo Costa 56e6417b49 p54usb: New USB ID for Gemtek WUBI-100GW
This USB ID is for the WUBI-100GW 802.11g Wireless LAN USB Device that
uses p54usb.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Eduardo Costa <ecosta.tmp@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-14 16:10:45 -05:00
David S. Miller 6389aa73ab Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-12-14 10:52:54 -08:00