openwrt/staging/blogic.git
13 years agoethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple
Alexander Duyck [Fri, 8 Apr 2011 12:07:22 +0000 (12:07 +0000)]
ethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple

This change is meant to prevent a possible null pointer dereference if
NETIF_F_NTUPLE is defined but the set_rx_ntuple function pointer is not.

The main motivation behind this patch is to eventually replace the ntuple
interfaces entirely with the network flow classifier interfaces.  This
allows the device drivers to maintain the ntuple check internally while
using the network flow classifier interface for setting up and displaying
rules.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: bnx2: convert to hw_features
Michał Mirosław [Sun, 10 Apr 2011 04:47:46 +0000 (04:47 +0000)]
net: bnx2: 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: via-velocity: convert to hw_features
Michał Mirosław [Sun, 10 Apr 2011 03:13:21 +0000 (03:13 +0000)]
net: via-velocity: convert to hw_features

Trivial conversion.

This also enables toggling TX VLAN offload and fixes TX checksumming
race with offload changes.

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

This also fixes possible race when changing receive checksum state
and removes IPV6_CSUM_GEN_HACK as it's always set.

BTW, The claim about fake IPV6 checksum looks dubious. If that were true,
then there's a problem in networking core and should be fixed there and not
in random drivers.

BTW#2, there's no MAINTAINERS entry for this driver. I assume this driver
is supported by Micrel?

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

This also removes TSO as it's made fully in software --- better to leave this
to networking core.

If the MAC features can be detected at probe time and not at open, then
stmmac_fix_features could be simplified by limiting hw_features. That's
also better for users as they don't see offloads being togglable but
never turned on.

Redundant fallbacks for TX csum are removed as it's already handled
by network core.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: 8139cp: convert to hw_features
Michał Mirosław [Sat, 9 Apr 2011 00:58:18 +0000 (00:58 +0000)]
net: 8139cp: 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: r8169: convert to hw_features
Michał Mirosław [Fri, 8 Apr 2011 06:35:56 +0000 (06:35 +0000)]
net: r8169: convert to hw_features

Simple conversion with a bit of needed cleanup.

This also fixes:
 - confusion around vlan_features in rtl8169_vlan_mode(),
 - problem with broken TSO for too big MTU (the limit is set
   at 0xFFF --- max MSS field value).

SG+IP_CSUM+TSO is left disabled by default, based on suggestion by
David Dillow.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: benet: convert to hw_features - fixup
Michał Mirosław [Fri, 8 Apr 2011 02:38:47 +0000 (02:38 +0000)]
net: benet: convert to hw_features - fixup

Fix up after merge with NETIF_F_RXHASH implementation.

This allows to toggle NETIF_F_RXHASH and NETIF_F_HW_VLAN_TX.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove invalid offloads
Michał Mirosław [Fri, 8 Apr 2011 02:38:46 +0000 (02:38 +0000)]
net: Remove invalid offloads

Remove offload changing ethtool ops which drivers don't really support:

 - fs_enet
 - ucc_geth

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoDisable rp_filter for IPsec packets
Michael Smith [Thu, 7 Apr 2011 04:51:51 +0000 (04:51 +0000)]
Disable rp_filter for IPsec packets

The reverse path filter interferes with IPsec subnet-to-subnet tunnels,
especially when the link to the IPsec peer is on an interface other than
the one hosting the default route.

With dynamic routing, where the peer might be reachable through eth0
today and eth1 tomorrow, it's difficult to keep rp_filter enabled unless
fake routes to the remote subnets are configured on the interface
currently used to reach the peer.

IPsec provides a much stronger anti-spoofing policy than rp_filter, so
this patch disables the rp_filter for packets with a security path.

Signed-off-by: Michael Smith <msmith@cbnco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofib_validate_source(): pass sk_buff instead of mark
Michael Smith [Thu, 7 Apr 2011 04:51:50 +0000 (04:51 +0000)]
fib_validate_source(): pass sk_buff instead of mark

This makes sk_buff available for other use in fib_validate_source().

Signed-off-by: Michael Smith <msmith@cbnco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousb: plusb: Add debug to reset function
simon [Wed, 6 Apr 2011 21:40:15 +0000 (21:40 +0000)]
usb: plusb: Add debug to reset function

This patch adds some debug to the reset function to print out the
reason why it fails.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousb: plusb: Add support for PL-25A1
simon [Wed, 6 Apr 2011 21:40:14 +0000 (21:40 +0000)]
usb: plusb: Add support for PL-25A1

This patch adds support for the PL-25A1 by adding the appropriate
USB ID's. This chip is used in the Belkin 'Windows Easy Transfer'
Cables.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousb: plusb: Whitespace
simon [Wed, 6 Apr 2011 21:40:13 +0000 (21:40 +0000)]
usb: plusb: Whitespace

This patch cleans up a couple of instances of incorrect whitespace

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: drop phys_id interface and implement the newer set_phys_id
Dimitris Michailidis [Fri, 8 Apr 2011 20:07:08 +0000 (13:07 -0700)]
cxgb4vf: drop phys_id interface and implement the newer set_phys_id

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: drop phys_id interface and implement the newer set_phys_id
Dimitris Michailidis [Fri, 8 Apr 2011 20:06:25 +0000 (13:06 -0700)]
cxgb4: drop phys_id interface and implement the newer set_phys_id

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix rtnl deadlock
Michael Chan [Fri, 8 Apr 2011 20:03:02 +0000 (13:03 -0700)]
cnic: Fix rtnl deadlock

When cnic_stop_hw() -> cnic_cm_stop_bnx2x_hw() is called under rtnl_lock()
from NETDEV_DOWN event, it waits for cnic_delete_task() to complete.
It will deadlock when cnic_delete_task() takes rtnl_lock() before
calling cnic_ulp_stop_one().

We fix it by removing the rtnl_lock() in cnic_delete_task().
cnic_ulp_stop_one() has mutex and atomic bit ops to prevent important
operations from being done more than once, so it is not necessary to take
rtnl_lock().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: atl*: convert to hw_features
Michał Mirosław [Thu, 7 Apr 2011 07:32:18 +0000 (07:32 +0000)]
net: atl*: convert to hw_features

Things left as they were:
 - atl1: is RX checksum really enabled?
 - atl2: copy-paste from atl1, with-errors-on-modify I presume
 - atl1c: there's a bug: MTU can't be changed if device is not up

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

Cleanup hint: Some features are calculated in tg3_get_invariants() and
the rest in its caller --- tg3_init_one(). This is not changed here.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: enic: convert to hw_features
Michał Mirosław [Thu, 7 Apr 2011 02:43:48 +0000 (02:43 +0000)]
net: enic: convert to hw_features

As the driver uses GRO and not LRO, LRO settings are ignored anyway
and are removed here to avoid confusion.

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

Simple conversion.

This also fixes a bug in TX checksum toggling --- driver was changing
NETIF_F_HW_CSUM instead of NETIF_F_IP_CSUM+NETIF_F_IPV6_CSUM.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoskge: convert to hw_features
Michał Mirosław [Thu, 31 Mar 2011 01:01:35 +0000 (01:01 +0000)]
skge: convert to hw_features

just IP_CSUM.  This needs testing and so is not changed here.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: call FLR after setup wol in be_shutdown
Ajit Khaparde [Wed, 6 Apr 2011 18:08:43 +0000 (18:08 +0000)]
be2net: call FLR after setup wol in be_shutdown

Calling setup_wol after a reset is inconsequential.
The WOL setting should be programmed before FLR.
And yes, FLR does not erase wol information.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: dynamically allocate adapter->vf_cfg
Ajit Khaparde [Wed, 6 Apr 2011 18:08:30 +0000 (18:08 +0000)]
be2net: dynamically allocate adapter->vf_cfg

Instead of a fixed sized array for vf_cfg, allocate the size dynamically
depending on number of VFs the device supports.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix to get max VFs supported from adapter
Ajit Khaparde [Wed, 6 Apr 2011 18:08:17 +0000 (18:08 +0000)]
be2net: fix to get max VFs supported from adapter

The user supplied num_vfs value need not be compared
against a static BE_MAX_VF, but can be checked against
the actual VFs that the device can support.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: use common method to check for sriov function type
Ajit Khaparde [Wed, 6 Apr 2011 18:08:01 +0000 (18:08 +0000)]
be2net: use common method to check for sriov function type

Lancer and BE can both use SLI_INTF_REG to check a VF or a PF.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: add rxhash support
Ajit Khaparde [Wed, 6 Apr 2011 18:07:43 +0000 (18:07 +0000)]
be2net: add rxhash support

Add rxhash support,
Based on initial work by Eric Dumazet.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 7 Apr 2011 21:05:23 +0000 (14:05 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/benet/be_main.c

13 years agoipv4: Fix "Set rt->rt_iif more sanely on output routes."
OGAWA Hirofumi [Thu, 7 Apr 2011 21:04:08 +0000 (14:04 -0700)]
ipv4: Fix "Set rt->rt_iif more sanely on output routes."

Commit 1018b5c01636c7c6bda31a719bda34fc631db29a ("Set rt->rt_iif more
sanely on output routes.")  breaks rt_is_{output,input}_route.

This became the cause to return "IP_PKTINFO's ->ipi_ifindex == 0".

To fix it, this does:

1) Add "int rt_route_iif;" to struct rtable

2) For input routes, always set rt_route_iif to same value as rt_iif

3) For output routes, always set rt_route_iif to zero.  Set rt_iif
   as it is done currently.

4) Change rt_is_{output,input}_route() to test rt_route_iif

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix skb_add_data_nocache() to calc csum correctly
Wei Yongjun [Wed, 6 Apr 2011 18:40:12 +0000 (18:40 +0000)]
net: fix skb_add_data_nocache() to calc csum correctly

commit c6e1a0d12ca7b4f22c58e55a16beacfb7d3d8462 broken the calc
 (net: Allow no-cache copy from user on transmit)
of checksum, which may cause some tcp packets be dropped because
incorrect checksum. ssh does not work under today's net-next-2.6
tree.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoewrk3: convert to set_phys_id
stephen hemminger [Wed, 6 Apr 2011 11:58:36 +0000 (11:58 +0000)]
ewrk3: convert to set_phys_id

Use ethtool infrastructure for blinking, which is now does
locking at higher level.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: convert to set_phys_id
stephen hemminger [Wed, 6 Apr 2011 11:47:23 +0000 (11:47 +0000)]
qlcnic: convert to set_phys_id

Convert driver to use new ethtool set_phys_id.
Not completely sure that this is correct for all cases of device
up/down and doing operation. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: netxen: convert to hw_features
Michał Mirosław [Tue, 5 Apr 2011 01:36:58 +0000 (01:36 +0000)]
net: netxen: convert to hw_features

Rather simple conversion 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 agocapi: Perform scheduled capifs removal
Jan Kiszka [Wed, 6 Apr 2011 10:58:37 +0000 (10:58 +0000)]
capi: Perform scheduled capifs removal

udev fully replaces this special file system that only contains CAPI
NCCI TTY device nodes. User space (pppdcapiplugin) works without
noticing the difference.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSigned bit field; int have_hotplug_status_watch:1
Ian Campbell [Sun, 3 Apr 2011 22:26:24 +0000 (22:26 +0000)]
Signed bit field; int have_hotplug_status_watch:1

Fixes error from sparse:
  CHECK   drivers/net/xen-netback/xenbus.c
drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield

        int have_hotplug_status_watch:1;

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMAINTAINERS: add entry for Xen network backend
Ian Campbell [Sun, 3 Apr 2011 23:12:23 +0000 (23:12 +0000)]
MAINTAINERS: add entry for Xen network backend

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix suspend/resume operation
Padmanabh Ratnakar [Sun, 3 Apr 2011 01:54:39 +0000 (01:54 +0000)]
be2net: Fix suspend/resume operation

eq_next_idx is not getting reset to zero during suspend.
This causes resume to fail. Added the fix.

Signed-off-by: Sarveswara Rao Mygapula <sarveswararao.mygapula@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Rename some struct members for clarity
Padmanabh Ratnakar [Sun, 3 Apr 2011 01:54:11 +0000 (01:54 +0000)]
be2net: Rename some struct members for clarity

Renamed msix_vec_idx to eq_idx in be_eq_obj struct.
Renamed msix_vec_next_idx to eq_next_idx in be_adapter structure.
These members are used in INTX mode also.

Signed-off-by: Sarveswara Rao Mygapula <sarveswararao.mygapula@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: convert to set_phys_id (v2)
stephen hemminger [Mon, 4 Apr 2011 15:09:25 +0000 (15:09 +0000)]
s2io: convert to set_phys_id (v2)

Convert to new ethtool set physical id model. Remove no longer used
timer, and fix docbook comment.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoniu: convert to new ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 12:31:19 +0000 (12:31 +0000)]
niu: convert to new ethtool set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopcnet32: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:41 +0000 (11:06 +0000)]
pcnet32: convert to set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobenet: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:40 +0000 (11:06 +0000)]
benet: convert to set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:37 +0000 (11:06 +0000)]
bnx2x: convert to set_phys_id

Also cleanup error codes to no lie about things that driver doesn't
support. If device is down report -EAGAIN (same as Broadcom), and
if port doesn't blink then error as well.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:36 +0000 (11:06 +0000)]
bnx2: convert to set_phys_id

In this case, need to add element to device private to hold
original led state.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:35 +0000 (11:06 +0000)]
vxge: convert to set_phys_id

Also fix up incorrect docbook comment

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb3: implement set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:51 +0000 (08:43 +0000)]
cxgb3: implement set_phys_id

Implement new ethtool set_phys_id on Chelsio cxgb3 board.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: implement ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:50 +0000 (08:43 +0000)]
tg3: implement ethtool set_phys_id

Implement control of LED via set_phys_id.
Note: since PHY is powered off if device is down, this board
only allows blinking if device is up.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoskge: implement set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:42 +0000 (08:43 +0000)]
skge: implement set_phys_id

Implement set_phys_id led control on SysKonnect board.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosky2: support ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:41 +0000 (08:43 +0000)]
sky2: support ethtool set_phys_id

Use ethtool set_phys_id to control LED. Fixes issues with RTNL being
held for extended periods.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
Ulrich Weber [Wed, 6 Apr 2011 21:04:49 +0000 (14:04 -0700)]
pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev

otherwise we loop forever if a PPPoE socket was set
to PPPOX_ZOMBIE state by a PADT message when the
ethernet device is going down afterwards.

Signed-off-by: Ulrich Weber <uweber@astaro.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 [Wed, 6 Apr 2011 20:34:15 +0000 (13:34 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agodsa/mv88e6131: add support for mv88e6085 switch
Peter Korsgaard [Tue, 5 Apr 2011 03:03:56 +0000 (03:03 +0000)]
dsa/mv88e6131: add support for mv88e6085 switch

The mv88e6085 is identical to the mv88e6095, except that all ports are
10/100 Mb/s, so use the existing setup code except for the cpu/dsa speed
selection in _setup_port().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
Neil Horman [Wed, 6 Apr 2011 20:07:09 +0000 (13:07 -0700)]
ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)

properly record sk_rxhash in ipv6 sockets (v2)

Noticed while working on another project that flows to sockets which I had open
on a test systems weren't getting steered properly when I had RFS enabled.
Looking more closely I found that:

1) The affected sockets were all ipv6
2) They weren't getting steered because sk->sk_rxhash was never set from the
incomming skbs on that socket.

This was occuring because there are several points in the IPv4 tcp and udp code
which save the rxhash value when a new connection is established.  Those calls
to sock_rps_save_rxhash were never added to the corresponding ipv6 code paths.
This patch adds those calls.  Tested by myself to properly enable RFS
functionalty on ipv6.

Change notes:
v2:
Filtered UDP to only arm RFS on bound sockets (Eric Dumazet)

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Update version number to 5.0.16
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:36 +0000 (14:28 +0000)]
qlcnic: Update version number to 5.0.16

Bumped up version number to 5.0.16

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Fix LRO disable
Rajesh Borundia [Fri, 1 Apr 2011 14:28:31 +0000 (14:28 +0000)]
qlcnic: Fix LRO disable

o In dev->open LRO was enabled by default, enable it depending
  upon netdev->features , kernel may have disabled it.
o Configure LRO when interface is up.

Signed-off-by: Rajesh Borundia <Rajesh.Borundia@qlogic.com>
Signed-off-by: Anirban Chakraborty <Anirban.Chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Use flt method to determine flash fw region
Sritej Velaga [Fri, 1 Apr 2011 14:28:26 +0000 (14:28 +0000)]
qlcnic: Use flt method to determine flash fw region

Use flash layout table to get flash fw starting address and its size.
If that fails, use legacy method.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Remove unused code
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:21 +0000 (14:28 +0000)]
qlcnic: Remove unused code

Cleaned up unused codes for interrupt coalescence settings

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Changes to VLAN code
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:15 +0000 (14:28 +0000)]
qlcnic: Changes to VLAN code

Made changes to VLAN code comply with new VLAN infrastructure in kernel

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Code optimization patch
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:11 +0000 (14:28 +0000)]
qlcnic: Code optimization patch

Optimized code resulted in achieving lower CPU utilization on transmit path
and higher throughput for small packet sizes (64 bytes).

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Cleanup patch
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:05 +0000 (14:28 +0000)]
qlcnic: Cleanup patch

 1. Changed adapter structure to move away from embedding hardware and
    receive context structs and use pointers to those objects
 2. Packed all the structs that interface with FW
 3. Removed unused code and structs

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Memory leak fix
Sony Chacko [Fri, 1 Apr 2011 14:27:59 +0000 (14:27 +0000)]
qlcnic: Memory leak fix

Fix a memory leak in error path of pci info.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Make PCI info available in all modes
Sony Chacko [Fri, 1 Apr 2011 14:27:47 +0000 (14:27 +0000)]
qlcnic: Make PCI info available in all modes

Before this fix, PCI info was available only when multiple NIC functions
are present on the same port.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix a potential crash during shutdown.
Ajit Khaparde [Wed, 6 Apr 2011 05:53:13 +0000 (05:53 +0000)]
be2net: Fix a potential crash during shutdown.

adapter could remain uninitialized if probe fails for some reason.
A null pointer access could cause a crash if be_shutdown
is called after that.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: Fix for handling firmware heartbeat failure
Rasesh Mody [Mon, 4 Apr 2011 08:29:59 +0000 (08:29 +0000)]
bna: Fix for handling firmware heartbeat failure

This patch contains a fix for gracefully handling firmware heartbeat
failure instead of forcing panic.

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 agocan: convert protocol handling to RCU
Oliver Hartkopp [Tue, 5 Apr 2011 08:01:16 +0000 (08:01 +0000)]
can: convert protocol handling to RCU

This patch removes spin_locks at CAN socket creation time by using RCU.

Inspired by the discussion with Kurt van Dijck and Eric Dumazet the RCU code
was partly derived from af_phonet.c

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Wed, 6 Apr 2011 19:27:34 +0000 (12:27 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next-2.6

13 years agocan: mcp251x: Allow pass IRQ flags through platform data.
Enric Balletbo i Serra [Tue, 5 Apr 2011 07:08:41 +0000 (07:08 +0000)]
can: mcp251x: Allow pass IRQ flags through platform data.

When an interrupt occurs, the INT pin is driven low by the
MCP251x controller (falling edge) but in some cases the INT
pin can be connected to the MPU through a transistor or level
translator which inverts this signal. In this case interrupt
should be configured in rising edge.

This patch adds support to pass the IRQ flags via
mcp251x_platform_data.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
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 agosmsc911x: fix mac_lock acquision before calling smsc911x_mac_read
Enric Balletbo i Serra [Tue, 5 Apr 2011 06:52:49 +0000 (06:52 +0000)]
smsc911x: fix mac_lock acquision before calling smsc911x_mac_read

When SMSC911X_SAVE_MAC_ADDRESS flag is enabled the driver calls
smsc911x_mac_read and smsc911x_mac_read function without acquiring mac_lock
spinlock

This patch fixes following warning

smsc911x: Driver version 2008-10-21.
------------[ cut here ]------------
WARNING: at drivers/net/smsc911x.c:261 smsc911x_mac_read+0x24/0x220()
Modules linked in:
[<c0060858>] (unwind_backtrace+0x0/0xe0) from [<c009322c>] (warn_slowpath_common+0x4c/0x64)
[<c009322c>] (warn_slowpath_common+0x4c/0x64) from [<c009325c>] (warn_slowpath_null+0x18/0x1c)
[<c009325c>] (warn_slowpath_null+0x18/0x1c) from [<c0324bec>] (smsc911x_mac_read+0x24/0x220)
[<c0324bec>] (smsc911x_mac_read+0x24/0x220) from [<c0434788>] (smsc911x_read_mac_address+0x18/0x6c)
[<c0434788>] (smsc911x_read_mac_address+0x18/0x6c) from [<c0434c74>] (smsc911x_drv_probe+0x498/0x1788)
[<c0434c74>] (smsc911x_drv_probe+0x498/0x1788) from [<c02d3e54>] (platform_drv_probe+0x14/0x18)
[<c02d3e54>] (platform_drv_probe+0x14/0x18) from [<c02d2d60>] (driver_probe_device+0xc8/0x184)
[<c02d2d60>] (driver_probe_device+0xc8/0x184) from [<c02d2e84>] (__driver_attach+0x68/0x8c)
[<c02d2e84>] (__driver_attach+0x68/0x8c) from [<c02d1fc8>] (bus_for_each_dev+0x48/0x74)
[<c02d1fc8>] (bus_for_each_dev+0x48/0x74) from [<c02d2660>] (bus_add_driver+0x9c/0x228)
[<c02d2660>] (bus_add_driver+0x9c/0x228) from [<c02d3598>] (driver_register+0xa0/0x124)
[<c02d3598>] (driver_register+0xa0/0x124) from [<c0050668>] (do_one_initcall+0x94/0x168)
[<c0050668>] (do_one_initcall+0x94/0x168) from [<c0008984>] (kernel_init+0xa0/0x154)
[<c0008984>] (kernel_init+0xa0/0x154) from [<c005afac>] (kernel_thread_exit+0x0/0x8)
---[ end trace 2c931a35b7885770 ]---

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Support 4mb flash sizes for 5717 and 5719
Matt Carlson [Tue, 5 Apr 2011 14:22:51 +0000 (14:22 +0000)]
tg3: Support 4mb flash sizes for 5717 and 5719

If a 5717 or 5719 NVRAM part is manually strapped and is 2mb in size,
the driver needs to look at the NVRAM size field rather than infer it
from the strapping itself.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Enable 5720 support
Matt Carlson [Tue, 5 Apr 2011 14:22:50 +0000 (14:22 +0000)]
tg3: Enable 5720 support

This patch adds the 5720 device ID to the PCI table, thus enabling 5720
support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 PHY ID
Matt Carlson [Tue, 5 Apr 2011 14:22:49 +0000 (14:22 +0000)]
tg3: Add 5720 PHY ID

This patch adds the 5720 PHY ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 H2BMC support
Matt Carlson [Tue, 5 Apr 2011 14:22:48 +0000 (14:22 +0000)]
tg3: Add 5720 H2BMC support

This patch adds support for the new Host to BMC feature.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 NVRAM decoding
Matt Carlson [Tue, 5 Apr 2011 14:22:47 +0000 (14:22 +0000)]
tg3: Add 5720 NVRAM decoding

The 5720 implements its own NVRAM pin strapping scheme.  This patch adds
the required support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 ASIC rev
Matt Carlson [Tue, 5 Apr 2011 14:22:46 +0000 (14:22 +0000)]
tg3: Add 5720 ASIC rev

This patch adds support for the 5720 ASIC rev.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Reintroduce 5717_PLUS
Matt Carlson [Tue, 5 Apr 2011 14:22:45 +0000 (14:22 +0000)]
tg3: Reintroduce 5717_PLUS

This patch reintroduces the TG3_FLG3_5717_PLUS to identify 5717 and
later devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: 5717_PLUS => 57765_PLUS
Matt Carlson [Tue, 5 Apr 2011 14:22:44 +0000 (14:22 +0000)]
tg3: 5717_PLUS => 57765_PLUS

The 57765 arrived before the 5717 and has a subset of the features
supported by the 5717.  This patch renames the 5717_PLUS flag so that it
can be reintroduced to designate only 5717 and later devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Cleanup extended rx ring size code
Matt Carlson [Tue, 5 Apr 2011 14:22:43 +0000 (14:22 +0000)]
tg3: Cleanup extended rx ring size code

Hardcoded values are used in multiple places to describe the maximum rx
ring sizes.  This patch replaces those values with preprocessor
constants.  This patch also introduces a new TG3_FLG3_LRG_PROD_RING_CAP
to determine if the device is capable of supporting larger ring sizes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.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/kaber/nf-2.6
David S. Miller [Tue, 5 Apr 2011 21:21:11 +0000 (14:21 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

13 years agosfc: Implement ethtool_ops::set_phys_id instead of ethtool_ops::phys_id
Ben Hutchings [Fri, 1 Apr 2011 23:43:46 +0000 (00:43 +0100)]
sfc: Implement ethtool_ops::set_phys_id instead of ethtool_ops::phys_id

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL
Ben Hutchings [Fri, 1 Apr 2011 23:35:15 +0000 (00:35 +0100)]
ethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL

The ethtool ETHTOOL_PHYS_ID command runs for an arbitrarily long
period of time, holding the RTNL lock.  This blocks routing updates,
device enumeration, and various important operations that one might
want to keep running while hunting for the flashing LED.

We need to drop the RTNL lock during this operation, but currently the
core implementation is a thin wrapper around a driver operation and
drivers may well depend upon holding the lock.

Define a new driver operation 'set_phys_id' with an argument that sets
the ID indicator on/off/inactive/active (the last optional, for any
driver or firmware that prefers to handle blinking asynchronously).
When this is defined, the ethtool core drops the lock while waiting
and only acquires it around calls to this operation.

Deprecate the 'phys_id' operation in favour of this.  It can be
removed once all in-tree drivers are converted.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Fill out and update comment for struct ethtool_ops
Ben Hutchings [Fri, 1 Apr 2011 22:57:41 +0000 (23:57 +0100)]
ethtool: Fill out and update comment for struct ethtool_ops

Briefly document all operations (except get_rx_ntuple), including
whether they may return an error code and whether they are deprecated.
Also mention some things that should be handled by the ethtool core
rather than by drivers.

Briefly document general requirements for callers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Convert struct ethtool_ops comment to kernel-doc format
Ben Hutchings [Fri, 1 Apr 2011 21:52:34 +0000 (22:52 +0100)]
ethtool: Convert struct ethtool_ops comment to kernel-doc format

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Implement generic features interface
Ben Hutchings [Tue, 5 Apr 2011 14:00:02 +0000 (15:00 +0100)]
sfc: Implement generic features interface

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Enable all TSO features on VLANs
Ben Hutchings [Tue, 5 Apr 2011 12:36:09 +0000 (13:36 +0100)]
sfc: Enable all TSO features on VLANs

The TSO code already supports IPv6 on VLAN, so enable it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agonet: Allow no-cache copy from user on transmit
Tom Herbert [Tue, 5 Apr 2011 05:30:30 +0000 (22:30 -0700)]
net: Allow no-cache copy from user on transmit

This patch uses __copy_from_user_nocache on transmit to bypass data
cache for a performance improvement.  skb_add_data_nocache and
skb_copy_to_page_nocache can be called by sendmsg functions to use
this feature, initial support is in tcp_sendmsg.  This functionality is
configurable per device using ethtool.

Presumably, this feature would only be useful when the driver does
not touch the data.  The feature is turned on by default if a device
indicates that it does some form of checksum offload; it is off by
default for devices that do no checksum offload or indicate no checksum
is necessary.  For the former case copy-checksum is probably done
anyway, in the latter case the device is likely loopback in which case
the no cache copy is probably not beneficial.

This patch was tested using 200 instances of netperf TCP_RR with
1400 byte request and one byte reply.  Platform is 16 core AMD x86.

No-cache copy disabled:
   672703 tps, 97.13% utilization
   50/90/99% latency:244.31 484.205 1028.41

No-cache copy enabled:
   702113 tps, 96.16% utilization,
   50/90/99% latency 238.56 467.56 956.955

Using 14000 byte request and response sizes demonstrate the
effects more dramatically:

No-cache copy disabled:
   79571 tps, 34.34 %utlization
   50/90/95% latency 1584.46 2319.59 5001.76

No-cache copy enabled:
   83856 tps, 34.81% utilization
   50/90/95% latency 2508.42 2622.62 2735.88

Note especially the effect on latency tail (95th percentile).

This seems to provide a nice performance improvement and is
consistent in the tests I ran.  Presumably, this would provide
the greatest benfits in the presence of an application workload
stressing the cache and a lot of transmit data happening.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: range check STP parameters
stephen hemminger [Mon, 4 Apr 2011 14:03:33 +0000 (14:03 +0000)]
bridge: range check STP parameters

Apply restrictions on STP parameters based 802.1D 1998 standard.
   * Fixes missing locking in set path cost ioctl
   * Uses common code for both ioctl and sysfs

This is based on an earlier patch Sasikanth V but with overhaul.

Note:
1. It does NOT enforce the restriction on the relationship max_age and
   forward delay or hello time because in existing implementation these are
   set as independant operations.

2. If STP is disabled, there is no restriction on forward delay

3. No restriction on holding time because users use Linux code to act
   as hub or be sticky.

4. Although standard allow 0-255, Linux only allows 0-63 for port priority
   because more bits are reserved for port number.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: allow creating bridge devices with netlink
stephen hemminger [Mon, 4 Apr 2011 14:03:32 +0000 (14:03 +0000)]
bridge: allow creating bridge devices with netlink

Add netlink device ops to allow creating bridge device via netlink.
This works in a manner similar to vlan, macvlan and bonding.

Example:
  # ip link add link dev br0 type bridge
  # ip link del dev br0

The change required rearranging initializtion code to deal with
being called by create link. Most of the initialization happens
in br_dev_setup, but allocation of stats is done in ndo_init callback
to deal with allocation failure. Sysfs setup has to wait until
after the network device kobject is registered.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: allow creating/deleting fdb entries via netlink
stephen hemminger [Mon, 4 Apr 2011 14:03:31 +0000 (14:03 +0000)]
bridge: allow creating/deleting fdb entries via netlink

Use RTM_NEWNEIGH and RTM_DELNEIGH to allow updating of entries
in bridge forwarding table. This allows manipulating static entries
which is not possible with existing tools.

Example (using bridge extensions to iproute2)
   # br fdb add 00:02:03:04:05:06 dev eth0

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: add netlink notification on forward entry changes
stephen hemminger [Mon, 4 Apr 2011 14:03:30 +0000 (14:03 +0000)]
bridge: add netlink notification on forward entry changes

This allows applications to query and monitor bridge forwarding
table in the same method used for neighbor table. The forward table
entries are returned in same structure format as used by the ioctl.
If more information is desired in future, the netlink method is
extensible.

Example (using bridge extensions to iproute2)
  # br monitor

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: split rcu and no-rcu cases of fdb lookup
stephen hemminger [Mon, 4 Apr 2011 14:03:29 +0000 (14:03 +0000)]
bridge: split rcu and no-rcu cases of fdb lookup

In some cases, look up of forward database entry is done with RCU;
and for others no RCU is needed because of locking. Split the two
cases into two differnt loops (and take off inline).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: track last used time in forwarding table
stephen hemminger [Mon, 4 Apr 2011 14:03:28 +0000 (14:03 +0000)]
bridge: track last used time in forwarding table

Adds tracking the last used time in forwarding table.
Rename ageing_timer to updated to better describe it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: change arguments to fdb_create
stephen hemminger [Mon, 4 Apr 2011 14:03:27 +0000 (14:03 +0000)]
bridge: change arguments to fdb_create

Later patch provides ability to create non-local static entry.
To make this easier move the updating of the flag values to
after the code that creates entry.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Don't pass invalid dst_entry pointer to dst_release().
Boris Ostrovsky [Mon, 4 Apr 2011 20:07:26 +0000 (13:07 -0700)]
ipv6: Don't pass invalid dst_entry pointer to dst_release().

Make sure dst_release() is not called with error pointer. This is
similar to commit 4910ac6c526d2868adcb5893e0c428473de862b5 ("ipv4:
Don't ip_rt_put() an error pointer in RAW sockets.").

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoiwlwifi: accept EEPROM version 0x423 for iwl6000
John W. Linville [Mon, 4 Apr 2011 17:18:44 +0000 (13:18 -0400)]
iwlwifi: accept EEPROM version 0x423 for iwl6000

A number of these devices have appeared "in the wild", and apparently
the Windows driver is perfectly happy to support this EEPROM version.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agort2x00: fix cancelling uninitialized work
Stanislaw Gruszka [Mon, 4 Apr 2011 11:50:32 +0000 (13:50 +0200)]
rt2x00: fix cancelling uninitialized work

{rx,tx}done_work's are only initialized for usb devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix some warnings/bugs
Larry Finger [Sat, 2 Apr 2011 23:10:22 +0000 (18:10 -0500)]
rtlwifi: Fix some warnings/bugs

Some compiler/architecture combinations generate some warnings that are
not seen on my main system. Two of the "warnings" about unitialized variables
are really bugs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54usb: IDs for two new devices
Christian Lamparter [Sat, 2 Apr 2011 09:31:29 +0000 (11:31 +0200)]
p54usb: IDs for two new devices

Cc: <stable@kernel.org>
Reported-by: Mark Davis [via p54/devices wiki]
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl12xx: fix potential buffer overflow in testmode nvs push
Luciano Coelho [Fri, 1 Apr 2011 16:42:02 +0000 (19:42 +0300)]
wl12xx: fix potential buffer overflow in testmode nvs push

We were allocating the size of the NVS file struct and not checking
whether the length of the buffer passed was correct before copying it
into the allocated memory.  This is a security hole because buffer
overflows can occur if the userspace passes a bigger file than what is
expected.

With this patch, we check if the size of the data passed from
userspace matches the size required.

This bug was introduced in 2.6.36.

Cc: stable@kernel.org
Reported-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: reset rx idle timer from tasklet
Jussi Kivilinna [Fri, 1 Apr 2011 16:34:16 +0000 (19:34 +0300)]
zd1211rw: reset rx idle timer from tasklet

2.6.38 added WARN_ON(in_irq) in del_timer_sync that triggers on zd1211rw when
reseting rx idle timer in urb completion handler.

Move timer reseting to tasklet.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: remove URB_SHORT_NOT_OK flag in zd_usb_iowrite16v_async()
Jussi Kivilinna [Fri, 1 Apr 2011 16:34:08 +0000 (19:34 +0300)]
zd1211rw: remove URB_SHORT_NOT_OK flag in zd_usb_iowrite16v_async()

Patch removes the bogus flag introduced by upstream commit
eefdbec1ea8b7093d2c09d1825f68438701723cf. Old code had buffer length check
that new code tried to handle with URB_SHORT_NOT_OK flag. With USB debugging
enabled bogus flag caused usb_submit_urb fail.

Remove URB_SHORT_NOT_OK flag and add buffer length check to urb completion
handler.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32092
Reported-by: Jonathan Callen <abcd@gentoo.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>