kernel/kernel-generic.git
14 years agoiwlwifi: don't double-activate queue 4
Johannes Berg [Fri, 6 Nov 2009 22:52:50 +0000 (14:52 -0800)]
iwlwifi: don't double-activate queue 4

The fourth queue (command queue) is already activated in
the loop above that also maps it to the command FIFO and
therefore doesn't need to be marked as activated again.
Also change the TODO comment to be accurate -- we need
to initialise the _queues_, not FIFOs, and map them to
device FIFOs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: no periodic Tx/IQ calibration for 6x00/6x50 series
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:49 +0000 (14:52 -0800)]
iwlwifi: no periodic Tx/IQ calibration for 6x00/6x50 series

For both 6x00 and 6x50 series devices, periodic Tx IQ calibration is
disabled in uCode, driver do not need to set the periodic Tx/IQ calibration
bit in calibration command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: use configured valid rx chain for scan
Shanyu Zhao [Fri, 6 Nov 2009 22:52:48 +0000 (14:52 -0800)]
iwlwifi: use configured valid rx chain for scan

Use configured valid rx chains in scan command instead of ANT_ABC, correcting
valid rx chain configuration of 4965, should be ANT_ABC instead of ANT_AB.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: use only one chain for scan in PS
Shanyu Zhao [Fri, 6 Nov 2009 22:52:47 +0000 (14:52 -0800)]
iwlwifi: use only one chain for scan in PS

When doing scan in power saving mode, choose only 1 valid RX chain instead of
turning all chains on.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: print rx_on config to help debug
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:46 +0000 (14:52 -0800)]
iwlwifi: print rx_on config to help debug

To help debug rx related issues, if IWL_DEBUG_RADIO flag is set, print
the rxon configuration when rxon host command send to uCode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: allocate 128 bytes linear buffer for rx skb
Zhu Yi [Fri, 6 Nov 2009 22:52:45 +0000 (14:52 -0800)]
iwlwifi: allocate 128 bytes linear buffer for rx skb

Allocate 128 bytes linear buffer for rx skb. The first 64 bytes is
reserved for mac80211 usage (for radiotap header expansion, etc).
The frame header starts from the second 64 bytes.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: change debug message to error in failure case
Reinette Chatre [Fri, 6 Nov 2009 22:52:44 +0000 (14:52 -0800)]
iwlwifi: change debug message to error in failure case

Since these messages indicate failure we would be interested in seeing them
always.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Rewrite TX bounce buffer handling
Michael Buesch [Fri, 6 Nov 2009 17:32:44 +0000 (18:32 +0100)]
b43: Rewrite TX bounce buffer handling

Do not mess with the original skb, but allocate an independent bouncebuffer.
This protects against bad interference with mac80211's assumptions about
the skb (which already caused bugs).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 11 Nov 2009 19:38:16 +0000 (11:38 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h

14 years agoCAN: use dev_get_by_index_rcu
stephen hemminger [Tue, 10 Nov 2009 07:54:56 +0000 (07:54 +0000)]
CAN: use dev_get_by_index_rcu

Use new function to avoid doing read_lock().

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPV4: use rcu to walk list of devices in IGMP
stephen hemminger [Tue, 10 Nov 2009 07:54:55 +0000 (07:54 +0000)]
IPV4: use rcu to walk list of devices in IGMP

This also needs to be optimized for large number of devices.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodecnet: use RCU to find network devices
stephen hemminger [Tue, 10 Nov 2009 07:54:53 +0000 (07:54 +0000)]
decnet: use RCU to find network devices

When showing device statistics use RCU rather than read_lock(&dev_base_lock)
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agos390: use RCU to walk list of network devices
stephen hemminger [Tue, 10 Nov 2009 07:54:52 +0000 (07:54 +0000)]
s390: use RCU to walk list of network devices

This is similar to other cases where for_each_netdev_rcu
can be used when gathering information.

By inspection, don't have platform or cross-build environment
to validate.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: use rcu for network scheduler API
stephen hemminger [Tue, 10 Nov 2009 07:54:49 +0000 (07:54 +0000)]
net: use rcu for network scheduler API

Use RCU to walk list of network devices in qdisc dump.
This could be optimized for large number of devices.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan: eliminate use of dev_base_lock
stephen hemminger [Tue, 10 Nov 2009 07:54:48 +0000 (07:54 +0000)]
vlan: eliminate use of dev_base_lock

Do not need to use read_lock(&dev_base_lock), use RCU instead.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: add netdev_continue_rcu
stephen hemminger [Tue, 10 Nov 2009 07:54:47 +0000 (07:54 +0000)]
netdev: add netdev_continue_rcu

This adds an RCU macro for continuing search, useful for some
network devices like vlan.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: use ipv6_addr_v4mapped()
Brian Haley [Mon, 9 Nov 2009 12:05:53 +0000 (12:05 +0000)]
IPv6: use ipv6_addr_v4mapped()

Change udp6_portaddr_hash() to use ipv6_addr_v4mapped()
inline instead of ipv6_addr_type().

Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoparisc: led: Use for_each_netdev_rcu()
Eric Dumazet [Mon, 9 Nov 2009 18:07:28 +0000 (18:07 +0000)]
parisc: led: Use for_each_netdev_rcu()

Use for_each_netdev_rcu() and dont lock dev_base_lock anymore

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosit: Clean up DF code by copying from IPIP
Herbert Xu [Mon, 9 Nov 2009 08:42:01 +0000 (08:42 +0000)]
sit: Clean up DF code by copying from IPIP

This patch rearranges the SIT DF bit handling using the new IPIP DF
code.  The only externally visible effect should be the case where
PMTU is enabled and the MTU is exactly 1280 bytes.  In this case the
previous code would send packets out with DF off while the new code
would set the DF bit.  This is inline with RFC 4213.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Allow inet6_dump_addr() to handle more than 64 addresses
Eric Dumazet [Mon, 9 Nov 2009 07:40:17 +0000 (07:40 +0000)]
ipv6: Allow inet6_dump_addr() to handle more than 64 addresses

Apparently, inet6_dump_addr() is not able to handle more than
64 ipv6 addresses per device. We must break from inner loops
in case skb is full, or else cursor is put at the end of list.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: speedup inet6_dump_ifinfo()
Eric Dumazet [Mon, 9 Nov 2009 12:11:28 +0000 (12:11 +0000)]
ipv6: speedup inet6_dump_ifinfo()

When handling large number of netdevice, inet6_dump_ifinfo()
is very slow because it has O(N^2) complexity.

Instead of scanning one single list, we can use the 256 sub lists
of the dev_index hash table, and RCU lookups.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard
Cyrill Gorcunov [Sun, 8 Nov 2009 05:51:19 +0000 (05:51 +0000)]
net: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard

Use guard DECLARE_SOCKADDR in a few more places which allow
us to catch if the structure copied back is too big.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agousbnet: Set link down initially for drivers that update link state
Ben Hutchings [Wed, 4 Nov 2009 15:29:52 +0000 (15:29 +0000)]
usbnet: Set link down initially for drivers that update link state

Some usbnet drivers update link state while others do not due to
hardware limitations.  Add a flag to distinguish those that do, and
set the link down initially for their devices.

This is intended to fix this bug: http://bugs.debian.org/444043

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoniu: Use DMA_BIT_MASK(44) instead of deprecated DMA_44BIT_MASK
Marin Mitov [Sun, 8 Nov 2009 05:59:27 +0000 (05:59 +0000)]
niu: Use DMA_BIT_MASK(44) instead of deprecated DMA_44BIT_MASK

Use DMA_BIT_MASK(44) instead of deprecated DMA_44BIT_MASK

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: bind() optimisation
Eric Dumazet [Mon, 9 Nov 2009 05:26:33 +0000 (05:26 +0000)]
udp: bind() optimisation

UDP bind() can be O(N^2) in some pathological cases.

Thanks to secondary hash tables, we can make it O(N)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: version 1.52.1-4
Eilon Greenstein [Mon, 9 Nov 2009 06:09:37 +0000 (06:09 +0000)]
bnx2x: version 1.52.1-4

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Change coalescing granularity to 4us
Eilon Greenstein [Mon, 9 Nov 2009 06:09:35 +0000 (06:09 +0000)]
bnx2x: Change coalescing granularity to 4us

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Remove misleading error print
Eilon Greenstein [Mon, 9 Nov 2009 06:09:28 +0000 (06:09 +0000)]
bnx2x: Remove misleading error print

Failing to allocate MSI-X vectors is not an error and should not be
printed as such

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: GSO implies CSUM offload
Eilon Greenstein [Mon, 9 Nov 2009 06:09:22 +0000 (06:09 +0000)]
bnx2x: GSO implies CSUM offload

Making sure that whenever the FW/HW is configured for GSO, it is also
configured to CSUM offload

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: allocate and copy for pipe TX without sock lock
Rémi Denis-Courmont [Mon, 9 Nov 2009 04:06:40 +0000 (04:06 +0000)]
Phonet: allocate and copy for pipe TX without sock lock

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: put sockets in a hash table
Rémi Denis-Courmont [Mon, 9 Nov 2009 02:17:01 +0000 (02:17 +0000)]
Phonet: put sockets in a hash table

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agospeedfax: declare MODULE_FIRMWARE
Ben Hutchings [Wed, 11 Nov 2009 04:30:37 +0000 (20:30 -0800)]
speedfax: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopcnet-cs: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 12:04:09 +0000 (12:04 +0000)]
pcnet-cs: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotms380tr: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:55:20 +0000 (11:55 +0000)]
tms380tr: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agospider-net: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:55:07 +0000 (11:55 +0000)]
spider-net: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomyri10ge: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:54:44 +0000 (11:54 +0000)]
myri10ge: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:53:52 +0000 (11:53 +0000)]
cxgb3: declare MODULE_FIRMWARE

Replace run-time string formatting with preprocessor string
manipulation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:53:39 +0000 (11:53 +0000)]
bnx2x: declare MODULE_FIRMWARE

Replace run-time string formatting with preprocessor string
manipulation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoambassador: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:46:07 +0000 (11:46 +0000)]
ambassador: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosolos-pci: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:40:32 +0000 (11:40 +0000)]
solos-pci: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetx: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 11:37:36 +0000 (11:37 +0000)]
netx: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiwlwifi: Fix issue on file transfer stalled in HT mode
Wey-Yi Guy [Fri, 6 Nov 2009 23:17:05 +0000 (15:17 -0800)]
iwlwifi: Fix issue on file transfer stalled in HT mode

Turn on RTS/CTS for HT to prevent uCode TX fifo underrun

This is fix for
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2103

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series
Wey-Yi Guy [Fri, 6 Nov 2009 23:17:04 +0000 (15:17 -0800)]
iwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series

When 802.11g was introduced, we had RTS/CTS and CTS-to-Self protection
mechanisms. In an HT Beacon, HT stations use the "Operating Mode" field
in the HT Information Element to determine whether or not to use
protection.

The Operating Mode field has 4 possible settings: 0-3:
Mode 0: If all stations in the BSS are 20/40 MHz HT capable, or if the
BSS is 20/40 MHz capable, or if all stations in the BSS are 20 MHz HT
stations in a 20 MHz BSS
Mode 1: used if there are non-HT stations or APs using the primary or
secondary channels
Mode 2: if only HT stations are associated in the BSS and at least one
20 MHz HT station is associated.
Mode 3: used if one or more non-HT stations are associated in the BSS.

When in operating modes 1 or 3, and the Use_Protection field is 1 in the
Beacon's ERP IE, all HT transmissions must be protected using RTS/CTS or
CTS-to-Self.

By default, CTS-to-self is the preferred protection mechanism for less
overhead and higher throughput; but using the full RTS/CTS will better
protect the inner exchange from interference, especially in
highly-congested environment.

For 6000 series WIFI NIC, RTS/CTS protection mechanism is the
recommended choice for HT traffic based on the HW design.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: fix issues while configuring host sleep using ethtool wol
Bing Zhao [Tue, 10 Nov 2009 02:04:13 +0000 (18:04 -0800)]
Libertas: fix issues while configuring host sleep using ethtool wol

Configuration of wake-on-lan for unicast, multicast, broadcast, physical
activity was not working. Kernel panic issue was there when user tries to
disable WOL. Fixed them.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: coding style cleanup in ethtool.c
Bing Zhao [Tue, 10 Nov 2009 02:04:12 +0000 (18:04 -0800)]
Libertas: coding style cleanup in ethtool.c

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8187: Fix sparse warnings
Larry Finger [Mon, 9 Nov 2009 22:56:06 +0000 (16:56 -0600)]
rtl8187: Fix sparse warnings

Due to a missing header include, sparse generates the following warnings:

  CHECK   drivers/net/wireless/rtl818x/rtl8187_rfkill.c
warning: symbol 'rtl8187_rfkill_init' was not declared. Should it be static?
warning: symbol 'rtl8187_rfkill_poll' was not declared. Should it be static?
warning: symbol 'rtl8187_rfkill_exit' was not declared. Should it be static?

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add LED definition for BenQ Joybook R55v
Bob Copeland [Mon, 9 Nov 2009 02:59:02 +0000 (21:59 -0500)]
ath5k: add LED definition for BenQ Joybook R55v

Setup the GPIOs for the BenQ Joybook netbook.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add LED support for HP Compaq CQ60
Bob Copeland [Mon, 9 Nov 2009 02:59:01 +0000 (21:59 -0500)]
ath5k: add LED support for HP Compaq CQ60

Add GPIO configuration for the Compaq CQ60 laptop

Reported-by: David Dreggors <ddreggors@jumptv.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: don't reset mcast filter when configuring the mode
Bob Copeland [Mon, 9 Nov 2009 02:59:00 +0000 (21:59 -0500)]
ath5k: don't reset mcast filter when configuring the mode

We should not zero out the multicast hash when configuring
the operating mode, since a zero value means all multicast
frames will get dropped.  Also, ath5k_mode_setup() gets
called after any reset, so the hash already set up in
configure_filter() is lost.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: update MAINTAINERS
Ivo van Doorn [Sat, 7 Nov 2009 18:14:47 +0000 (19:14 +0100)]
rt2x00: update MAINTAINERS

Although I have always been the active maintainer of the rt2x00 drivers,
I was not mentioned explicitely in the MAINTAINERS file as such.

Update the rt2x00 entry in the MAINTAINERS file to add my name and
email address.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: work around a locking issue in ->set_tim()
Felix Fietkau [Sat, 7 Nov 2009 17:37:37 +0000 (18:37 +0100)]
b43: work around a locking issue in ->set_tim()

ops->set_tim() must be atomic, so b43 trying to acquire a mutex leads
to a kernel crash. This patch trades an easy to trigger crash in AP
mode for an unlikely race condition. According to Michael, the real
fix would be to allow set_tim() to sleep, since b43 is not the only
driver that needs to sleep in all callbacks.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb-pcmcia: Fix 32bit register access in early bus scanning
Martin Fuzzey [Fri, 6 Nov 2009 20:21:27 +0000 (21:21 +0100)]
ssb-pcmcia: Fix 32bit register access in early bus scanning

The scan function was using 32 bit access which does not
work on 16bit CF cards.

This patch corrects this by doing two 16 bit reads like
ssb_pcmcia_read32 already does.

mb -- Removed locking. That early in init there's no need for locking.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 9 Nov 2009 19:17:24 +0000 (11:17 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 9 Nov 2009 07:00:54 +0000 (23:00 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/can/usb/ems_usb.c

14 years agoxfrm: SAD entries do not expire correctly after suspend-resume
Yury Polyanskiy [Mon, 9 Nov 2009 04:58:41 +0000 (20:58 -0800)]
xfrm: SAD entries do not expire correctly after suspend-resume

  This fixes the following bug in the current implementation of
net/xfrm: SAD entries timeouts do not count the time spent by the machine
in the suspended state. This leads to the connectivity problems because
after resuming local machine thinks that the SAD entry is still valid, while
it has already been expired on the remote server.

  The cause of this is very simple: the timeouts in the net/xfrm are bound to
the old mod_timer() timers. This patch reassigns them to the
CLOCK_REALTIME hrtimer.

  I have been using this version of the patch for a few months on my
machines without any problems. Also run a few stress tests w/o any
issues.

  This version of the patch uses tasklet_hrtimer by Peter Zijlstra
(commit 9ba5f0).

  This patch is against 2.6.31.4. Please CC me.

Signed-off-by: Yury Polyanskiy <polyanskiy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/compat_ioctl: support SIOCWANDEV
Arnd Bergmann [Mon, 9 Nov 2009 04:57:03 +0000 (20:57 -0800)]
net/compat_ioctl: support SIOCWANDEV

This adds compat_ioctl support for SIOCWANDEV, which has
always been missing.

The definition of struct compat_ifreq was missing an
ifru_settings fields that is needed to support SIOCWANDEV,
so add that and clean up the whitespace damage in the
struct definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet, compat_ioctl: fix SIOCGMII ioctls
Arnd Bergmann [Mon, 9 Nov 2009 04:56:21 +0000 (20:56 -0800)]
net, compat_ioctl: fix SIOCGMII ioctls

SIOCGMIIPHY and SIOCGMIIREG return data through ifreq,
so it needs to be converted on the way out as well.

SIOCGIFPFLAGS is unused, but has the same problem in theory.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: multicast RX should increment SNMP/sk_drops counter in allocation failures
Eric Dumazet [Sun, 8 Nov 2009 10:20:19 +0000 (10:20 +0000)]
udp: multicast RX should increment SNMP/sk_drops counter in allocation failures

When skb_clone() fails, we should increment sk_drops and SNMP counters.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: udp: Optimise multicast reception
Eric Dumazet [Sun, 8 Nov 2009 10:18:52 +0000 (10:18 +0000)]
ipv6: udp: Optimise multicast reception

IPV6 UDP multicast rx path is a bit complex and can hold a spinlock
for a long time.

Using a small (32 or 64 entries) stack of socket pointers can help
to perform expensive operations (skb_clone(), udp_queue_rcv_skb())
outside of the lock, in most cases.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: udp: Optimise multicast reception
Eric Dumazet [Sun, 8 Nov 2009 10:18:44 +0000 (10:18 +0000)]
ipv4: udp: Optimise multicast reception

UDP multicast rx path is a bit complex and can hold a spinlock
for a long time.

Using a small (32 or 64 entries) stack of socket pointers can help
to perform expensive operations (skb_clone(), udp_queue_rcv_skb())
outside of the lock, in most cases.

It's also a base for a future RCU conversion of multicast recption.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: udp: optimize unicast RX path
Eric Dumazet [Sun, 8 Nov 2009 10:18:30 +0000 (10:18 +0000)]
ipv6: udp: optimize unicast RX path

We first locate the (local port) hash chain head
If few sockets are in this chain, we proceed with previous lookup algo.

If too many sockets are listed, we take a look at the secondary
(port, address) hash chain.

We choose the shortest chain and proceed with a RCU lookup on the elected chain.

But, if we chose (port, address) chain, and fail to find a socket on given address,
 we must try another lookup on (port, in6addr_any) chain to find sockets not bound
to a particular IP.

-> No extra cost for typical setups, where the first lookup will probabbly
be performed.

RCU lookups everywhere, we dont acquire spinlock.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: udp: optimize unicast RX path
Eric Dumazet [Sun, 8 Nov 2009 10:18:11 +0000 (10:18 +0000)]
ipv4: udp: optimize unicast RX path

We first locate the (local port) hash chain head
If few sockets are in this chain, we proceed with previous lookup algo.

If too many sockets are listed, we take a look at the secondary
(port, address) hash chain we added in previous patch.

We choose the shortest chain and proceed with a RCU lookup on the elected chain.

But, if we chose (port, address) chain, and fail to find a socket on given address,
 we must try another lookup on (port, INADDR_ANY) chain to find socket not bound
to a particular IP.

-> No extra cost for typical setups, where the first lookup will probabbly
be performed.

RCU lookups everywhere, we dont acquire spinlock.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: secondary hash on (local port, local address)
Eric Dumazet [Sun, 8 Nov 2009 10:17:58 +0000 (10:17 +0000)]
udp: secondary hash on (local port, local address)

Extends udp_table to contain a secondary hash table.

socket anchor for this second hash is free, because UDP
doesnt use skc_bind_node : We define an union to hold
both skc_bind_node & a new hlist_nulls_node udp_portaddr_node

udp_lib_get_port() inserts sockets into second hash chain
(additional cost of one atomic op)

udp_lib_unhash() deletes socket from second hash chain
(additional cost of one atomic op)

Note : No spinlock lockdep annotation is needed, because
lock for the secondary hash chain is always get after
lock for primary hash chain.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: split sk_hash into two u16 hashes
Eric Dumazet [Sun, 8 Nov 2009 10:17:30 +0000 (10:17 +0000)]
udp: split sk_hash into two u16 hashes

Union sk_hash with two u16 hashes for udp (no extra memory taken)

One 16 bits hash on (local port) value (the previous udp 'hash')

One 16 bits hash on (local address, local port) values, initialized
but not yet used. This second hash is using jenkin hash for better
distribution.

Because the 'port' is xored later, a partial hash is performed
on local address + net_hash_mix(net)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: add a counter into udp_hslot
Eric Dumazet [Sun, 8 Nov 2009 10:17:05 +0000 (10:17 +0000)]
udp: add a counter into udp_hslot

Adds a counter in udp_hslot to keep an accurate count
of sockets present in chain.

This will permit to upcoming UDP lookup algo to chose
the shortest chain when secondary hash is added.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/appletalk: using compat_ptr needs inclusion of linux/compat.h
Stephen Rothwell [Mon, 9 Nov 2009 04:41:03 +0000 (20:41 -0800)]
net/appletalk: using compat_ptr needs inclusion of linux/compat.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Driver for the Microchip MCP251x SPI CAN controllers
Christian Pellegrin [Mon, 2 Nov 2009 23:07:00 +0000 (23:07 +0000)]
can: Driver for the Microchip MCP251x SPI CAN controllers

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Support specifying the network namespace upon device creation.
Eric W. Biederman [Sun, 8 Nov 2009 08:53:51 +0000 (00:53 -0800)]
net: Support specifying the network namespace upon device creation.

There is no good reason to not support userspace specifying the
network namespace during device creation, and it makes it easier
to create a network device and pass it to a child network namespace
with a well known name.

We have to be careful to ensure that the target network namespace
for the new device exists through the life of the call.  To keep
that logic clear I have factored out the network namespace grabbing
logic into rtnl_link_get_net.

In addtion we need to continue to pass the source network namespace
to the rtnl_link_ops.newlink method so that we can find the base
device source network namespace.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
14 years agonet/fsl_pq_mdio: add module license GPL
Sebastian Siewior [Fri, 6 Nov 2009 08:50:28 +0000 (08:50 +0000)]
net/fsl_pq_mdio: add module license GPL

or it will taint the kernel and fail to load becuase
of_address_to_resource() is GPL only.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
Wolfgang Grandegger [Fri, 6 Nov 2009 23:53:13 +0000 (23:53 +0000)]
can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()

On older kernels, e.g. 2.6.27, a WARN_ON dump in rtmsg_ifinfo()
is thrown when the CAN device is registered due to insufficient
skb space, as reported by various users. This patch adds the
rtnl_link_ops "get_size" to fix the problem. I think this patch
is required for more recent kernels as well, even if no WARN_ON
dumps are triggered. Maybe we also need "get_xstats_size" for
the CAN xstats.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoappletalk/ddp.c: Neaten checksum function
Joe Perches [Wed, 4 Nov 2009 10:26:13 +0000 (10:26 +0000)]
appletalk/ddp.c: Neaten checksum function

atalk_sum_partial can now use the rol16 function in bitops.h

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: avoid dev_hold()/dev_put() in rawv6_bind()
Eric Dumazet [Fri, 6 Nov 2009 07:01:17 +0000 (07:01 +0000)]
ipv6: avoid dev_hold()/dev_put() in rawv6_bind()

Using RCU helps not touching device refcount in rawv6_bind()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix compiler and sparse warnings
Anton Vorontsov [Wed, 4 Nov 2009 12:53:00 +0000 (12:53 +0000)]
gianfar: Fix compiler and sparse warnings

commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9de83 ("gianfar: Add Multiple
Queue Support") introduced the following warnings:

  CHECK   gianfar.c
gianfar.c:333:8: warning: incorrect type in assignment (different address spaces)
gianfar.c:333:8:    expected unsigned int [usertype] *baddr
gianfar.c:333:8:    got unsigned int [noderef] <asn:2>*<noident>
[... 67 lines skipped ...]
gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes)
gianfar.c:2565:3:    expected unsigned long const *addr
gianfar.c:2565:3:    got unsigned int *<noident>
  CC      gianfar.o
gianfar.c: In function 'gfar_probe':
gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c: In function 'gfar_configure_coalescing':
gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c: In function 'gfar_poll':
gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type
gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type

Following warnings left unfixed (looks like sparse doesn't like
locks in loops, so __acquires/__releases() doesn't help):

gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit
gianfar.c:441:40:    context '<noident>': wanted 0, got 1
gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit
gianfar.c:449:40:    context '<noident>': wanted 0, got 1
gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context
gianfar.c:458:3:    context '<noident>': wanted >= 0, got -1
gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context
gianfar.c:466:3:    context '<noident>': wanted >= 0, got -1

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofsl_pq_mdio: Fix compiler/sparse warnings (part 2)
Anton Vorontsov [Wed, 4 Nov 2009 12:52:57 +0000 (12:52 +0000)]
fsl_pq_mdio: Fix compiler/sparse warnings (part 2)

This patch fixes following warnings:

fsl_pq_mdio.c:112:38: warning: cast adds address space to expression (<asn:2>)
fsl_pq_mdio.c:124:38: warning: cast adds address space to expression (<asn:2>)
fsl_pq_mdio.c:133:38: warning: cast adds address space to expression (<asn:2>)
fsl_pq_mdio.c:414:11: warning: cast adds address space to expression (<asn:2>)

Instead of adding __force all over the place, introduce convenient
fsl_pq_mdio_get_regs() call that does the ugly casting just once.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofsl_pq_mdio: Fix compiler/sparse warnings (part 1)
Anton Vorontsov [Wed, 4 Nov 2009 12:52:56 +0000 (12:52 +0000)]
fsl_pq_mdio: Fix compiler/sparse warnings (part 1)

commit 1d2397d742b7a2b39b2f09dd9da3b9d1463f55e9 ("fsl_pq_mdio: Add
Suport for etsec2.0 devices") introduced the following warnings:

  CHECK   fsl_pq_mdio.c
fsl_pq_mdio.c:287:22: warning: incorrect type in initializer (different base types)
fsl_pq_mdio.c:287:22:    expected unknown type 11 const *__mptr
fsl_pq_mdio.c:287:22:    got unsigned long long [unsigned] [assigned] [usertype] addr
fsl_pq_mdio.c:287:19: warning: incorrect type in assignment (different base types)
fsl_pq_mdio.c:287:19:    expected unsigned long long [unsigned] [usertype] ioremap_miimcfg
fsl_pq_mdio.c:287:19:    got struct fsl_pq_mdio *<noident>
  CC      fsl_pq_mdio.o
fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
fsl_pq_mdio.c:287: warning: initialization makes pointer from integer without a cast
fsl_pq_mdio.c:287: warning: assignment makes integer from pointer without a cast

These warnings are not easy to fix without ugly __force casts. So,
instead of introducing the casts, rework the code to substitute an
offset from an already mapped area. This makes the code a lot simpler
and less duplicated.

Plus, from now on we don't actually map reserved registers on
non-etsec2.0 devices, so we have more chances to catch programming
errors.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: should not use __dev_get_by_index() without locks
Eric Dumazet [Fri, 6 Nov 2009 00:23:01 +0000 (00:23 +0000)]
can: should not use __dev_get_by_index() without locks

bcm_proc_getifname() is called with RTNL and dev_base_lock
not held. It calls __dev_get_by_index() without locks, and
this is illegal (might crash)

Close the race by holding dev_base_lock and copying dev->name
in the protected section.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agortnetlink: Cleanups
Eric Dumazet [Sat, 7 Nov 2009 09:26:17 +0000 (01:26 -0800)]
rtnetlink: Cleanups

Pure cleanups patch

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: kill proto_ops wrapper
Arnd Bergmann [Thu, 5 Nov 2009 04:37:30 +0000 (04:37 +0000)]
net: kill proto_ops wrapper

All users of wrapped proto_ops are now gone, so we can safely remove
the wrappers as well.

Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/x25: push BKL usage into x25_proto
Arnd Bergmann [Thu, 5 Nov 2009 04:37:29 +0000 (04:37 +0000)]
net/x25: push BKL usage into x25_proto

The x25 driver uses lock_kernel() implicitly through
its proto_ops wrapper. The makes the usage explicit
in order to get rid of that wrapper and to better document
the usage of the BKL.

The next step should be to get rid of the usage of the BKL
in x25 entirely, which requires understanding what data
structures need serialized accesses.

Cc: Henner Eisen <eis@baty.hanse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-x25@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/irda: push BKL into proto_ops
Arnd Bergmann [Fri, 6 Nov 2009 08:38:01 +0000 (00:38 -0800)]
net/irda: push BKL into proto_ops

The irda driver uses the BKL implicitly in its protocol
operations. Replace the wrapped proto_ops with explicit
lock_kernel() calls makes the usage more obvious and
shrinks the size of the object code.

The calls t lock_kernel() should eventually all be replaced
by other serialization methods, which requires finding out

The calls t lock_kernel() should eventually all be replaced
by other serialization methods, which requires finding out
which data actually needs protection.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipx: push down BKL into a ipx_dgram_ops
Arnd Bergmann [Thu, 5 Nov 2009 04:37:27 +0000 (04:37 +0000)]
net/ipx: push down BKL into a ipx_dgram_ops

Making the BKL usage explicit in ipx makes it more
obvious where it is used, reduces code size and helps
getting rid of the BKL in common code.

I did not analyse how to kill lock_kernel from ipx
entirely, this will involve either proving that it's not
needed, or replacing with a proper mutex or spinlock,
after finding out which data structures are protected
by the lock.

Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/appletalk: push down BKL into a atalk_dgram_ops
Arnd Bergmann [Thu, 5 Nov 2009 04:37:26 +0000 (04:37 +0000)]
net/appletalk: push down BKL into a atalk_dgram_ops

Making the BKL usage explicit in appletalk makes it more
obvious where it is used, reduces code size and helps
getting rid of the BKL in common code.

I did not analyse how to kill lock_kernel from appletalk
entirely, this will involve either proving that it's not
needed, or replacing with a proper mutex or spinlock,
after finding out which data structures are protected
by the lock.

Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1c: change atl1c_buffer struct and restructure clean atl1c_buffer procedure
Jie Yang [Fri, 6 Nov 2009 08:32:05 +0000 (00:32 -0800)]
atl1c: change atl1c_buffer struct and restructure clean atl1c_buffer procedure

change atl1c_buffer struct, use "u16 flags" instead of "u16 state"
to store more infomation for atl1c_buffer, and restructure clean
atl1c_buffer procedure, add common api atl1c_clean_buffer.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Replace old style lock initializer
Thomas Gleixner [Sat, 7 Nov 2009 06:17:25 +0000 (22:17 -0800)]
net: Replace old style lock initializer

SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: compat: No need to define IFHWADDRLEN and IFNAMSIZ twice.
David S. Miller [Sat, 7 Nov 2009 04:46:52 +0000 (20:46 -0800)]
net: compat: No need to define IFHWADDRLEN and IFNAMSIZ twice.

It's defined colloqually in linux/if.h and linux/compat.h
includes that.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet, compat_ioctl: handle more ioctls correctly
Arnd Bergmann [Fri, 6 Nov 2009 08:09:09 +0000 (08:09 +0000)]
net, compat_ioctl: handle more ioctls correctly

The MII ioctls and SIOCSIFNAME need to go through ifsioc conversion,
which they never did so far. Some others are not implemented in the
native path, so we can just return -EINVAL directly.

Add IFSLAVE ioctls to the EINVAL list and move it to the end to
optimize the code path for the common case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocompat: move sockios handling to net/socket.c
Arnd Bergmann [Sat, 7 Nov 2009 07:10:54 +0000 (23:10 -0800)]
compat: move sockios handling to net/socket.c

This removes the original socket compat_ioctl code
from fs/compat_ioctl.c and converts the code from the copy
in net/socket.c into a single function. We add a few cycles
of runtime to compat_sock_ioctl() with the long switch()
statement, but gain some cycles in return by simplifying
the call chain to get there.

Due to better inlining, save 1.5kb of object size in the
process, and enable further savings:

before:
   text    data     bss     dec     hex filename
  13540   18008    2080   33628    835c obj/fs/compat_ioctl.o
  14565     636      40   15241    3b89 obj/net/socket.o

after:
   text    data     bss     dec     hex filename
   8916   15176    2080   26172    663c obj/fs/compat_ioctl.o
  20725     636      40   21401    5399 obj/net/socket.o

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoappletalk: handle SIOCATALKDIFADDR compat ioctl
Arnd Bergmann [Fri, 6 Nov 2009 08:09:06 +0000 (08:09 +0000)]
appletalk: handle SIOCATALKDIFADDR compat ioctl

We must not have a compat ioctl handler for SIOCATALKDIFADDR
in common code, because the same number is used in other protocols
with different data structures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: copy socket ioctl code to net/socket.h
Arnd Bergmann [Sat, 7 Nov 2009 07:00:29 +0000 (23:00 -0800)]
net: copy socket ioctl code to net/socket.h

This makes an identical copy of the socket compat_ioctl code
from fs/compat_ioctl.c to net/socket.c, as a preparation
for moving the functionality in a way that can be easily
reviewed.

The code is hidden inside of #if 0 and gets activated in the
patch that will make it work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet, compat_ioctl: handle socket ioctl abuses in tty drivers
Arnd Bergmann [Sat, 7 Nov 2009 06:51:16 +0000 (22:51 -0800)]
net, compat_ioctl: handle socket ioctl abuses in tty drivers

Slip and a few other drivers use the same ioctl numbers on
tty devices that are normally meant for sockets. This causes
problems with our compat_ioctl handling that tries to convert
the data structures in a different format.

Fortunately, these five drivers all use 32 bit compatible
data structures in the ioctl numbers, so we can just add
a trivial compat_ioctl conversion function to each of them.

SIOCSIFENCAP and SIOCGIFENCAP do not need to live in
fs/compat_ioctl.c after this any more, and they are not
used on any sockets.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/tun: handle compat_ioctl directly
Arnd Bergmann [Sat, 7 Nov 2009 06:52:32 +0000 (22:52 -0800)]
net/tun: handle compat_ioctl directly

The tun driver is the only code in the kernel that operates
on a character device with struct ifreq. Change the driver
to handle the conversion itself so we can contain the
remaining ifreq handling in the socket layer.

This also fixes a bug in the handling of invalid ioctl
numbers on an unbound tun device. The driver treats this
as a TUNSETIFF in native mode, but there is no way for
the generic compat_ioctl() function to emulate this
behaviour. Possibly the driver was only doing this
accidentally anyway, but if any code relies on this
misfeature, it now also works in compat mode.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocompat: add struct compat_ifreq etc to compat.h
Arnd Bergmann [Fri, 6 Nov 2009 08:09:03 +0000 (08:09 +0000)]
compat: add struct compat_ifreq etc to compat.h

In order to move socket ioctl conversion code into multiple
places in the socket code, we need a common defintion of
the data structures it uses.

Also change the name from ifreq32 to compat_ifreq to
follow the naming convention for compat.h

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agohisax: remove bad udelay call to fix build error on ARM
Martin Michlmayr [Fri, 6 Nov 2009 14:52:34 +0000 (14:52 +0000)]
hisax: remove bad udelay call to fix build error on ARM

The hisax ISDN driver fails to build on ARM with CONFIG_HISAX_ELSA:

| drivers/built-in.o: In function `modem_set_dial':
| drivers/isdn/hisax/elsa_ser.c:535: undefined reference to `__bad_udelay'
| drivers/isdn/hisax/elsa_ser.c:544: undefined reference to `__bad_udelay'
| drivers/built-in.o: In function `modem_set_init':
| drivers/isdn/hisax/elsa_ser.c:486: undefined reference to `__bad_udelay'
| [...]

According to the comment in arch/arm/include/asm/delay.h, __bad_udelay
is specifically designed on ARM to produce a build failure when udelay
is called with a value > 2000.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipip: Fix handling of DF packets when pmtudisc is OFF
Herbert Xu [Fri, 6 Nov 2009 10:37:41 +0000 (10:37 +0000)]
ipip: Fix handling of DF packets when pmtudisc is OFF

RFC 2003 requires the outer header to have DF set if DF is set
on the inner header, even when PMTU discovery is off for the
tunnel.  Our implementation does exactly that.

For this to work properly the IPIP gateway also needs to engate
in PMTU when the inner DF bit is set.  As otherwise the original
host would not be able to carry out its PMTU successfully since
part of the path is only visible to the gateway.

Unfortunately when the tunnel PMTU discovery setting is off, we
do not collect the necessary soft state, resulting in blackholes
when the original host tries to perform PMTU discovery.

This problem is not reproducible on the IPIP gateway itself as
the inner packet usually has skb->local_df set.  This is not
correctly cleared (an unrelated bug) when the packet passes
through the tunnel, which allows fragmentation to occur.  For
hosts behind the IPIP gateway it is readily visible with a simple
ping.

This patch fixes the problem by performing PMTU discovery for
all packets with the inner DF bit set, regardless of the PMTU
discovery setting on the tunnel itself.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Set PCIe reset type for EEH to fundamental.
Ron Mercer [Fri, 6 Nov 2009 07:44:58 +0000 (07:44 +0000)]
qlge: Set PCIe reset type for EEH to fundamental.

This device requires a fundamental reset when recovering from EEH.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix early exit from mbox cmd complete wait.
Ron Mercer [Fri, 6 Nov 2009 07:44:57 +0000 (07:44 +0000)]
qlge: Fix early exit from mbox cmd complete wait.

This line was accidentally left out of the previous commit #
da03945140a035a2962f7f93e359085596f20499 ("qlge: Fix firmware mailbox
command timeout.").

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix traffic hangs on Tx with ioatdma loaded
Don Skidmore [Fri, 6 Nov 2009 12:56:20 +0000 (12:56 +0000)]
ixgbe: fix traffic hangs on Tx with ioatdma loaded

When ioatdma was loaded we we were unable to transmit traffic.  We weren't
using the correct registers in ixgbe_update_tx_dca for 82599 systems.
Likewise in ixgbe_configure_tx() we weren't disabling the arbiter before
modifying MTQC.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled
Yi Zou [Fri, 6 Nov 2009 12:56:00 +0000 (12:56 +0000)]
ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled

When DCB is enabled, the ixgbe_check_tx_hang() should check the corresponding
TC's TXOFF in TFCS based on the TC that the tx ring belongs to. Adds a
function to map from the tx_ring hw reg_idx to the correspodning TC and read
TFCS accordingly.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix gso_max_size for 82599 when DCB is enabled
Yi Zou [Fri, 6 Nov 2009 12:55:38 +0000 (12:55 +0000)]
ixgbe: Fix gso_max_size for 82599 when DCB is enabled

The 32k gso_max_size when DCB is enabled is for 82598 only, not for 82599.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacsonic: fix crash on PowerBook 520
Finn Thain [Tue, 3 Nov 2009 03:42:40 +0000 (03:42 +0000)]
macsonic: fix crash on PowerBook 520

No-one seems to know where the PowerBook 500 series store their ethernet
MAC addresses. So, rather than crash, use a MAC address from the SONIC
CAM. Failing that, generate a random one.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>