GitHub/mt8127/android_kernel_alcatel_ttab.git
14 years agobe2net: add support to get vf config
Ajit Khaparde [Fri, 23 Jul 2010 01:50:34 +0000 (01:50 +0000)]
be2net: add support to get vf config

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: change to call pmac_del only if necessary
Ajit Khaparde [Fri, 23 Jul 2010 01:49:04 +0000 (01:49 +0000)]
be2net: change to call pmac_del only if necessary

If a mac address has not been configured for a VF,
there is no need to call be_cmd_pmac_del.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: avoid useless removal of multicast addresses
Ursula Braun [Thu, 22 Jul 2010 23:15:10 +0000 (23:15 +0000)]
qeth: avoid useless removal of multicast addresses

Function qeth_l2_remove_device invokes qeth_l2_del_all_mc at the end.
This is needless, because it is already called in the offline function.
And even more this is invalid, because multicast addresses cannot be
removed in DOWN state. Thus this patch deletes invocation of
qeth_l2_del_all_mc in function qeth_l2_remove_device.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Use memdup_user when user data is immediately copied into the allocated region.
Julia Lawall [Thu, 22 Jul 2010 23:15:09 +0000 (23:15 +0000)]
qeth: Use memdup_user when user data is immediately copied into the allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: return zero from reply callback functions
Ursula Braun [Thu, 22 Jul 2010 23:15:08 +0000 (23:15 +0000)]
qeth: return zero from reply callback functions

Reply callback functions in qeth should return zero if command
response consists of one part only, otherwise qeth continues
waiting for further parts of the command response.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoclaw: A claw device is a group of just 2 ccw devices
Ursula Braun [Thu, 22 Jul 2010 23:15:07 +0000 (23:15 +0000)]
claw: A claw device is a group of just 2 ccw devices

When creating a claw device, just 2 subchannels have to be grouped.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: avoid loop if ipa command response is missing
Ursula Braun [Thu, 22 Jul 2010 23:15:06 +0000 (23:15 +0000)]
qeth: avoid loop if ipa command response is missing

If qeth issues an ipa command, but for some reasons the response
never comes back, qeth reaches a timeout.
Reset the irq_pending flag of the write channel in timeout handling
code and trigger a recovery to avoid endless looping for the following
ipa command.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: serialize sysfs-triggered device configurations
Ursula Braun [Thu, 22 Jul 2010 23:15:05 +0000 (23:15 +0000)]
qeth: serialize sysfs-triggered device configurations

This patch serializes device removal and other sysfs-triggered
configurations by moving removal of sysfs-attributes to the beginning
of the remove functions. And it serializes online/offline setting
and discipline-switching (causing reestablishing of the net_device)
by making use of a new discipline mutex.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Clear mac_bits field when switching between Layer 2 and Layer 3
Carsten Otte [Thu, 22 Jul 2010 23:15:04 +0000 (23:15 +0000)]
qeth: Clear mac_bits field when switching between Layer 2 and Layer 3

This patch fixes a problem that occurs when switching from layer 3 to layer 2
mode. Resetting this mac_bits makes sure that we retrieve our mac address from
the card, otherwise the interface simply would'nt work.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: IP address takeover flag setting
Klaus-Dieter Wacker [Thu, 22 Jul 2010 23:15:03 +0000 (23:15 +0000)]
qeth: IP address takeover flag setting

The qeth IP address flag setting is possible when device is
offline. When setting device online afterwards the current set
IP addresses have to be correctly registered with the device
regarding the IP address takeover attribute.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: handle allocation errors in setup functions
Dan Carpenter [Thu, 22 Jul 2010 01:16:48 +0000 (01:16 +0000)]
stmmac: handle allocation errors in setup functions

If the allocations fail in either dwmac1000_setup() or dwmac100_setup()
then return NULL.  These are called from stmmac_mac_device_setup().  The
check for NULL returns in stmmac_mac_device_setup() needed to be moved
forward a couple lines.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: precedence bug
Dan Carpenter [Thu, 22 Jul 2010 01:11:31 +0000 (01:11 +0000)]
caif: precedence bug

Negate has precedence over comparison so the original assert only
checked that "rfml->fragment_size" was larger than 1 or 0.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: don't lock when copying/clearing VLAN list on slave
Jay Vosburgh [Wed, 21 Jul 2010 12:14:48 +0000 (12:14 +0000)]
bonding: don't lock when copying/clearing VLAN list on slave

When copying VLAN information to or removing from a slave
during slave addition or removal, the bonding code currently holds
the bond->lock for write to prevent concurrent modification of the
vlan_list / vlgrp.

This is unnecessary, as all of these operations occur under
RTNL.  Holding the bond->lock also caused might_sleep issues for
some drivers' ndo_vlan_* functions.  This patch removes the extra
locking.

Problem reported by Michael Chan <mchan@broadcom.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: change test for presence of VLANs
Jay Vosburgh [Wed, 21 Jul 2010 12:14:47 +0000 (12:14 +0000)]
bonding: change test for presence of VLANs

After commit ad1afb00393915a51c21b1ae8704562bf036855f
("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)")
it is now regular practice for a VLAN "add vid" for VLAN 0 to
arrive prior to any VLAN registration or creation of a vlan_group.

This patch updates the bonding code that tests for the presence
of VLANs configured above bonding.  The new logic tests for bond->vlgrp
to determine if a registration has occured, instead of testing that
bonding's internal vlan_list is empty.

The old code would panic when vlan_list was not empty, but
vlgrp was still NULL (because only an "add vid" for VLAN 0 had occured).

Bonding still adds VLAN 0 to its internal list so that 802.1p
frames are handled correctly on transmit when non-VLAN accelerated
slaves are members of the bond.  The test against bond->vlan_list
remains in bond_dev_queue_xmit for this reason.

Modification to the bond->vlgrp now occurs under lock (in
addition to RTNL), because not all inspections of it occur under RTNL.

Additionally, because 8021q will never issue a "kill vid" for
VLAN 0, there is now logic in bond_uninit to release any remaining
entries from vlan_list.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Cc: Pedro Garcia <pedro.netdev@dondevamos.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/fec: restore interrupt mask after software-reset in fec_stop()
Wolfram Sang [Wed, 21 Jul 2010 02:51:13 +0000 (02:51 +0000)]
net/fec: restore interrupt mask after software-reset in fec_stop()

After the change from mdio polling to irq, it became necessary to
restore the interrupt mask after resetting the chip in fec_stop().
Otherwise, with all irqs disabled, no communication with the PHY will be
possible after e.g. un-/replugging the cable and the device gets
stalled.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago3c59x: handle pci_iomap() errors
Kulikov Vasiliy [Wed, 21 Jul 2010 02:00:36 +0000 (02:00 +0000)]
3c59x: handle pci_iomap() errors

pci_iomap() can fail, handle this case and return -ENOMEM from probe
function.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: RTA_MARK addition
Eric Dumazet [Tue, 20 Jul 2010 22:03:14 +0000 (22:03 +0000)]
net: RTA_MARK addition

Add a new rt attribute, RTA_MARK, and use it in
rt_fill_info()/inet_rtm_getroute() to support following commands :

ip route get 192.168.20.110 mark NUMBER
ip route get 192.168.20.108 from 192.168.20.110 iif eth1 mark NUMBER
ip route list cache [192.168.20.110] mark NUMBER

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAN: Add Flexcan CAN controller driver
Marc Kleine-Budde [Wed, 29 Jul 2009 08:20:10 +0000 (10:20 +0200)]
CAN: Add Flexcan CAN controller driver

This core is found on some Freescale SoCs and also some Coldfire
SoCs. Support for Coldfire is missing though at the moment as
they have an older revision of the core which does not have RX FIFO
support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
14 years agor6040: Fix args to phy_mii_ioctl().
David S. Miller [Thu, 22 Jul 2010 04:10:49 +0000 (21:10 -0700)]
r6040: Fix args to phy_mii_ioctl().

Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovhost net: Fix warning.
David S. Miller [Thu, 22 Jul 2010 04:09:23 +0000 (21:09 -0700)]
vhost net: Fix warning.

Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: remove last uses of __attribute__((packed))
Gustavo F. Padovan [Wed, 21 Jul 2010 10:59:58 +0000 (10:59 +0000)]
net: remove last uses of __attribute__((packed))

Network code uses the __packed macro instead of __attribute__((packed)).

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoirda: Use __packed annotation instead IRDA_PACKED macro
Gustavo F. Padovan [Wed, 21 Jul 2010 10:59:57 +0000 (10:59 +0000)]
irda: Use __packed annotation instead IRDA_PACKED macro

Remove IRDA_PACKED macro, which maps to __attribute__((packed)). IRDA is
one of the last users of __attribute__((packet)). Networking code uses
__packed now.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/irda: use for_each_pci_dev()
Kulikov Vasiliy [Sat, 3 Jul 2010 06:04:15 +0000 (06:04 +0000)]
drivers/net/irda: use for_each_pci_dev()

Use for_each_pci_dev() to simplify the code.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/qlge: Use pr_<level>, shrink text a bit
Joe Perches [Wed, 21 Jul 2010 21:44:18 +0000 (14:44 -0700)]
drivers/net/qlge: Use pr_<level>, shrink text a bit

Add and use a few neatening macros
Remove PFX
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert printk(KERN_ERR to pr_err(

$ size drivers/net/qlge/built-in.o.*
  text    data     bss     dec     hex filename
 116456    2312   25712  144480   23460 drivers/net/qlge/built-in.o.old
 114909    2312   25728  142949   22e65 drivers/net/qlge/built-in.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoarch/um/drivers: remove duplicate structure field initialization
Julia Lawall [Tue, 20 Jul 2010 12:25:17 +0000 (12:25 +0000)]
arch/um/drivers: remove duplicate structure field initialization

There are two initializations of ndo_set_mac_address, one to a local
function that is not used otherwise and one to a function that is defined
elsewhere.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)<int(pr[0].line) or int(ps[0].column)<int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

akpm:

- Use the standard eth_mac_addr() in uml_net_set_mac()

- Remove unneeded and racy local set_ether_mac()

- Remove duplicated (and incorrect)
  uml_netdev_ops.ndo_set_mac_address initializer.

Fixes 8bb95b39a16ed55226810596f92216c53329d2fe ("uml: convert network
device to netdevice ops").

[akpm@linux-foundation.org: rework as above]
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/cxgb3/t3_hw.c: use new hex_to_bin() method
Andy Shevchenko [Tue, 20 Jul 2010 12:25:16 +0000 (12:25 +0000)]
drivers/net/cxgb3/t3_hw.c: use new hex_to_bin() method

Get rid of own implementation of hex_to_bin().

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 21 Jul 2010 01:25:24 +0000 (18:25 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/vhost/net.c
net/bridge/br_device.c

Fix merge conflict in drivers/vhost/net.c with guidance from
Stephen Rothwell.

Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d
since net-next-2.6 has fixes that make bridge netpoll work properly thus
we don't need it disabled.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrop_monitor: convert some kfree_skb call sites to consume_skb
Neil Horman [Tue, 20 Jul 2010 06:45:56 +0000 (06:45 +0000)]
drop_monitor: convert some kfree_skb call sites to consume_skb

Convert a few calls from kfree_skb to consume_skb

Noticed while I was working on dropwatch that I was detecting lots of internal
skb drops in several places.  While some are legitimate, several were not,
freeing skbs that were at the end of their life, rather than being discarded due
to an error.  This patch converts those calls sites from using kfree_skb to
consume_skb, which quiets the in-kernel drop_monitor code from detecting them as
drops.  Tested successfully by myself

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrop_monitor: Add error code to detect duplicate state changes
Neil Horman [Tue, 20 Jul 2010 04:52:09 +0000 (04:52 +0000)]
drop_monitor: Add error code to detect duplicate state changes

Patch to add -EAGAIN error to dropwatch netlink message handling code.
-EAGAIN will be returned anytime userspace attempts to transition the state of
the drop monitor service to a state that its already in.  That allows user space
to detect this condition, so it doesn't wait for a success ACK that will never
arrive.  Tested successfully by me

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago__dst_free(): put EXPORT_SYMBOLS after the fct
Nicolas Dichtel [Mon, 19 Jul 2010 23:51:38 +0000 (23:51 +0000)]
__dst_free(): put EXPORT_SYMBOLS after the fct

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophy: add suspend/resume in the ic+
Giuseppe Cavallaro [Tue, 20 Jul 2010 20:24:25 +0000 (13:24 -0700)]
phy: add suspend/resume in the ic+

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4vf: add maintainer entry for cxgb4vf
Casey Leedom [Tue, 20 Jul 2010 00:55:33 +0000 (17:55 -0700)]
cxgb4vf: add maintainer entry for cxgb4vf

Adding myself as the official maintainer of the Chelsio T4 Virtual function
Driver (cxgb4vf).

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4vf: Fix bug where we were only allocating one queue in MSI mode
Casey Leedom [Tue, 20 Jul 2010 00:53:48 +0000 (17:53 -0700)]
cxgb4vf: Fix bug where we were only allocating one queue in MSI mode

Fix bug in setup_sge_queues() where we were incorrectly only allocating a
single "Queue Set" for MSI mode.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array
Casey Leedom [Tue, 20 Jul 2010 00:51:46 +0000 (17:51 -0700)]
cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array

Fix off-by-one error in checking for the end of the mailbox response delay
array.  We ended up walking off the end and, if we were unlucky, we'd end up
pulling in a 0 and never terminate the mailbox response delay loop ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Partially disable netpoll support
Herbert Xu [Mon, 19 Jul 2010 19:26:45 +0000 (19:26 +0000)]
bridge: Partially disable netpoll support

The new netpoll code in bridging contains use-after-free bugs
that are non-trivial to fix.

This patch fixes this by removing the code that uses skbs after
they're freed.

As a consequence, this means that we can no longer call bridge
from the netpoll path, so this patch also removes the controller
function in order to disable netpoll.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Make IP6CB(skb)->nhoff 16-bit.
David S. Miller [Tue, 20 Jul 2010 05:01:26 +0000 (22:01 -0700)]
ipv6: Make IP6CB(skb)->nhoff 16-bit.

Even with jumbograms I cannot see any way in which we would need
to records a larger than 65535 valued next-header offset.

The maximum extension header length is (256 << 3) == 2048.
There are only a handful of extension headers specified which
we'd even accept (say 5 or 6), therefore the largest next-header
offset we'd ever have to contend with is something less than
say 16k.

Therefore make it a u16 instead of a u32.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Update version to 2.0.17.
Michael Chan [Mon, 19 Jul 2010 14:15:05 +0000 (14:15 +0000)]
bnx2: Update version to 2.0.17.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Remove some unnecessary smp_mb() in tx fast path.
Michael Chan [Mon, 19 Jul 2010 14:15:04 +0000 (14:15 +0000)]
bnx2: Remove some unnecessary smp_mb() in tx fast path.

smp_mb() inside bnx2_tx_avail() is used twice in the normal
bnx2_start_xmit() path (see illustration below).  The full memory
barrier is only necessary during race conditions with tx completion.
We can speed up the tx path by replacing smp_mb() in bnx2_tx_avail()
with a compiler barrier.  The compiler barrier is to force the
compiler to fetch the tx_prod and tx_cons from memory.

In the race condition between bnx2_start_xmit() and bnx2_tx_int(),
we have the following situation:

bnx2_start_xmit()                       bnx2_tx_int()
    if (!bnx2_tx_avail())
            BUG();

    ...

    if (!bnx2_tx_avail())
            netif_tx_stop_queue();          update_tx_index();
            smp_mb();                       smp_mb();
            if (bnx2_tx_avail())            if (netif_tx_queue_stopped() &&
                    netif_tx_wake_queue();      bnx2_tx_avail())

With smp_mb() removed from bnx2_tx_avail(), we need to add smp_mb() to
bnx2_start_xmit() as shown above to properly order netif_tx_stop_queue()
and bnx2_tx_avail() to check the ring index.  If it is not strictly
ordered, the tx queue can be stopped forever.

This improves performance by about 5% with 2 ports running bi-directional
64-byte packets.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Call pci_enable_msix() with actual number of vectors.
Michael Chan [Mon, 19 Jul 2010 14:15:03 +0000 (14:15 +0000)]
bnx2: Call pci_enable_msix() with actual number of vectors.

Based on original patch by Breno Leitão <leitao@linux.vnet.ibm.com>.

Allocate the actual number of vectors and make use of fewer vectors
if pci_enable_msix() returns > 0.  We must allocate one additional
vector for the cnic driver.

Cc: Breno Leitão <leitao@linux.vnet.ibm.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Use proper counter for net_device_stats->multicast.
Michael Chan [Mon, 19 Jul 2010 14:15:02 +0000 (14:15 +0000)]
bnx2: Use proper counter for net_device_stats->multicast.

We were using the wrong tx multicast counter instead of the rx multicast
counter.

Reported-by: Peter Snellman <peter.snellman@cinnober.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix version string for ixgbe
Don Skidmore [Mon, 19 Jul 2010 14:00:47 +0000 (14:00 +0000)]
ixgbe: fix version string for ixgbe

Bump the version string to better reflect what is in the driver.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: use GFP_ATOMIC when allocating FCoE DDP context from the dma pool
Yi Zou [Mon, 19 Jul 2010 14:00:24 +0000 (14:00 +0000)]
ixgbe: use GFP_ATOMIC when allocating FCoE DDP context from the dma pool

The FCoE protocol stack may hold a lock when this gets called.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: properly toggling netdev feature flags when disabling FCoE
Yi Zou [Mon, 19 Jul 2010 13:59:52 +0000 (13:59 +0000)]
ixgbe: properly toggling netdev feature flags when disabling FCoE

When FCoE is disabled, there is a race condition that FCoE offload is
turned off but the FCoE protocol driver is still queuing I/O thinking
offload support still exists. This patch toggles off corresponding FCoE
netdev feature flags and notify the FCoE stack first, allowing FCoE
protocol stack driver to update its flags upon NETDEV_FEAT_CHANGE so no
I/O will be using offload.

Also, indicate FCoE offload flags in vlan_features in ixgbe_probe once
and do not toggle them in ixgbe_fcoe_enable/disable so when FCoE is
created on the VLAN interface, vlan_transfer_features() would properly
update the VLAN netdev features flag and notify the FCoE protocol driver
for NETDEV_FEAT_CHANGE.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: drop support for UDP in RSS hash generation
Alexander Duyck [Mon, 19 Jul 2010 13:59:27 +0000 (13:59 +0000)]
ixgbe: drop support for UDP in RSS hash generation

This change removes UDP from the supported protocols for RSS hashing.  The
reason for removing this protocol is because IP fragmentation was causing a
network flow to be broken into two streams, one for fragmented, and one for
non-fragmented and this in turn was causing out-of-order issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: dcb, set DPF bit when PFC is enabled
John Fastabend [Mon, 19 Jul 2010 13:59:03 +0000 (13:59 +0000)]
ixgbe: dcb, set DPF bit when PFC is enabled

Set the DPF bit when PFC is enabled.  This will discard
PFC frames so they do not get passed up the stack.

The DPF bit is set for flow control, but not priority
flow control this brings pfc inline with fc.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000: allow option to limit number of descriptors down to 48 per ring
Alexander Duyck [Mon, 19 Jul 2010 13:43:47 +0000 (13:43 +0000)]
e1000: allow option to limit number of descriptors down to 48 per ring

This change makes it possible to limit the number of descriptors down to 48
per ring.  The reason for this change is to address a variation on hardware
errata 10 for 82546GB in which descriptors will be lost if more than 32
descriptors are fetched and the PCI-X MRBC is 512.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/82596.c: fix warning
Andrew Morton [Mon, 19 Jul 2010 22:27:13 +0000 (15:27 -0700)]
drivers/net/82596.c: fix warning

drivers/net/82596.c: In function 'i596_open':
drivers/net/82596.c:1044: warning: label 'err_irq_dev' defined but not used

Caused by "82596: free resources on error"

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoks8842: Fix ks8842_tx_frame() for 16bit case.
David S. Miller [Mon, 19 Jul 2010 22:25:04 +0000 (15:25 -0700)]
ks8842: Fix ks8842_tx_frame() for 16bit case.

As reported by Andrew:

drivers/net/ks8842.c: In function 'ks8842_handle_rx':
drivers/net/ks8842.c:428: warning: 'status' may be used uninitialized in this function

Just use the 32-bit status for all reads, and delete the useless
cast to 'int' when reading a u16 into 'len'.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: this_cpu_xxx conversions
Eric Dumazet [Mon, 19 Jul 2010 10:48:49 +0000 (10:48 +0000)]
net: this_cpu_xxx conversions

Use modern this_cpu_xxx() api, saving few bytes on x86

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: Add spinlocks around registers access
Catalin Marinas [Mon, 19 Jul 2010 20:36:21 +0000 (13:36 -0700)]
smsc911x: Add spinlocks around registers access

On SMP systems, the SMSC911x registers may be accessed by multiple CPUs
and this seems to put the chip in an inconsistent state. The patch adds
spinlocks to the smsc911x_reg_read, smsc911x_reg_write,
smsc911x_rx_readfifo and smsc911x_tx_writefifo functions.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: avoid a warning
Eric Dumazet [Mon, 19 Jul 2010 06:52:36 +0000 (06:52 +0000)]
bonding: avoid a warning

drivers/net/bonding/bond_main.c:179:12: warning: â€˜disable_netpoll’
defined but not used

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Removing dead ARCH_PNX010X
Christoph Egger [Mon, 19 Jul 2010 04:37:11 +0000 (04:37 +0000)]
net: Removing dead ARCH_PNX010X

ARCH_PNX010X doesn't exist in Kconfig, therefore removing all
references for it from the source code/Kconfig.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration
Shreyas Bhatewara [Thu, 15 Jul 2010 15:21:27 +0000 (15:21 +0000)]
net-next: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration

Respect the interrupt type set in VM configuration.

When interrupt type is not auto, do not ignore the interrupt type set from
VM configuration.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next: vmxnet3 fixes [4/5] Do not reset when the device is not opened
Shreyas Bhatewara [Mon, 19 Jul 2010 07:02:13 +0000 (07:02 +0000)]
net-next: vmxnet3 fixes [4/5] Do not reset when the device is not opened

Hold rtnl_lock to get the right link state.

While asynchronously resetting the device, hold rtnl_lock to get the
right value from netif_running. If a reset is scheduled, and the device
goes thru close and open, it may happen that reset and open may run in
parallel. Holding rtnl_lock will avoid this.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: fix crash in tcp_xmit_retransmit_queue
Ilpo Järvinen [Mon, 19 Jul 2010 01:16:18 +0000 (01:16 +0000)]
tcp: fix crash in tcp_xmit_retransmit_queue

It can happen that there are no packets in queue while calling
tcp_xmit_retransmit_queue(). tcp_write_queue_head() then returns
NULL and that gets deref'ed to get sacked into a local var.

There is no work to do if no packets are outstanding so we just
exit early.

This oops was introduced by 08ebd1721ab8fd (tcp: remove tp->lost_out
guard to make joining diff nicer).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Reported-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Tested-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 19 Jul 2010 19:38:51 +0000 (12:38 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agonet: 64bit stats for netdev_queue
Eric Dumazet [Mon, 19 Jul 2010 16:35:40 +0000 (09:35 -0700)]
net: 64bit stats for netdev_queue

Since struct netdev_queue tx_bytes/tx_packets/tx_dropped are already
protected by _xmit_lock, its easy to convert these fields to u64 instead
of unsigned long.
This completes 64bit stats for devices using them (vlan, macvlan, ...)

Strictly, we could avoid the locking in dev_txq_stats_fold() on 64bit
arches, but its slow path and we prefer keep it simple.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: fix bond_inet6addr_event()
Eric Dumazet [Mon, 19 Jul 2010 03:24:14 +0000 (03:24 +0000)]
bonding: fix bond_inet6addr_event()

After commit ad1afb0039391 (vlan_dev: VLAN 0 should be treated
as "no vlan tag" (802.1p packet)),
bond_inet6addr_event() might be called with a NULL bond->vlgrp pointer, and
a non empty bond->vlan_list. vlan_group_get_device() is dereferencing a NULL pointer.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agos2io: Remove unnecessary memset of netdev private data
Tobias Klauser [Sun, 18 Jul 2010 22:55:58 +0000 (22:55 +0000)]
s2io: Remove unnecessary memset of netdev private data

The memory for the private data is allocated using kzalloc in
alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to
set it to 0 again.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosch_atm: Convert to use standard list_head facilities.
David S. Miller [Mon, 19 Jul 2010 02:52:55 +0000 (19:52 -0700)]
sch_atm: Convert to use standard list_head facilities.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: support time stamping in phy devices.
Richard Cochran [Sat, 17 Jul 2010 08:49:36 +0000 (08:49 +0000)]
net: support time stamping in phy devices.

This patch adds a new networking option to allow hardware time stamps
from PHY devices. When enabled, likely candidates among incoming and
outgoing network packets are offered to the PHY driver for possible
time stamping. When accepted by the PHY driver, incoming packets are
deferred for later delivery by the driver.

The patch also adds phylib driver methods for the SIOCSHWTSTAMP ioctl
and callbacks for transmit and receive time stamping. Drivers may
optionally implement these functions.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: added a BPF to help drivers detect PTP packets.
Richard Cochran [Sat, 17 Jul 2010 08:49:17 +0000 (08:49 +0000)]
net: added a BPF to help drivers detect PTP packets.

Certain kinds of hardware time stamping units in both MACs and PHYs have
the limitation that they can only time stamp PTP packets. Drivers for such
hardware are left with the task of correctly matching skbs to time stamps.
This patch adds a BPF that drivers can use to classify PTP packets when
needed.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: preserve ifreq parameter when calling generic phy_mii_ioctl().
Richard Cochran [Sat, 17 Jul 2010 08:48:55 +0000 (08:48 +0000)]
net: preserve ifreq parameter when calling generic phy_mii_ioctl().

The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
We need access to the ifreq in order to support PHYs that can perform
hardware time stamping.

Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
This is unnecessary since phylib will check the command in any case.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: add driver hook for tx time stamping.
Richard Cochran [Sat, 17 Jul 2010 08:48:28 +0000 (08:48 +0000)]
net: add driver hook for tx time stamping.

This patch adds a hook for transmit time stamps. The transmit hook
allows a software fallback for transmit time stamps, for MACs
lacking time stamping hardware. Using the hook will still require
adding an inline function call to each MAC driver.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
Pedro Garcia [Sun, 18 Jul 2010 22:38:44 +0000 (15:38 -0700)]
vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)

- Without the 8021q module loaded in the kernel, all 802.1p packets
(VLAN 0 but QoS tagging) are silently discarded (as expected, as
the protocol is not loaded).

- Without this patch in 8021q module, these packets are forwarded to
the module, but they are discarded also if VLAN 0 is not configured,
which should not be the default behaviour, as VLAN 0 is not really
a VLANed packet but a 802.1p packet. Defining VLAN 0 makes it almost
impossible to communicate with mixed 802.1p and non 802.1p devices on
the same network due to arp table issues.

- Changed logic to skip vlan specific code in vlan_skb_recv if VLAN
is 0 and we have not defined a VLAN with ID 0, but we accept the
packet with the encapsulated proto and pass it later to netif_rx.

- In the vlan device event handler, added some logic to add VLAN 0
to HW filter in devices that support it (this prevented any traffic
in VLAN 0 to reach the stack in e1000e with HW filter under 2.6.35,
and probably also with other HW filtered cards, so we fix it here).

- In the vlan unregister logic, prevent the elimination of VLAN 0
in devices with HW filter.

- The default behaviour is to ignore the VLAN 0 tagging and accept
the packet as if it was not tagged, but we can still define a
VLAN 0 if desired (so it is backwards compatible).

Signed-off-by: Pedro Garcia <pedro.netdev@dondevamos.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Remove MAX_SOCK_ADDR constant
Tetsuo Handa [Sun, 18 Jul 2010 22:29:14 +0000 (15:29 -0700)]
net: Remove MAX_SOCK_ADDR constant

MAX_SOCK_ADDR is no longer used because commit 230b1839 "net: Use standard
structures for generic socket address structures." replaced
"char address[MAX_SOCK_ADDR];" with "struct sockaddr_storage address;".

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoarcnet: fix signed bug in probe function
Dan Carpenter [Sat, 17 Jul 2010 07:21:28 +0000 (07:21 +0000)]
arcnet: fix signed bug in probe function

probe_irq_off() returns the first irq found or if two irqs are found
then it returns the negative of the first irq found.  We can cast
dev->irq to an int so that the test for negative values works.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: dccp: fix sign bug
Kulikov Vasiliy [Sat, 17 Jul 2010 05:21:00 +0000 (05:21 +0000)]
net: dccp: fix sign bug

'gap' is unsigned, so this code is wrong:

    gap = -new_head;
    ...
    if (gap > 0) { ... }

Make 'gap' signed.

The semantic patch that finds this problem (many false-positive results):
(http://coccinelle.lip6.fr/)

// <smpl>
@ r1 @
identifier f;
@@
int f(...) { ... }

@@
identifier r1.f;
type T;
unsigned T x;
@@

*x = f(...)
 ...
*x > 0

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())
Arnaud Ebalard [Fri, 16 Jul 2010 00:38:44 +0000 (00:38 +0000)]
IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())

The input handler for Type 2 Routing Header (mip6_rthdr_input())
checks if the CoA in the packet matches the CoA in the XFRM state.

Current check is buggy: it compares the adddress in the Type 2
Routing Header, i.e. the HoA, against the expected CoA in the state.
The comparison should be made against the address in the destination
field of the IPv6 header.

The bug remained unnoticed because the main (and possibly only current)
user of the code (UMIP MIPv6 Daemon) initializes the XFRM state with the
unspecified address, i.e. explicitly allows everything.

Yoshifuji-san, can you ack that one?

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix pci resource leak
Amit Kumar Salecha [Sun, 18 Jul 2010 21:51:59 +0000 (14:51 -0700)]
qlcnic: fix pci resource leak

pci_get_domain_bus_and_slot: caller must decrement the
reference count by calling pci_dev_put().

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next: vmxnet3 fixes [3/5] Initialize link state at probe time
Shreyas Bhatewara [Thu, 15 Jul 2010 21:51:14 +0000 (21:51 +0000)]
net-next: vmxnet3 fixes [3/5] Initialize link state at probe time

This change initializes the state of link at the time when driver is
loaded. The ethtool output for 'link detected' and 'link speed'
is thus valid even before the interface is brought up.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: use device model DMA API
Stanislaw Gruszka [Thu, 15 Jul 2010 04:25:50 +0000 (04:25 +0000)]
bnx2: use device model DMA API

Use DMA API as PCI equivalents will be deprecated. This change also allow
to allocate with GFP_KERNEL in some places.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: allocate with GFP_KERNEL flag on RX path init
Stanislaw Gruszka [Thu, 15 Jul 2010 22:55:40 +0000 (22:55 +0000)]
bnx2: allocate with GFP_KERNEL flag on RX path init

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoibmveth: lost IRQ while closing/opening device leads to service loss
Robert Jennings [Fri, 16 Jul 2010 04:57:25 +0000 (04:57 +0000)]
ibmveth: lost IRQ while closing/opening device leads to service loss

The order of freeing the IRQ and freeing the device in firmware
in ibmveth_close can cause the adapter to become unusable after a
subsequent ibmveth_open.  Only a reboot of the OS will make the
network device usable again. This is seen when cycling the adapter
up and down while there is network activity.

There is a window where an IRQ will be left unserviced (H_EOI will not
be called).  The solution is to make a VIO_IRQ_DISABLE h_call, free the
device with firmware, and then call free_irq.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
David S. Miller [Fri, 16 Jul 2010 19:41:44 +0000 (12:41 -0700)]
Merge branch 'vhost-net' of git://git./linux/kernel/git/mst/vhost

14 years agort2x00: Fix lockdep warning in rt2x00lib_probe_dev()
Stephen Boyd [Fri, 16 Jul 2010 16:50:10 +0000 (09:50 -0700)]
rt2x00: Fix lockdep warning in rt2x00lib_probe_dev()

The rt2x00dev->intf_work workqueue is never initialized when a driver is
probed for a non-existent device (in this case rt2500usb). On such a
path we call rt2x00lib_remove_dev() to free any resources initialized
during the probe before we use INIT_WORK to initialize the workqueue.
This causes lockdep to get confused since the lock used in the workqueue
hasn't been initialized yet but is now being acquired during
cancel_work_sync() called by rt2x00lib_remove_dev().

Fix this by initializing the workqueue first before we attempt to probe
the device. This should make lockdep happy and avoid breaking any
assumptions about how the library cleans up after a probe fails.

phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
Pid: 2027, comm: modprobe Not tainted 2.6.35-rc5+ #60
Call Trace:
 [<ffffffff8105fe59>] register_lock_class+0x152/0x31f
 [<ffffffff81344a00>] ? usb_control_msg+0xd5/0x111
 [<ffffffff81061bde>] __lock_acquire+0xce/0xcf4
 [<ffffffff8105f6fd>] ? trace_hardirqs_off+0xd/0xf
 [<ffffffff81492aef>] ?  _raw_spin_unlock_irqrestore+0x33/0x41
 [<ffffffff810628d5>] lock_acquire+0xd1/0xf7
 [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
 [<ffffffff8104f06e>] __cancel_work_timer+0xd0/0x17e
 [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
 [<ffffffff8104f136>] cancel_work_sync+0xb/0xd
 [<ffffffffa0096675>] rt2x00lib_remove_dev+0x25/0xb0 [rt2x00lib]
 [<ffffffffa0096bf7>] rt2x00lib_probe_dev+0x380/0x3ed [rt2x00lib]
 [<ffffffff811d78a7>] ? __raw_spin_lock_init+0x31/0x52
 [<ffffffffa00bbd2c>] ? T.676+0xe/0x10 [rt2x00usb]
 [<ffffffffa00bbe4f>] rt2x00usb_probe+0x121/0x15e [rt2x00usb]
 [<ffffffff813468bd>] usb_probe_interface+0x151/0x19e
 [<ffffffff812ea08e>] driver_probe_device+0xa7/0x136
 [<ffffffff812ea167>] __driver_attach+0x4a/0x66
 [<ffffffff812ea11d>] ? __driver_attach+0x0/0x66
 [<ffffffff812e96ca>] bus_for_each_dev+0x54/0x89
 [<ffffffff812e9efd>] driver_attach+0x19/0x1b
 [<ffffffff812e9b64>] bus_add_driver+0xb4/0x204
 [<ffffffff812ea41b>] driver_register+0x98/0x109
 [<ffffffff813465dd>] usb_register_driver+0xb2/0x173
 [<ffffffffa00ca000>] ? rt2500usb_init+0x0/0x20 [rt2500usb]
 [<ffffffffa00ca01e>] rt2500usb_init+0x1e/0x20 [rt2500usb]
 [<ffffffff81000203>] do_one_initcall+0x6d/0x17a
 [<ffffffff8106cae8>] sys_init_module+0x9c/0x1e0
 [<ffffffff8100296b>] system_call_fastpath+0x16/0x1b

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agovhost: avoid pr_err on condition guest can trigger
Michael S. Tsirkin [Thu, 24 Jun 2010 14:10:25 +0000 (17:10 +0300)]
vhost: avoid pr_err on condition guest can trigger

Guest can trigger packet truncation by posting
a very short buffer and disabling buffer merging.
Convert pr_err to pr_debug to avoid log from filling
up when this happens.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agocxgb4vf: fix SGE resource resource deallocation bug
Casey Leedom [Fri, 16 Jul 2010 05:47:06 +0000 (22:47 -0700)]
cxgb4vf: fix SGE resource resource deallocation bug

Fix SGE resource resource deallocation bug.  Forgot to increment the RXQ and
TXQ cursors in the loop ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipmr: Don't leak memory if fib lookup fails.
Ben Greear [Thu, 15 Jul 2010 13:22:33 +0000 (13:22 +0000)]
ipmr: Don't leak memory if fib lookup fails.

This was detected using two mcast router tables.  The
pimreg for the second interface did not have a specific
mrule, so packets received by it were handled by the
default table, which had nothing configured.

This caused the ipmr_fib_lookup to fail, causing
the memory leak.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next: vmxnet3 fixes [2/5] Interrupt control bitmap
Ronghua Zang [Fri, 16 Jul 2010 05:18:47 +0000 (22:18 -0700)]
net-next: vmxnet3 fixes [2/5] Interrupt control bitmap

A new bit map 'intrCtrl' is introduced in the DriverShared area. The
driver should update VMXNET3_IC_DISABLE_ALL bit before writing IMR.

Signed-off-by: Ronghua Zang <ronghua@vmware.com>
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next: fix LRO feature update in vmxnet3
Shreyas Bhatewara [Fri, 16 Jul 2010 05:17:29 +0000 (22:17 -0700)]
net-next: fix LRO feature update in vmxnet3

Fix LRO feature update.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: sizeof struct tcp_skb_cb is 44
Eric Dumazet [Fri, 16 Jul 2010 04:41:00 +0000 (21:41 -0700)]
tcp: sizeof struct tcp_skb_cb is 44

Correct comment stating sizeof(struct tcp_skb_cb) is 36 or 40, since its
44 bytes, since commit 951dbc8ac714b04 ([IPV6]: Move nextheader offset
to the IP6CB).

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Version update
Jon Mason [Thu, 15 Jul 2010 08:47:28 +0000 (08:47 +0000)]
vxge: Version update

Version update

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Update maintainers information
Jon Mason [Thu, 15 Jul 2010 08:47:27 +0000 (08:47 +0000)]
vxge: Update maintainers information

Update and correct maintainers information

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Update copyright information
Jon Mason [Thu, 15 Jul 2010 08:47:26 +0000 (08:47 +0000)]
vxge: Update copyright information

Update copyright information to reflect the Exar purchase of Neterion

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: NETIF_F_LLTX removal
Jon Mason [Thu, 15 Jul 2010 08:47:25 +0000 (08:47 +0000)]
vxge: NETIF_F_LLTX removal

NETIF_F_LLTX and it's usage of local transmit locks are depricated in
favor of using the netdev queue's transmit lock.  Remove the local
lock and all references to it, and use the netdev queue transmit lock
in the transmit completion handler.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Fix multicast issues
Jon Mason [Thu, 15 Jul 2010 08:47:24 +0000 (08:47 +0000)]
vxge: Fix multicast issues

Fix error in multicast flag check, add calls to restore the status of
multicast and promiscuous mode settings after change_mtu, and style
cleanups to shorten the function calls by using a temporary variable.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Remove queue_state references
Jon Mason [Thu, 15 Jul 2010 08:47:23 +0000 (08:47 +0000)]
vxge: Remove queue_state references

Remove queue_state references, as they are no longer necessary.

Also, The driver needs to start/stop the queue regardless of which type
of steering is enabled.  Remove checks for TX_MULTIQ_STEERING only and
start/stop for all steering types.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: bridge: fix sign bug
Kulikov Vasiliy [Thu, 15 Jul 2010 08:47:33 +0000 (08:47 +0000)]
net: bridge: fix sign bug

ipv6_skip_exthdr() can return error code that is below zero.
'offset' is unsigned, so it makes no sense.
ipv6_skip_exthdr() returns 'int' so we can painlessly change type of
offset to int.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: ixgbevf: fix unsigned underflow
Kulikov Vasiliy [Thu, 15 Jul 2010 08:45:57 +0000 (08:45 +0000)]
drivers: ixgbevf: fix unsigned underflow

'count' is unsigned. It is initialized to zero, then it can be increased
multiple times, and finally it is used in such a way:

   >>>> count--;
   |
   |    /* clear timestamp and dma mappings for remaining portion of packet */
   |    while (count >= 0) {
   |            count--;
   |            ...
   ^
If count is zero here (so, it was never increased), we would have a very
long loop :)

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: irda: fix sign bug
Kulikov Vasiliy [Thu, 15 Jul 2010 08:45:29 +0000 (08:45 +0000)]
drivers: irda: fix sign bug

platform_get_irq_byname() can return negative results, it is not seen to
unsigned irq. Make it signed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: irda: fix sign bug
Kulikov Vasiliy [Thu, 15 Jul 2010 08:44:54 +0000 (08:44 +0000)]
drivers: irda: fix sign bug

platform_get_irq_byname() can return negative results, it is not seen to
unsigned irq. Make it signed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: isdn: get rid of custom strtoul()
Andy Shevchenko [Thu, 15 Jul 2010 02:37:20 +0000 (02:37 +0000)]
drivers: isdn: get rid of custom strtoul()

There were two methods isdn_gethex() and isdn_getnum() which are custom
implementations of strtoul(). Get rid of them in regard to
strict_strtoul() kernel's function.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: gigaset307x-common@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: isdn: remove custom strtoul()
Andy Shevchenko [Thu, 15 Jul 2010 02:37:19 +0000 (02:37 +0000)]
drivers: isdn: remove custom strtoul()

In this case we safe to use strict_strtoul().

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers: isdn: use kernel macros to convert hex digit
Andy Shevchenko [Thu, 15 Jul 2010 02:37:18 +0000 (02:37 +0000)]
drivers: isdn: use kernel macros to convert hex digit

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:07:30 +0000 (09:07 +0000)]
isdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:05:38 +0000 (09:05 +0000)]
mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:04:45 +0000 (09:04 +0000)]
isdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:04:07 +0000 (09:04 +0000)]
mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:02:36 +0000 (09:02 +0000)]
isdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>