Changli Gao [Sun, 25 Jul 2010 23:21:05 +0000 (23:21 +0000)]
genetlink: use genl_register_family_with_ops()
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Tue, 27 Jul 2010 03:59:42 +0000 (20:59 -0700)]
drop_monitor: use genl_register_family_with_ops()
[ Fix unused local variable build warnings. -DaveM ]
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Sun, 25 Jul 2010 20:46:01 +0000 (20:46 +0000)]
genetlink: cleanup code according to CodingStyle
If the function is exported, the EXPORT* macro for it should follow immediately
after the closing function brace line.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/netlink/genetlink.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Jonas Bonn [Tue, 27 Jul 2010 01:45:05 +0000 (18:45 -0700)]
ethoc: add devinit/devexit section initializers
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nick Nunley [Mon, 26 Jul 2010 13:15:29 +0000 (13:15 +0000)]
igb: restore EEPROM values of MDICNFG on reset with 82580
On a reset the MDICNFG.Destination and MDICNFG.COM_MDIO
register fields are not restored to the EEPROM default.
This patch modifies the reset code to read the EEPROM
and restore the default values.
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nick Nunley [Mon, 26 Jul 2010 13:15:06 +0000 (13:15 +0000)]
igb: add support for SGMII-based MDIO PHYs
This patch adds support for external MDIO PHYs, in addition to
the standard SFP support for SGMII PHYs over the I2C interface.
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jean Delvare [Mon, 26 Jul 2010 12:20:43 +0000 (12:20 +0000)]
e1000e: Drop a useless statement
err is set again a few lines below.
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 22 Jul 2010 15:36:17 +0000 (15:36 +0000)]
drivers/net/qla3xxx.c: Checkpatch cleanups
Remove typedefs
Indentation and spacing
Use a temporary for a very long pointer variable
More 80 column compatible
Convert a switch to if/else if
Compile tested only, depends on patch "Update logging message style"
(old)
$ scripts/checkpatch.pl -f drivers/net/qla3xxx.c | grep "^total:"
total: 209 errors, 82 warnings, 3995 lines checked
(new)
$ scripts/checkpatch.pl -f drivers/net/qla3xxx.c | grep "^total:"
total: 2 errors, 0 warnings, 3970 lines checked
$ size drivers/net/qla3xxx.o.*
text data bss dec hex filename
50413 212 13864 64489 fbe9 drivers/net/qla3xxx.o.old
49959 212 13728 63899 f99b drivers/net/qla3xxx.o.new
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 22 Jul 2010 12:33:31 +0000 (12:33 +0000)]
drivers/net/qla3xxx.c: Update logging message style
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove #define PFX
Improve a couple of loops to avoid deep indentation.
Compile tested only
$ size drivers/net/qla3xxx.o.*
text data bss dec hex filename
51603 212 13864 65679 1008f drivers/net/qla3xxx.o.old
50413 212 13864 64489 fbe9 drivers/net/qla3xxx.o.new
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 26 Jul 2010 20:13:49 +0000 (13:13 -0700)]
wireless: Make COMPAT_NETLINK_MESSAGES depend upon WEXT_CORE
WIRELESS_EXT is not the correct dependency.
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 26 Jul 2010 20:09:16 +0000 (13:09 -0700)]
netlink: netlink_recvmsg() fix
commit
1dacc76d0014
(net/compat/wext: send different messages to compat tasks)
introduced a race condition on netlink, in case MSG_PEEK is used.
An skb given by skb_recv_datagram() might be shared, we must copy it
before any modification, or risk fatal corruption.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Ditto [Mon, 26 Jul 2010 04:54:28 +0000 (21:54 -0700)]
forcedeth: Fix different hardware statistics versions.
The macros for the values of the bit field describing the four
different versions of statistics supported by different hardware
variants were being misused. Where the code was trying to test if the
hardware implements V3, it was actually testing whether it implements
any of V1, V2, or V3, causing the driver to report statistics that
don't really exist in the hardware, with bogus values.
Signed-off-by: Mike Ditto <mditto@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhavesh Davda [Sat, 24 Jul 2010 14:43:29 +0000 (14:43 +0000)]
net-next: Fix an overflow bug in vmxnet3 Tx descriptor
Fix an overflow bug in vmxnet3 Tx descriptor
This patch fixes a bug where a 16K buffer on a Tx descriptor was overflowing
into the 'gen' bit in the descriptor thereby corrupting the descriptor and
stalling the transmit ring.
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Matthew Delco <delcoM@vmware.com>
Signed-off-by: Ronghua Zhang <ronghua@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew O. Shadoura [Sat, 24 Jul 2010 16:24:17 +0000 (16:24 +0000)]
3c59x: Add ethtool WOL support
This patch adds wrappers for ethtool to get or set wake-on-LAN
setting without re-inserting the kernel module.
Signed-off-by: Andrew O. Shadoura <andrew@beldisplaytech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sony Chacko [Sat, 24 Jul 2010 18:32:18 +0000 (18:32 +0000)]
qlcnic: fix diag resource allocation
netif_device_attach missing from error path in qlcnic_diag_alloc_res
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amit Kumar Salecha [Sat, 24 Jul 2010 18:32:17 +0000 (18:32 +0000)]
qlcnic: fix loopback test
o Loopback not supported for virtual function.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 22 Jul 2010 19:09:08 +0000 (19:09 +0000)]
net: pskb_expand_head() optimization
Move frags[] at the end of struct skb_shared_info, and make
pskb_expand_head() copy only the used part of it instead of whole array.
This should avoid kmemcheck warnings and speedup pskb_expand_head() as
well, avoiding a lot of cache misses.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Assmann [Thu, 22 Jul 2010 02:50:21 +0000 (02:50 +0000)]
sysfs: add attribute to indicate hw address assignment type
Add addr_assign_type to struct net_device and expose it via sysfs.
This new attribute has the purpose of giving user-space the ability to
distinguish between different assignment types of MAC addresses.
For example user-space can treat NICs with randomly generated MAC
addresses differently than NICs that have permanent (locally assigned)
MAC addresses.
For the former udev could write a persistent net rule by matching the
device path instead of the MAC address.
There's also the case of devices that 'steal' MAC addresses from slave
devices. In which it is also be beneficial for user-space to be aware
of the fact.
This patch also introduces a helper function to assist adoption of
drivers that generate MAC addresses randomly.
Signed-off-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 23 Jul 2010 13:44:21 +0000 (13:44 +0000)]
ixgbe: fix ethtool stats
In latest changes about 64bit stats on 32bit arches,
[commit
28172739f0a276eb8 (net: fix 64 bit counters on 32 bit arches)],
I missed ixgbe uses a bit of magic in its ixgbe_gstrings_stats
definition.
IXGBE_NETDEV_STAT() must now assume offsets relative to
rtnl_link_stats64, not relative do dev->stats.
As a bonus, we also get 64bit stats on ethtool -S
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Fri, 23 Jul 2010 21:24:25 +0000 (21:24 +0000)]
qlcnic: fix bandwidth check
Fix maximum and minmum bandwith value.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 23 Jul 2010 21:03:38 +0000 (14:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-commands.h
Ben Hutchings [Thu, 22 Jul 2010 14:18:28 +0000 (14:18 +0000)]
3c59x: Fix call to mdio_sync() with the wrong argument
commit
a095cfc40ec7ebe63e9532383c5b5c2a27b14075
"3c59x: Specify window explicitly for access to windowed registers"
changed the first parameter to mdio_sync(), from a pointer to the
register mapping, to a pointer to the vortex_private structure,
and changed all but one of the call sites. Fix that last one.
Reported-by: Luca Falavigna <dktrkranz@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kulikov Vasiliy [Fri, 23 Jul 2010 06:36:15 +0000 (06:36 +0000)]
net: s2io: fix buffer overflow
vpd_data[] is allocated as kmalloc(256, GFP_KERNEL), so if cnt = 255
then (cnt + 3) overflows 256. memset() is executed without checking.
vpd_data[cnt+2] must be less than 256-cnt-2 as the latter is number of
vpd_data[] elements to copy.
Do not fill with zero the beginning of nic->serial_num as it will
be filled with vpd_data[].
String in product_name[] should be terminated by '\0'.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Fri, 23 Jul 2010 01:05:05 +0000 (01:05 +0000)]
mv643xx_eth: potential null dereference
We assume that "pd" can be null on the previous line, and throughout the
function so we should check it here as well. This was introduced by
9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kulikov Vasiliy [Fri, 23 Jul 2010 06:44:44 +0000 (06:44 +0000)]
net: 3c59x: fix leak of iomaps
If vortex_probe1() fails we should unmap ioaddr mapped earlier.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Shevchenko [Fri, 23 Jul 2010 03:18:10 +0000 (03:18 +0000)]
net: core: don't use own hex_to_bin() method
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Shevchenko [Fri, 23 Jul 2010 03:18:09 +0000 (03:18 +0000)]
wireless: use newly introduced hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Corey Thomas <coreythomas@charter.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Shevchenko [Fri, 23 Jul 2010 03:18:08 +0000 (03:18 +0000)]
usb: usbnet: use newly introduced hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-usb@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Shevchenko [Fri, 23 Jul 2010 03:18:07 +0000 (03:18 +0000)]
drivers: net: use newly introduced hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Shevchenko [Fri, 23 Jul 2010 03:18:06 +0000 (03:18 +0000)]
drivers: atm: don't use private copy of hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 23 Jul 2010 02:05:36 +0000 (02:05 +0000)]
be2net: bump the driver version number
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 23 Jul 2010 02:04:54 +0000 (02:04 +0000)]
be2net: variable name changes
This patch changes names of some variables.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 23 Jul 2010 19:42:40 +0000 (12:42 -0700)]
be2net: supress printing error when mac query fails for VF
When a virtual function driver in initialized, the network mac
query command can fail. Skip display of error message in that case.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 23 Jul 2010 01:52:13 +0000 (01:52 +0000)]
be2net: code to support tx rate configuration on virtual functions
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 23 Jul 2010 01:51:22 +0000 (01:51 +0000)]
be2net: add vlan support for sriov virtual functions
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Johannes Berg [Wed, 21 Jul 2010 09:30:27 +0000 (11:30 +0200)]
mac80211: proper IBSS locking
IBSS has never had locking, instead relying on some
memory barriers etc. That's hard to get right, and
I think we had it wrong too until the previous patch.
Since this is not performance sensitive, it doesn't
make sense to have the maintenance overhead of that,
so add proper locking.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 21 Jul 2010 08:52:40 +0000 (10:52 +0200)]
mac80211: fix IBSS lockdep complaint
Bob reported a lockdep complaint originating in
the mac80211 IBSS code due to the common work
struct patch. The reason is that the IBSS and
station mode code have different locking orders
for the cfg80211 wdev lock and the work struct
(where "locking" implies running/canceling).
Fix this by simply not canceling the work in
the IBSS code, it is not necessary since when
the REQ_RUN bit is cleared, the work will run
without effect if it runs. When the interface
is set down, it is flushed anyway, so there's
no concern about it running after memory has
been invalidated either.
This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16419
Additionally, looking into this I noticed that
there's a small window while the IBSS is torn
down in which the work may be rescheduled and
the REQ_RUN bit be set again after leave() has
cleared it when a scan finishes at exactly the
same time. Avoid that by setting the ssid_len
to zero before clearing REQ_RUN which signals
to the scan finish code that this interface is
not active.
Reported-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 21 Jul 2010 08:09:25 +0000 (10:09 +0200)]
mac80211: refuse shared key auth when WEP is unavailable
When WEP is not available, we should reject shared
key authentication because it could never succeed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Maxime Bizon [Wed, 21 Jul 2010 15:21:38 +0000 (17:21 +0200)]
cfg80211: fix race between sysfs and cfg80211
device_add() is called before adding the phy to the cfg80211 device
list.
So if a userspace program uses sysfs uevents to detect new phy
devices, and queries nl80211 to get phy info, it can get ENODEV even
though the phy exists in sysfs.
An easy workaround is to hold the cfg80211 mutex until the phy is
present in sysfs/cfg80211/debugfs.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 21 Jul 2010 16:48:05 +0000 (11:48 -0500)]
b43: silence phy_n sparse warnings
drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates bits from constant value (
ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates bits from constant value (
ffff7fff becomes 7fff)
drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates bits from constant value (
ffff00ff becomes ff)
drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates bits from constant value (
ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates bits from constant value (
ffff7fff becomes 7fff)
drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates bits from constant value (
ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates bits from constant value (
ffff3fff becomes 3fff)
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 21 Jul 2010 15:37:19 +0000 (11:37 -0400)]
b43: silence most sparse warnings
CHECK drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static?
CHECK drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (
ffff7fff becomes 7fff)
CHECK drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static?
drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (
ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (
ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (
ffff1fff becomes 1fff)
CHECK drivers/net/wireless/b43/wa.c
drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (
ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (
ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (
ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (
ffff0fff becomes fff)
AFAICT, none of these amount to real bugs. But this reduces warning
spam from sparse w/o significantly affecting readability of the code (IMHO).
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
John W. Linville [Mon, 19 Jul 2010 20:35:20 +0000 (16:35 -0400)]
rtl8180: improve signal reporting for rtl8185 hardware
The existing code seemed to be somewhat based on the datasheet, but
varied substantially from the vendor-provided driver. This mirrors the
handling of the rtl8185 case from that driver, but still neglects the
specifics for the rtl8180 hardware. Those details are a bit muddled...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 17:55:00 +0000 (13:55 -0400)]
mwl8k: correct/silence sparse warnings
drivers/net/wireless/mwl8k.c:1541:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/mwl8k.c:1541:21: expected restricted __le16 [usertype] result
drivers/net/wireless/mwl8k.c:1541:21: got int
drivers/net/wireless/mwl8k.c:1575:42: expected unsigned short [unsigned] [usertype] cmd
drivers/net/wireless/mwl8k.c:1575:42: got restricted __le16 [usertype] code
drivers/net/wireless/mwl8k.c:1587:50: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1587:50: expected unsigned short [unsigned] [usertype] cmd
drivers/net/wireless/mwl8k.c:1587:50: got restricted __le16 [usertype] code
drivers/net/wireless/mwl8k.c:1592:50: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1592:50: expected unsigned short [unsigned] [usertype] cmd
drivers/net/wireless/mwl8k.c:1592:50: got restricted __le16 [usertype] code
drivers/net/wireless/mwl8k.c:1845:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1845:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1845:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:1848:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1848:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1848:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:1851:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1851:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1851:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:1854:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1854:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1854:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:1857:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1857:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1857:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:1860:27: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/mwl8k.c:1860:27: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/mwl8k.c:1860:27: got restricted __le32 [usertype] <noident>
drivers/net/wireless/mwl8k.c:3055:20: warning: incorrect type in assignment (different base types)
drivers/net/wireless/mwl8k.c:3055:20: expected restricted __le16 [usertype] ht_caps
drivers/net/wireless/mwl8k.c:3055:20: got unsigned short [unsigned] [usertype] cap
At least the last one looks like a real bug...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
John W. Linville [Tue, 20 Jul 2010 19:12:04 +0000 (15:12 -0400)]
wireless: remove unnecessary reg_same_country_ie_hint
"Might as well remove reg_same_country_ie_hint() completely since we
already dealt with suspend/resume through the regulatory hint
disconnect." -- Luis
Reported-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 18:21:48 +0000 (14:21 -0400)]
rt2x00: correct sparse warning in rt2x00debug.c
CHECK drivers/net/wireless/rt2x00/rt2x00debug.c
drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: warning: incorrect type in assignment (different base types)
drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: expected restricted __le32 [usertype] chip_rev
drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: got restricted __le16 [usertype] <noident>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
John W. Linville [Tue, 20 Jul 2010 18:14:03 +0000 (14:14 -0400)]
libipw: correct sparse warnings and mark some variables static
CHECK drivers/net/wireless/ipw2x00/libipw_module.c
drivers/net/wireless/ipw2x00/libipw_module.c:65:21: warning: symbol 'libipw_config_ops' was not declared. Should it be static?
drivers/net/wireless/ipw2x00/libipw_module.c:66:6: warning: symbol 'libipw_wiphy_privid' was not declared. Should it be static?
CHECK drivers/net/wireless/ipw2x00/libipw_wx.c
drivers/net/wireless/ipw2x00/libipw_wx.c:415:17: warning: symbol 'ssid' shadows an earlier one
drivers/net/wireless/ipw2x00/libipw_wx.c:324:9: originally declared here
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 18:11:51 +0000 (14:11 -0400)]
ipw2100: mark ipw2100_pm_qos_req static
CHECK drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2100.c:177:28: warning: symbol 'ipw2100_pm_qos_req' was not declared. Should it be static?
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 17:15:31 +0000 (13:15 -0400)]
ath9k: correct sparse identified endian bug in ath_paprd_calibrate
drivers/net/wireless/ath/ath9k/main.c:282:26: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/main.c:282:26: expected restricted __le16 [usertype] duration_id
drivers/net/wireless/ath/ath9k/main.c:282:26: got int
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 16:32:52 +0000 (12:32 -0400)]
wireless: mark cfg80211_is_all_idle as static
CHECK net/wireless/sme.c
net/wireless/sme.c:38:6: warning: symbol 'cfg80211_is_all_idle' was not declared. Should it be static?
It is not used elsewhere, so mark it static.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 16:29:14 +0000 (12:29 -0400)]
wireless: correct sparse warning in generated regdb.c
CHECK net/wireless/regdb.c
net/wireless/regdb.c:8:34: warning: symbol 'reg_regdb' was not declared. Should it be static?
net/wireless/regdb.c:11:5: warning: symbol 'reg_regdb_size' was not declared. Should it be static?
Simply include the also generated regdb.h.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 16:22:40 +0000 (12:22 -0400)]
wireless: correct sparse warning in wext-compat.c
CHECK net/wireless/wext-compat.c
net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static?
Add declaration in cfg80211.h. Also add an EXPORT_SYMBOL_GPL, since all
the peer functions have it.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 20 Jul 2010 16:09:11 +0000 (12:09 -0400)]
wireless: correct sparse warning in lib80211_crypt_tkip.c
CHECK net/wireless/lib80211_crypt_tkip.c
net/wireless/lib80211_crypt_tkip.c:581:27: warning: cast to restricted __le16
Caused by dereferencing a "u8 *" and passing it to le16_to_cpu...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 15 Jul 2010 18:57:33 +0000 (14:57 -0400)]
wireless: only use alpha2 regulatory information from country IE
The meaning and/or usage of the country IE is somewhat poorly defined.
In practice, this means that regulatory rulesets in a country IE are
often incomplete and might be untrustworthy. This removes the code
associated with interpreting those rulesets while preserving respect
for country "alpha2" codes also contained in the country IE.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
David Gnedt [Mon, 19 Jul 2010 18:44:02 +0000 (20:44 +0200)]
mac80211: set carrier on for monitor interfaces on ieee80211_open
If a station interface is reused as monitor interface it is possible that
the carrier is still set to off. This breaks packet injection on that
monitor interface.
Force the carrier on in monitor interface initialisation like it is also done
for other interface types (e.g. adhoc, mesh point, ap).
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 19 Jul 2010 14:39:04 +0000 (16:39 +0200)]
mac80211: move QoS-enable to BSS info
Ever since
commit
e1b3ec1a2a336c328c336cfa5485a5f0484cc90d
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Mon Mar 29 12:18:34 2010 +0200
mac80211: explicitly disable/enable QoS
mac80211 is telling drivers, in particular
iwlwifi, whether QoS is enabled or not.
However, this is only relevant for station mode,
since only then will any device send nullfunc
frames and need to know whether they should be
QoS frames or not. In other modes, there are
(currently) no frames the device is supposed to
send.
When you now consider virtual interfaces, it
becomes apparent that the current mechanism is
inadequate since it enables/disables QoS on a
global scale, where for nullfunc frames it has
to be on a per-interface scale.
Due to the above considerations, we can change
the way mac80211 advertises the QoS state to
drivers to only ever advertise it as "off" in
station mode, and make it a per-BSS setting.
Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 17 Jul 2010 13:59:07 +0000 (15:59 +0200)]
mac80211: fix aggregation action frame handling with AP VLANs
When aggregation related action frames are enqueued for further work,
and they originate from a STA that is part of an AP VLAN, they are
currently enqueued for the AP interface. This breaks the sta_info_get()
lookup in the actual work function, and because of that, aggregation
sessions are not established for this STA.
Fix this by replacing the sta_info_get call with a call to
sta_info_get_bss.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>