27 Jul, 2010
1 commit
-
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
Signed-off-by: David S. Miller
26 Jul, 2010
5 commits
-
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
Signed-off-by: David S. Miller -
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
Signed-off-by: Shreyas Bhatewara
Signed-off-by: Matthew Delco
Signed-off-by: Ronghua Zhang
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
netif_device_attach missing from error path in qlcnic_diag_alloc_res
Signed-off-by: Sony Chacko
Signed-off-by: Amit Kumar Salecha
Signed-off-by: David S. Miller -
o Loopback not supported for virtual function.
Signed-off-by: Amit Kumar Salecha
Signed-off-by: David S. Miller
25 Jul, 2010
4 commits
-
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
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
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
Tested-by: Stephen Ko
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller -
Fix maximum and minmum bandwith value.
Signed-off-by: Rajesh Borundia
Signed-off-by: Amit Kumar Salecha
Signed-off-by: David S. Miller
24 Jul, 2010
25 commits
-
Conflicts:
drivers/net/wireless/iwlwifi/iwl-commands.h -
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
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
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
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller -
If vortex_probe1() fails we should unmap ioaddr mapped earlier.
Signed-off-by: Kulikov Vasiliy
Signed-off-by: David S. Miller -
Signed-off-by: Andy Shevchenko
Signed-off-by: David S. Miller -
Signed-off-by: Andy Shevchenko
Cc: Corey Thomas
Cc: "John W. Linville"
Cc: linux-wireless@vger.kernel.org
Signed-off-by: David S. Miller -
Signed-off-by: Andy Shevchenko
Cc: Greg Kroah-Hartman
Cc: linux-usb@vger.kernel.org
Signed-off-by: David S. Miller -
Signed-off-by: Andy Shevchenko
Signed-off-by: David S. Miller -
Signed-off-by: Andy Shevchenko
Cc: Chas Williams
Cc: linux-atm-general@lists.sourceforge.net
Signed-off-by: David S. Miller -
Signed-off-by: Ajit Khaparde
Signed-off-by: David S. Miller -
This patch changes names of some variables.
Signed-off-by: Ajit Khaparde
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
Signed-off-by: Ajit Khaparde
Signed-off-by: David S. Miller -
Signed-off-by: Ajit Khaparde
Signed-off-by: David S. Miller -
Signed-off-by: Ajit Khaparde
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
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)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
When creating a claw device, just 2 subchannels have to be grouped.
Signed-off-by: Ursula Braun
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
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
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller
23 Jul, 2010
5 commits
-
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
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
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
Signed-off-by: Jay Vosburgh
Cc: Michael Chan
Signed-off-by: David S. Miller -
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
Cc: Pedro Garcia
Cc: Patrick McHardy
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller