firefly-linux-kernel-4.4.55.git
13 years agobatman-adv: Protect global TQ window with a spinlock
Linus Lüssing [Mon, 14 Mar 2011 22:43:40 +0000 (22:43 +0000)]
batman-adv: Protect global TQ window with a spinlock

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Make orig_node->router an rcu protected pointer
Linus Lüssing [Mon, 14 Mar 2011 22:43:37 +0000 (22:43 +0000)]
batman-adv: Make orig_node->router an rcu protected pointer

The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the orig_node->router need to be used, as well as spin/rcu locking.
Otherwise we might end up using a router pointer pointing to already
freed memory.

Therefore this commit introduces the safe getter method
orig_node_get_router().

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Simplify gw_check_election(), use gw_get_selected()
Linus Lüssing [Mon, 14 Mar 2011 22:43:33 +0000 (22:43 +0000)]
batman-adv: Simplify gw_check_election(), use gw_get_selected()

gw_get_selected() can get us the desired orig_node directly, therefore
reusing that function in gw_check_election().

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Make gateway_get_selected type safe
Linus Lüssing [Mon, 14 Mar 2011 22:43:30 +0000 (22:43 +0000)]
batman-adv: Make gateway_get_selected type safe

Make the return value explicit instead of (void *).

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Move bonding / iface alternating router search to own functions
Linus Lüssing [Mon, 14 Mar 2011 22:43:27 +0000 (22:43 +0000)]
batman-adv: Move bonding / iface alternating router search to own functions

This decreases the size of find_router() by outsourcing the router
search for the bonding and interface alternating modes to their own sub
functions. This shall make it easier to keep track of the correct
refcounting later.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agoatl1c: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:55:20 +0000 (00:55 -0700)]
atl1c: Fix set-but-unused variable.

The variable 'extra_size' is set but unused in
atl1c_configure_tx().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1e: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:54:51 +0000 (00:54 -0700)]
atl1e: Fix set-but-unused variable.

The variable 'tx_ring' is set but unused in
atl1e_init_ring_resources().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatlx: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:51:40 +0000 (00:51 -0700)]
atlx: Fix set-but-unused variable.

The variable 'tpc' is set but unused in atl1_intr_tx().
Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:50:58 +0000 (00:50 -0700)]
bonding: Fix set-but-unused variable.

The variable 'vlan_dev' is set but unused in
bond_send_gratuitous_arp().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: lec: Fix set-but-unused variables.
David S. Miller [Sun, 17 Apr 2011 07:48:01 +0000 (00:48 -0700)]
atm: lec: Fix set-but-unused variables.

The variable 'eth' is set but unused in lec_handle_bridge().  Also,
the variable 'priv' is set but unused in lane_module_cleanup().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoax25: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:46:45 +0000 (00:46 -0700)]
ax25: Fix set-but-unused variable.

The variable 's' is set but unused in ax25_protocol_release().
Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeconet: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:15:22 +0000 (00:15 -0700)]
econet: Fix set-but-unused variable.

#if 0'd out code for IP handling in aun_data_available() has
been commented out since the beginning, which makes the variable
"ip" set but not used.

Kill it off as well as the stub code.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodecnet: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:14:09 +0000 (00:14 -0700)]
decnet: Fix set-but-unused variable.

"next" in dn_rebuild_zone() is set but not actually used,
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:13:16 +0000 (00:13 -0700)]
pktgen: Fix set-but-unused variable.

"iph" in pktgen_output_ipsec() is set but never actually
used.  Kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: solos-pci: Fix set-but-unused variable.
David S. Miller [Sun, 17 Apr 2011 07:11:25 +0000 (00:11 -0700)]
atm: solos-pci: Fix set-but-unused variable.

This is just a readback to entire completion of a register
write, keep the readback but kill the unused variable.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: idt77252: Fix set-but-unused variables.
David S. Miller [Sun, 17 Apr 2011 07:10:17 +0000 (00:10 -0700)]
atm: idt77252: Fix set-but-unused variables.

Two cases here:

1) idt77252_rx_raw() really does not make any use of the
   extracted PTI field of the atm header.

2) idt77252_collect_stat() only uses the register values
   in code which has been compiled out by a "NOTDEF" cpp
   test for more than 10 years.  Just kill this NOTDEF
   code entirely, but keep the register reads in case
   they have side effects.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: he: Fix undefined sequence points.
David S. Miller [Sun, 17 Apr 2011 07:07:55 +0000 (00:07 -0700)]
atm: he: Fix undefined sequence points.

GCC complains in these queue index operations because we
perform operations of the form:

x = some_operation(++x);

which is undefined.  Replace with:

x = some_operation(x + 1);

which is well defined and provides the intended operation.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: eni: Kill set-but-unused variables.
David S. Miller [Sun, 17 Apr 2011 07:03:38 +0000 (00:03 -0700)]
atm: eni: Kill set-but-unused variables.

The variable eni_dev is initialized but never subsequently used in
these two functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: gianfar: convert to hw_features
Michał Mirosław [Fri, 15 Apr 2011 04:50:50 +0000 (04:50 +0000)]
net: gianfar: convert to hw_features

Note: I bet that gfar_set_features() don't really need a full reset.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: mlx4: convert to hw_features
Michał Mirosław [Fri, 15 Apr 2011 04:50:49 +0000 (04:50 +0000)]
net: mlx4: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: forcedeth: convert to hw_features
Michał Mirosław [Fri, 15 Apr 2011 04:50:49 +0000 (04:50 +0000)]
net: forcedeth: convert to hw_features

This also fixes a race around np->txrxctl_bits while changing RXCSUM offload.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dm9000: convert to hw_features
Michał Mirosław [Fri, 15 Apr 2011 04:50:49 +0000 (04:50 +0000)]
net: dm9000: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: spider_net: convert to hw_features
Michał Mirosław [Fri, 15 Apr 2011 04:50:49 +0000 (04:50 +0000)]
net: spider_net: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: minor cleanup to net_namespace.c.
Rob Landley [Fri, 15 Apr 2011 02:26:25 +0000 (02:26 +0000)]
net: minor cleanup to net_namespace.c.

Inline a small static function that's only ever called from one place.

Signed-off-by: Rob Landley <rlandley@parallels.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: RTA_PREFSRC support for ipv6 route source address selection
Daniel Walter [Wed, 13 Apr 2011 21:10:57 +0000 (21:10 +0000)]
ipv6: RTA_PREFSRC support for ipv6 route source address selection

[ipv6] Add support for RTA_PREFSRC

This patch allows a user to select the preferred source address
for a specific IPv6-Route. It can be set via a netlink message
setting RTA_PREFSRC to a valid IPv6 address which must be
up on the device the route will be bound to.

Signed-off-by: Daniel Walter <dwalter@barracuda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: ignore looped-back NA while dad is running
Daniel Walter [Wed, 13 Apr 2011 21:09:25 +0000 (21:09 +0000)]
ipv6: ignore looped-back NA while dad is running

[ipv6] Ignore looped-back NAs while in Duplicate Address Detection

If we send an unsolicited NA shortly after bringing up an
IPv6 address, the duplicate address detection algorithm
fails and the ip stays in tentative mode forever.
This is due a missing check if the NA is looped-back to us.

Signed-off-by: Daniel Walter <dwalter@barracuda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoip: ip_options_compile() resilient to NULL skb route
Eric Dumazet [Thu, 14 Apr 2011 05:55:37 +0000 (05:55 +0000)]
ip: ip_options_compile() resilient to NULL skb route

Scot Doyle demonstrated ip_options_compile() could be called with an skb
without an attached route, using a setup involving a bridge, netfilter,
and forged IP packets.

Let's make ip_options_compile() and ip_options_rcv_srr() a bit more
robust, instead of changing bridge/netfilter code.

With help from Hiroaki SHIMODA.

Reported-by: Scot Doyle <lkml@scotdoyle.com>
Tested-by: Scot Doyle <lkml@scotdoyle.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agorndis_host: Quirky devices are still 'point-to-point'
Ben Hutchings [Fri, 15 Apr 2011 06:23:45 +0000 (23:23 -0700)]
rndis_host: Quirky devices are still 'point-to-point'

My changes in commit 4d42d417be75d750b82798922b6e775915e11bce were
written some time before the introduction of FLAG_POINTTOPOINT, so
didn't include that flag in the new driver_info.  Change the new
driver_info to be consistent.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet-bonding: Adding support for throughputs larger than 65536 Mbps
David Decotigny [Wed, 13 Apr 2011 15:22:31 +0000 (15:22 +0000)]
net-bonding: Adding support for throughputs larger than 65536 Mbps

This updates the bonding driver to support v2.6.27-rc3 enhancements
(b11f8d8c aka. "ethtool: Expand ethtool_cmd.speed to 32 bits") which
allow to encode the Mbps link speed on 32-bits (Max 4 Pbps) instead of
16 (Max 65536 Mbps).

This patch also attempts to compact struct slave by reordering its
fields.

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet-bonding: Fix minor/cosmetic type inconsistencies
David Decotigny [Wed, 13 Apr 2011 15:22:30 +0000 (15:22 +0000)]
net-bonding: Fix minor/cosmetic type inconsistencies

The __get_link_speed() function returns a u16 value which was stored
in a u32 local variable. This patch uses the return value directly,
thus fixing that minor type consistency.

The 'duplex' field in struct slave being encoded on 8 bits, to be more
consistent we use a u8 integer (instead of u16) whenever we copy it to
local variables.

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet-bonding: Fix minor sparse complaints
David Decotigny [Wed, 13 Apr 2011 15:22:29 +0000 (15:22 +0000)]
net-bonding: Fix minor sparse complaints

This gets rid of minor sparse complaints:
drivers/net/bonding/bond_main.c:4361:4: warning: do-while statement is not a compound statement
drivers/net/bonding/bond_main.c:243:12: warning: symbol 'bond_mode_name' was not declared. Should it be static?

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: make nic_operations struct const
stephen hemminger [Thu, 14 Apr 2011 05:51:52 +0000 (05:51 +0000)]
qlge: make nic_operations struct const

The struct nic_operations is just function pointers and should be
declared const for added security.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: make function tables const
stephen hemminger [Thu, 14 Apr 2011 05:50:12 +0000 (05:50 +0000)]
sfc: make function tables const

The phy, mac, and board information structures should be const.
Since tables contain function pointer this improves security
(at least theoretically).

Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoPhonet: convert bound sockets hash list to RCU
Rémi Denis-Courmont [Tue, 12 Apr 2011 23:27:36 +0000 (23:27 +0000)]
Phonet: convert bound sockets hash list to RCU

This gets rid of the last spinlock in the Phonet stack proper.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: allow custom interval for physical identification
Allan, Bruce W [Wed, 13 Apr 2011 13:09:10 +0000 (13:09 +0000)]
ethtool: allow custom interval for physical identification

When physical identification of an adapter is done by toggling the
mechanism on and off through software utilizing the set_phys_id operation,
it is done with a fixed duration for both on and off states.  Some drivers
may want to set a custom duration for the on/off intervals.  This patch
changes the API so the return code from the driver's entry point when it
is called with ETHTOOL_ID_ACTIVE can specify the frequency at which to
cycle the on/off states, and updates the drivers that have already been
converted to use the new set_phys_id and use the synchronous method for
identifying an adapter.

The physical identification frequency set in the updated drivers is based
on how it was done prior to the introduction of set_phys_id.

Compile tested only.  Also fixes a compiler warning in sfc.

v2: drivers do not return -EINVAL for ETHOOL_ID_ACTIVE
v3: fold patchset into single patch and cleanup per Ben's feedback

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
Cc: Don Fry <pcnet32@frontier.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
Cc: Steve Hodgson <shodgson@solarflare.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Matt Carlson <mcarlson@broadcom.com>
Acked-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Call fib_select_default() only when actually necessary.
David S. Miller [Thu, 14 Apr 2011 21:49:37 +0000 (14:49 -0700)]
ipv4: Call fib_select_default() only when actually necessary.

fib_select_default() is a complete NOP, and completely pointless
to invoke, when we have no more than 1 default route installed.

And this is far and away the common case.

So remember how many prefixlen==0 routes we have in the routing
table, and elide the call when we have no more than one of those.

This cuts output route creation time by 157 cycles on Niagara2+.

In order to add the new int to fib_table, we have to correct the type
of ->tb_data[] to unsigned long, otherwise the private area will be
unaligned on 64-bit systems.

Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agobna: fix memory leak during RX path cleanup
Rasesh Mody [Thu, 14 Apr 2011 08:05:19 +0000 (08:05 +0000)]
bna: fix memory leak during RX path cleanup

The memory leak was caused by unintentional assignment of the Rx path
destroy callback function pointer to NULL just after correct
initialization.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: fix for clean fw re-initialization
Rasesh Mody [Thu, 14 Apr 2011 08:05:18 +0000 (08:05 +0000)]
bna: fix for clean fw re-initialization

During a kernel crash, bna control path state machine and firmware do not
get a notification and hence are not cleanly shutdown. The registers
holding driver/IOC state information are not reset back to valid
disabled/parking values. This causes subsequent driver initialization
to hang during kdump kernel boot. This patch, during the initialization
of first PCI function, resets corresponding register when unclean shutown
is detect by reading chip registers. This will make sure that ioc/fw
gets clean re-initialization.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 14 Apr 2011 20:16:51 +0000 (13:16 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agousbnet: Fix up 'FLAG_POINTTOPOINT' and 'FLAG_MULTI_PACKET' overlaps.
huajun li [Wed, 13 Apr 2011 15:43:32 +0000 (15:43 +0000)]
usbnet: Fix up 'FLAG_POINTTOPOINT' and 'FLAG_MULTI_PACKET' overlaps.

USB tethering does not work anymore since 2.6.39-rc2, but it's okay in
-rc1. The root cause is the new added mask code 'FLAG_POINTTOPOINT'
overlaps 'FLAG_MULTI_PACKET'  in  include/linux/usb/usbnet.h, this
causes logic issue in  rx_process(). This patch cleans up the overlap.

Reported-and-Tested-by: Gottfried Haider <gottfried.haider@gmail.com>
Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: AX.25, NETROM, ROSE: Remove SOCK_DEBUG calls
Ralf Baechle [Thu, 14 Apr 2011 07:20:07 +0000 (00:20 -0700)]
NET: AX.25, NETROM, ROSE: Remove SOCK_DEBUG calls

Nobody alive seems to recall when they last were useful.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: DCB, X540 devices do not respond to pause frames
John Fastabend [Mon, 4 Apr 2011 04:29:46 +0000 (04:29 +0000)]
ixgbe: DCB, X540 devices do not respond to pause frames

DCB enabled X540 devices are not responding to pause frames
due to a missing register set that was added for these
devices that did not exist in other devices.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, misallocated packet buffer size with X540 device
John Fastabend [Mon, 4 Apr 2011 04:29:41 +0000 (04:29 +0000)]
ixgbe: DCB, misallocated packet buffer size with X540 device

The X540 device has a smaller packet buffer but the DCB configuration
never took this into account. Under stress this can result in the DMA
engine hanging and TX Unit hang occurring to reset the device. This
patch reworks the packet buffer allocation routine used for DCB on
82599 and X540 devices to account for RX packet buffer sizes.

This fixes the immediate hang. We should consolidate the various
hardware specific routines for configuring features into a single
routine. This will make it much harder to miss feature cases like
this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: make device_caps() generic
Emil Tantilov [Thu, 31 Mar 2011 09:36:18 +0000 (09:36 +0000)]
ixgbe: make device_caps() generic

x540 has the same device capability word in the EEPROM as 82599.
This patch renames ixgbe_get_device_caps_82599 to
ixgbe_get_device_caps_generic, moves it to ixgbe_common.h and
sets up the function pointer for x540.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: explicitly disable 100H for x540
Emil Tantilov [Thu, 31 Mar 2011 09:36:12 +0000 (09:36 +0000)]
ixgbe: explicitly disable 100H for x540

100H is not supported on this HW, but the bit is set on the PHY.
This can result in link at 100F when advertising only 1000F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add support for new HW
Emil Tantilov [Thu, 24 Mar 2011 07:06:02 +0000 (07:06 +0000)]
ixgbe: add support for new HW

Add new device ID supported by ixgbe.

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>
13 years agoixgbe: fix semaphores in eeprom routines for x540
Emil Tantilov [Thu, 24 Mar 2011 00:57:50 +0000 (00:57 +0000)]
ixgbe: fix semaphores in eeprom routines for x540

HW can upload EEPROM content from flash while
in a middle of checksum calculation. Take NVM ownership for the whole
process of checksum update.

Call ixgbe_read_eerd_generic() and ixgbe_write_eewr_generic() directly to
avoid double take of semaphores which leads to long loading times.

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>
13 years agoixgbe: cleanup short msleep's (<20ms) to use usleep_range
Don Skidmore [Fri, 18 Mar 2011 09:32:53 +0000 (09:32 +0000)]
ixgbe: cleanup short msleep's (<20ms) to use usleep_range

Since msleep might not sleep for the desired amount when less
than 20ms use usleep_range.

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>
13 years agoixgbe: fix 82599 KR downshift coexistence with LESM FW module
Emil Tantilov [Fri, 18 Mar 2011 08:18:32 +0000 (08:18 +0000)]
ixgbe: fix 82599 KR downshift coexistence with LESM FW module

Disable KR to KX4/KX downshift on 82599 backplane devices when
LESM (Link Establishment State Machine) is enabled in FW. Those
features cannot co-exist as they both manipulate the same registers.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phillip Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: move disabling of relaxed ordering in start_hw()
Emil Tantilov [Sat, 19 Mar 2011 01:32:46 +0000 (01:32 +0000)]
ixgbe: move disabling of relaxed ordering in start_hw()

Relaxed ordering can lead to issues with some chipsets.

This patch makes sure that it is disabled by default and
not only when DCA is on.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: refactor common start_hw code for 82599 and x540
Emil Tantilov [Fri, 18 Mar 2011 08:18:22 +0000 (08:18 +0000)]
ixgbe: refactor common start_hw code for 82599 and x540

Factored out the common start_hw code into a new function
ixgbe_start_hw_gen2() so that it can be used by x540 and 82599.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: update version string for Dell CEM use
Jeff Kirsher [Thu, 17 Mar 2011 18:11:38 +0000 (18:11 +0000)]
ixgbe: update version string for Dell CEM use

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
13 years agoixgbe: fix namespacecheck issue
Emil Tantilov [Wed, 16 Mar 2011 01:58:20 +0000 (01:58 +0000)]
ixgbe: fix namespacecheck issue

Set ixgbe_identify_82599() as static

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>
13 years agoixgbe: correct function number for some 82598 parts
Emil Tantilov [Wed, 16 Mar 2011 01:55:55 +0000 (01:55 +0000)]
ixgbe: correct function number for some 82598 parts

Some 82598 parts have LAN0 disabled and LAN1 enabled and the LAN ID bits in
Device Status register report the NIC as having only LAN1 as enabled. This
causes ixgbe_set_lan_id_multi_port_pcie() to set bus->func = 1 which is
incorrect.

Force bus->func to 0 when LAN0 is disabled in the EEPROM.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix return value checks
Emil Tantilov [Sat, 12 Mar 2011 08:56:38 +0000 (08:56 +0000)]
ixgbe: fix return value checks

The value of status was incorrectly tested. Also whitespace cleanup.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, further cleanups to app configuration
John Fastabend [Sat, 12 Mar 2011 03:50:53 +0000 (03:50 +0000)]
ixgbe: DCB, further cleanups to app configuration

With the app data on the kernel dcb_app list we no longer
need to specifically handle them in ixgbe for the CEE case.
So now we can remove app handling logic and check when the
hw is configured if the app data matches the hardware
configuration in set_hw_all().

If it does not match then we can reconfigure.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: If ASPM L0s needs to be disabled, do it prior to enabling device
Bruce Allan [Thu, 24 Mar 2011 03:09:03 +0000 (03:09 +0000)]
e1000e: If ASPM L0s needs to be disabled, do it prior to enabling device

Based on a patch from Naga Chumbalkar <nagananda.chumbalkar@hp.com>:

If ASPM L0s needs to be disabled due to HW errata, do it prior to
"enabling" the device. This way if the kernel ever defaults its
aspm_policy to POLICY_POWERSAVE, then the e1000e driver will get a
chance to disable ASPM on the misbehaving device *prior* to calling
pci_enable_device_mem(). This will be useful in situations
where the BIOS indicates ASPM support on the server by clearing the
ACPI FADT "ASPM Controls" bit.

Note:
The kernel (2.6.38) currently uses the BIOS "default" as its aspm_policy.
However, Linux distros can diverge from that and set the default to
"powersave".

v2: o cleanup namespace pollution of e1000e_disable_aspm(),
    o fix type and initialization of the new aspm_disable_flag in a few
      functions, and
    o redefine FLAG2_DISABLE_ASPM_L0S to the first unused bit in
      adapter->flags2.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: fix stats locking in e1000_watchdog_task
Flavio Leitner [Tue, 5 Apr 2011 04:27:43 +0000 (04:27 +0000)]
e1000e: fix stats locking in e1000_watchdog_task

Just move the unlock down a bit because it unlocks too
early leaving a chance for get_stats64() run in parallel
while it is still accessing the stats.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: convert to new VLAN model
Jeff Kirsher [Fri, 25 Mar 2011 16:01:01 +0000 (16:01 +0000)]
e1000e: convert to new VLAN model

This switches the e1000e driver to use the new VLAN interfaces.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
13 years agoe1000e: PCIe link speed in GT/s, not GB/s
Bruce Allan [Sat, 19 Mar 2011 00:31:23 +0000 (00:31 +0000)]
e1000e: PCIe link speed in GT/s, not GB/s

Correct the log message when driver loads.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: convert short duration msleep() to usleep_range()
Bruce Allan [Sat, 19 Mar 2011 00:27:20 +0000 (00:27 +0000)]
e1000e: convert short duration msleep() to usleep_range()

With durations less than 20ms, the jiffies or legacy timer backed msleep()
may sleep ~20ms which might not be what the caller expects.  Instead, it
is recommended to use the hrtimers backed usleep_range().  For more, see
Documentation/timers/timers-howto.txt.  Issues reported by checkpatch.

In addition, remove unnecessary sleep in e1000e_write_nvm_spi().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: introduce igb_thermal_sensor_event for sensor checking
Stefan Assmann [Tue, 5 Apr 2011 04:27:15 +0000 (04:27 +0000)]
igb: introduce igb_thermal_sensor_event for sensor checking

The code for thermal sensor checking should be wrapped into a function.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: fix typo in igb_validate_nvm_checksum_82580
Stefan Assmann [Tue, 5 Apr 2011 04:27:05 +0000 (04:27 +0000)]
igb: fix typo in igb_validate_nvm_checksum_82580

Comment spelling fix.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Add anti-spoofing feature documentation
Greg Rose [Sat, 12 Mar 2011 11:56:02 +0000 (11:56 +0000)]
igb: Add anti-spoofing feature documentation

Add the documentation for the anti-spoofing feature in the HW.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agonet: allow shifted access in smsc911x V2
Mathieu J. Poirier [Thu, 14 Apr 2011 00:13:00 +0000 (17:13 -0700)]
net: allow shifted access in smsc911x V2

This is a revised patch that permits a shifted access to the
LAN9221 registers.  More specifically:

 It adds a shift parameter in the platform_data.
 It introduces an ops in smsc911x_data.
 A choice of access function to use at run-time.
 Four new shifted access function.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add support for extended VPD blocks
Matt Carlson [Wed, 13 Apr 2011 11:05:08 +0000 (11:05 +0000)]
tg3: Add support for extended VPD blocks

In some devices, the VPD block is relocated to a different area in
NVRAM.  The original location can still contain old, but still valid VPD
data.  This patch changes the code to look for an extended VPD block in
NVRAM.  If one is found, that block is used for all VPD operations
instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add jumbo frame loopback tests to selftest
Matt Carlson [Wed, 13 Apr 2011 11:05:07 +0000 (11:05 +0000)]
tg3: Add jumbo frame loopback tests to selftest

This patch adds jumbo frame loopback test support to the ethtool
selftest.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Automatically size stat/test string arrays
Matt Carlson [Wed, 13 Apr 2011 11:05:06 +0000 (11:05 +0000)]
tg3: Automatically size stat/test string arrays

This patch reimplements the size preprocessor constants of the stats and
ethtool test string arrays.  The size is calculated at compile time
rather than using static constants.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Dump registers when status block shows errors
Matt Carlson [Wed, 13 Apr 2011 11:05:05 +0000 (11:05 +0000)]
tg3: Dump registers when status block shows errors

This patch monitors the error bit of the status word within the status
block.  If it is set, the driver will dump the driver state after
validating the error and then reset the chip.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Provide full regdump on tx timeout
Matt Carlson [Wed, 13 Apr 2011 11:05:04 +0000 (11:05 +0000)]
tg3: Provide full regdump on tx timeout

The current amount of information provided in the output of a tx timeout
is insufficient to determine a root cause.  This patch replaces the
terse, four-register status output with a more complete body of
information.  For PCIe devices, the full register space is dumped.  For
other devices, select registers are dumped instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agorndis_host: Poll status before control channel where necessary
Ben Hutchings [Wed, 13 Apr 2011 21:48:55 +0000 (14:48 -0700)]
rndis_host: Poll status before control channel where necessary

Some RNDIS devices don't respond on the control channel until polled
on the status channel.  In particular, this was reported to be the
case for the 2Wire HomePortal 1000SW and for some Windows Mobile
devices.

This is roughly based on a patch by John Carr <john.carr@unrouted.co.uk>
which is currently applied by Mandriva.

Reported-by: Mark Glassberg <vzeeaxwl@myfairpoint.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoiwlegacy: fix tx_power initialization
Stanislaw Gruszka [Wed, 13 Apr 2011 08:56:51 +0000 (10:56 +0200)]
iwlegacy: fix tx_power initialization

priv->tx_power_next is not initialized to max supported power,
but instead default value is used, what cause errors like

[   58.597834] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   58.597839] iwl3945 0000:03:00.0: Error setting Tx power (-22).

if maximum tx power read from the eeprom is smaller than default.
In consequence card is unable to initialize properly. Fix the problem
and cleanup tx power initialization.

Reported-and-tested-by: Robin Dong <hao.bigrat@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "tcp: disallow bind() to reuse addr/port"
David S. Miller [Wed, 13 Apr 2011 19:01:14 +0000 (12:01 -0700)]
Revert "tcp: disallow bind() to reuse addr/port"

This reverts commit c191a836a908d1dd6b40c503741f91b914de3348.

It causes known regressions for programs that expect to be able to use
SO_REUSEADDR to shutdown a socket, then successfully rebind another
socket to the same ID.

Programs such as haproxy and amavisd expect this to work.

This should fix kernel bugzilla 32832.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: limit skb frags for non tso packet
Amit Kumar Salecha [Tue, 12 Apr 2011 17:05:55 +0000 (17:05 +0000)]
qlcnic: limit skb frags for non tso packet

Machines are getting deadlock in four node cluster environment.
All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
200 GB storage on a GFS2 filesystem.
This result in memory fragmentation and driver receives 18 frags for
1448 byte packets.
For non tso packet, fw drops the tx request, if it has >14 frags.

Fixing it by pulling extra frags.

Cc: stable@kernel.org
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: review Wol and enable the Unicast support
Giuseppe Cavallaro [Wed, 13 Apr 2011 18:51:43 +0000 (11:51 -0700)]
stmmac: review Wol and enable the Unicast support

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacb: Add rx overrun counter
Alexander Stein [Wed, 13 Apr 2011 05:03:24 +0000 (05:03 +0000)]
macb: Add rx overrun counter

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: can: mscan: fix build breakage in mpc5xxx_can
Anatolij Gustschin [Tue, 12 Apr 2011 23:49:28 +0000 (23:49 +0000)]
net: can: mscan: fix build breakage in mpc5xxx_can

Commit 74888760d40b3ac9054f9c5fa07b566c0676ba2d
"dt/net: Eliminate users of of_platform_{,un}register_driver"
broke building mscan driver. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ethtool support to configure number of channels
amit salecha [Thu, 7 Apr 2011 01:58:42 +0000 (01:58 +0000)]
net: ethtool support to configure number of channels

Ethtool support to configure RX, TX and other channels. combined field
in struct ethtool_channels to reflect set of channel (RX, TX or other).
Other channel can be link interrupts, SR-IOV coordination etc.

ETHTOOL_GCHANNELS will report max and current number of RX channels,
max and current number of TX channels, max and current number of other channel
or max and current number of combined channel.

Number of channel can be modify upto max number of channel through
ETHTOOL_SCHANNELS command.

Ben Hutchings:
o define 'combined' and 'other' types.  Most multiqueue drivers pair up RX and TX
  queues so that most channels combine RX and TX work.
o Please could you use a kernel-doc comment to describe the structure.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: ipset: SCTP, UDPLITE support added
Jozsef Kadlecsik [Wed, 13 Apr 2011 11:51:38 +0000 (13:51 +0200)]
netfilter: ipset: SCTP, UDPLITE support added

SCTP and UDPLITE port support added to the hash:*port* set types.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agosctp: fix oops while removed transport still using as retran path
Wei Yongjun [Tue, 12 Apr 2011 15:22:22 +0000 (15:22 +0000)]
sctp: fix oops while removed transport still using as retran path

Since we can not update retran path to unconfirmed transports,
when we remove a peer, the retran path may not be update if the
other transports are all unconfirmed, and we will still using
the removed transport as the retran path. This may cause panic
if retrasnmit happen.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: fix oops when updating retransmit path with DEBUG on
Vlad Yasevich [Tue, 12 Apr 2011 15:20:48 +0000 (15:20 +0000)]
sctp: fix oops when updating retransmit path with DEBUG on

commit fbdf501c9374966a56829ecca3a7f25d2b49a305
  sctp: Do no select unconfirmed transports for retransmissions

Introduced the initial falt.

commit d598b166ced20d9b9281ea3527c0e18405ddb803
  sctp: Make sure we always return valid retransmit path

Solved the problem, but forgot to change the DEBUG statement.
Thus it was still possible to dereference a NULL pointer.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Disable NETIF_F_TSO_ECN when TSO is disabled
Ben Hutchings [Tue, 12 Apr 2011 14:47:15 +0000 (14:47 +0000)]
net: Disable NETIF_F_TSO_ECN when TSO is disabled

NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
that feature state will be accurately reported to user-space.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Disable all TSO features when SG is disabled
Ben Hutchings [Tue, 12 Apr 2011 14:38:37 +0000 (14:38 +0000)]
net: Disable all TSO features when SG is disabled

The feature flags NETIF_F_TSO and NETIF_F_TSO6 independently enable
TSO for IPv4 and IPv6 respectively.  However, the test in
netdev_fix_features() and its predecessor functions was never updated
to check for NETIF_F_TSO6, possibly because it was originally proposed
that TSO for IPv6 would be dependent on both feature flags.

Now that these feature flags can be changed independently from
user-space and we depend on netdev_fix_features() to fix invalid
feature combinations, it's important to disable them both if
scatter-gather is disabled.  Also disable NETIF_F_TSO_ECN so
user-space sees all TSO features as disabled.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Missing 'inline' in vlan-disabled vlan_untag()
David S. Miller [Wed, 13 Apr 2011 02:27:51 +0000 (19:27 -0700)]
net: Missing 'inline' in vlan-disabled vlan_untag()

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'sfc-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6
David S. Miller [Wed, 13 Apr 2011 00:10:52 +0000 (17:10 -0700)]
Merge branch 'sfc-2.6.39' of git://git./linux/kernel/git/bwh/sfc-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 12 Apr 2011 23:16:02 +0000 (16:16 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoatm: iphase: Fix set-but-not-used warnings.
David S. Miller [Tue, 12 Apr 2011 23:14:21 +0000 (16:14 -0700)]
atm: iphase: Fix set-but-not-used warnings.

The "iavcc" and "iadev" cases are obvious.

The intr_status and frmr_intr cases are reading a register to clear
the chip status.  This driver is pretty old and creaky, and uses
volatile pointer dereferences to do register I/O when it should be
using readl() and friends.  However that it outside of the scope of
these changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years ago9p: Kill set but unused variable in 9p_client_{read,write}() and p9_client_readdir()
David S. Miller [Tue, 12 Apr 2011 22:58:41 +0000 (15:58 -0700)]
9p: Kill set but unused variable in 9p_client_{read,write}() and p9_client_readdir()

Fixes the following warnings:

net/9p/client.c:1305:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1370:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1769:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Use rmb() to ensure reads occur in order
Neil Turton [Mon, 11 Apr 2011 10:42:43 +0000 (11:42 +0100)]
sfc: Use rmb() to ensure reads occur in order

Enabling write-combining may also enable read reordering.  The BIU is
only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
the host reads from its lowest address; otherwise the BIU may use the
latched value.  Therefore we need to reinstate the read memory
barriers after the first read operation for each CSR or SRAM word.

Signed-off-by; Ben Hutchings <bhutchings@solarflare.com>

13 years agoieee802154: Remove hacked CFLAGS in net/ieee802154/Makefile
David S. Miller [Tue, 12 Apr 2011 22:33:23 +0000 (15:33 -0700)]
ieee802154: Remove hacked CFLAGS in net/ieee802154/Makefile

It adds -Wall (which the kernel carefully controls already) and of all
things -DDEBUG (which should be set by other means if desired, please
we have dynamic-debug these days).

Kill this noise.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoirda: fix locking unbalance in irda_sendmsg
Dave Jones [Tue, 12 Apr 2011 22:29:54 +0000 (15:29 -0700)]
irda: fix locking unbalance in irda_sendmsg

5b40964eadea40509d353318d2c82e8b7bf5e8a5 ("irda: Remove BKL instances
from af_irda.c") introduced a path where we have a locking unbalance.
If we pass invalid flags, we unlock a socket we never locked,
resulting in this...

=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
trinity/20101 is trying to release lock (sk_lock-AF_IRDA) at:
[<ffffffffa057f001>] irda_sendmsg+0x207/0x21d [irda]
but there are no more locks to release!

other info that might help us debug this:
no locks held by trinity/20101.

stack backtrace:
Pid: 20101, comm: trinity Not tainted 2.6.39-rc3+ #3
Call Trace:
 [<ffffffffa057f001>] ? irda_sendmsg+0x207/0x21d [irda]
 [<ffffffff81085041>] print_unlock_inbalance_bug+0xc7/0xd2
 [<ffffffffa057f001>] ? irda_sendmsg+0x207/0x21d [irda]
 [<ffffffff81086aca>] lock_release+0xcf/0x18e
 [<ffffffff813ed190>] release_sock+0x2d/0x155
 [<ffffffffa057f001>] irda_sendmsg+0x207/0x21d [irda]
 [<ffffffff813e9f8c>] __sock_sendmsg+0x69/0x75
 [<ffffffff813ea105>] sock_sendmsg+0xa1/0xb6
 [<ffffffff81100ca3>] ? might_fault+0x5c/0xac
 [<ffffffff81086b7c>] ? lock_release+0x181/0x18e
 [<ffffffff81100cec>] ? might_fault+0xa5/0xac
 [<ffffffff81100ca3>] ? might_fault+0x5c/0xac
 [<ffffffff81133b94>] ? fcheck_files+0xb9/0xf0
 [<ffffffff813f387a>] ? copy_from_user+0x2f/0x31
 [<ffffffff813f3b70>] ? verify_iovec+0x52/0xa6
 [<ffffffff813eb4e3>] sys_sendmsg+0x23a/0x2b8
 [<ffffffff81086b7c>] ? lock_release+0x181/0x18e
 [<ffffffff810773c6>] ? up_read+0x28/0x2c
 [<ffffffff814bec3d>] ? do_page_fault+0x360/0x3b4
 [<ffffffff81087043>] ? trace_hardirqs_on_caller+0x10b/0x12f
 [<ffffffff810458aa>] ? finish_task_switch+0xb2/0xe3
 [<ffffffff8104583e>] ? finish_task_switch+0x46/0xe3
 [<ffffffff8108364a>] ? trace_hardirqs_off_caller+0x33/0x90
 [<ffffffff814bbaf9>] ? retint_swapgs+0x13/0x1b
 [<ffffffff81087043>] ? trace_hardirqs_on_caller+0x10b/0x12f
 [<ffffffff810a9dd3>] ? audit_syscall_entry+0x11c/0x148
 [<ffffffff8125609e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff814c22c2>] system_call_fastpath+0x16/0x1b

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/natsami: store MAC into perm_addr
Otavio Salvador [Tue, 12 Apr 2011 05:30:41 +0000 (05:30 +0000)]
net/natsami: store MAC into perm_addr

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/sis900: store MAC into perm_addr for SiS 900, 630E, 635 and 96x variants
Otavio Salvador [Tue, 12 Apr 2011 05:30:40 +0000 (05:30 +0000)]
net/sis900: store MAC into perm_addr for SiS 900, 630E, 635 and 96x variants

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: vlan_features comment clarification
Michał Mirosław [Tue, 12 Apr 2011 04:07:39 +0000 (04:07 +0000)]
net: vlan_features comment clarification

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ioc3: convert to hw_features
Michał Mirosław [Tue, 12 Apr 2011 09:48:17 +0000 (09:48 +0000)]
net: ioc3: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: bnx2x: convert to hw_features
Michał Mirosław [Tue, 12 Apr 2011 09:38:23 +0000 (09:38 +0000)]
net: bnx2x: convert to hw_features

Since ndo_fix_features callback is postponing features change when
bp->recovery_state != BNX2X_RECOVERY_DONE, netdev_update_features()
has to be called again when this condition changes. Previously,
ethtool_ops->set_flags callback returned -EBUSY in that case
(it's not possible in the new model).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
v5: - don't delay set_features, as it's rtnl_locked - same as recovery process
v4: - complete bp->rx_csum -> NETIF_F_RXCSUM conversion
    - add check for failed ndo_set_features in ndo_open callback
v3: - include NETIF_F_LRO in hw_features
    - don't call netdev_update_features() if bnx2x_nic_load() failed
v2: - comment in ndo_fix_features callback
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: bna: convert to hw_features
Michał Mirosław [Tue, 12 Apr 2011 09:38:23 +0000 (09:38 +0000)]
net: bna: convert to hw_features

Note: looks like bnad->conf_mutex is duplicating rtnl_lock.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ps3_gelic: convert to hw_features
Michał Mirosław [Sun, 10 Apr 2011 04:49:55 +0000 (04:49 +0000)]
net: ps3_gelic: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sky2: convert to hw_features
Michał Mirosław [Sun, 10 Apr 2011 03:13:21 +0000 (03:13 +0000)]
net: sky2: convert to hw_features

Caveats:
 - driver modifies vlan_features on HW VLAN TX changes
 - broken RX checksum will be reenabled on features change

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoconnector: fix skb double free in cn_rx_skb()
Patrick McHardy [Tue, 12 Apr 2011 05:39:51 +0000 (05:39 +0000)]
connector: fix skb double free in cn_rx_skb()

When a skb is delivered to a registered callback, cn_call_callback()
incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
to free the skb a second time.

Reported-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Tested-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: David S. Miller <davem@davemloft.net>