26 Mar, 2008
30 commits
-
Given that there are no apparent calls to lock_kernel() or
unlock_kernel() under net/ax25, delete the TODO reference related to
that.Signed-off-by: Robert P. J. Day
Signed-off-by: David S. Miller -
SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list
method to determine whether it supports multicast. Drivers implementing
secondary unicast support use set_rx_mode however.Check for both dev->set_multicast_mode and dev->set_rx_mode to determine
multicast capabilities.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
It should be a "struct ktermios" not a "struct termios".
Based upon a build warning reported by Stephen Rothwell.
Signed-off-by: David S. Miller
-
IFF_ALLMULTI is an indication from the network stack to the driver
to disable multicast filters, drivers should never set it directly.Since the UML networking device doesn't have any filtering capabilites,
it doesn't the set_multicast_list function at all, it is kept so userspace
can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:- the next dev_change_flags call will notice a difference between
dev->gflags and the actual flags, enable promisc/allmulti
mode and incorrectly update dev->gflags- this keeps the underlying device in promisc/allmulti mode until
the VLAN device is deletedSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Jeff Garzik
-
- Handling TX completions on the same cpu as the sender.
Signed-off-by: Surjit Reang
Signed-off-by: Jeff Garzik -
Some ROMs on embedded devices store incorrect values for
the PHY address of the ethernet device.
It looks like the number is sign-extended.
Truncate the value by applying the PHY-address mask to it.
The patch was tested on a bcm47xx embedded system (where the bug
triggers) and a bcm4400 PCI card.Signed-off-by: Michael Buesch
Signed-off-by: Jeff Garzik -
According to: Documentation/networking/netdevices.txt:
napi->poll:
..........
Context: softirq
will be called with interrupts disabled by netconsole.napi->poll() could be called either with interrupts enabled
(in softirq context) or disabled (by netconsole), so the irq flag
should be preserved.Inspired by Ingo's resent forcedeth patch :-)
Signed-off-by: Marin Mitov
Signed-off-by: Jeff Garzik -
When query for OID_GEN_PHYSICAL_MEDIUM fails, uninitialized pointer
'phym' is being accessed in generic_rndis_bind(), resulting OOPS.
Patch fixes phym to be initialized and setup correctly when
rndis_query() for physical medium fails.Bug was introduced by following commit:
commit 039ee17d1baabaa21783a0d5ab3e8c6d8c794bdf
Author: Jussi Kivilinna
Date: Sun Jan 27 23:34:33 2008 +0200Reported-by: Dmitri Monakhov
Signed-off-by: Jussi Kivilinna
Acked-by: David Brownell
Signed-off-by: Jeff Garzik -
Using iWARP with a Chelsio T3 NIC generates the following lockdep warning:
=================================
[ INFO: inconsistent lock state ]
2.6.25-rc6 #50
---------------------------------
inconsistent {softirq-on-W} -> {in-softirq-W} usage.
swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
(&adap->sge.reg_lock){-+..}, at: [] cxgb_offload_ctl+0x3af/0x507 [cxgb3]The problem is that reg_lock is used with plain spin_lock() in
drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in
drivers/net/cxgb3/cxgb3_offload.c. This is technically a false
positive, since the uses in sge.c are only in the initialization and
cleanup paths and cannot overlap with any use in interrupt context.The best fix is probably just to use spin_lock_irq() with reg_lock in
sge.c. Even though it's not strictly required for correctness, it
avoids triggering lockdep and the extra overhead of disabling
interrupts is not important at all in the initialization and cleanup
slow paths.Signed-off-by: Roland Dreier
Signed-off-by: Jeff Garzik -
Indicate that HEA calculates IPv4 checksums only
Signed-off-by: Thomas Klein
Signed-off-by: Jeff Garzik -
Signed-off-by: Peter Korsgaard
Signed-off-by: Jeff Garzik -
Signed-off-by: Peter Korsgaard
Signed-off-by: Jeff Garzik -
The Hirose USB-100 adapter uses a dm9601 chip.
Reported by Robert Brockway.Signed-off-by: Peter Korsgaard
Signed-off-by: Jeff Garzik -
Marvell PHY m88e1111 (not sure about other models, but think they too)
works in two modes: fiber and copper. In Marvell PHY driver (that we
have in current community kernels) code supported only copper mode,
and this is not configurable, bits for copper mode are simply written
in registers during PHY initialization.This patch adds support for both modes.
Signed-off-by: Alexandr Smirnov
Acked-by: Andy Fleming
Signed-off-by: Jeff Garzik -
Don't count rx dropped packets based on return value of netif_receive_skb(),
which is misleading.Signed-off-by: Dhananjay Phadke
Tested-by: Vernon Mauery
Signed-off-by: Jeff Garzik -
o eliminate tx lock in netxen adapter struct, instead pound on netdev
tx lock appropriately.
o remove old "concurrent transmit" code that unnecessarily drops and
reacquires tx lock in hard_xmit_frame(), this is already serialized
the netdev xmit lock.
o reduce scope of tx lock in tx cleanup. tx cleanup operates on
different section of the ring than transmitting cpus and is
guarded by producer and consumer indices. This fixes a race
caused by rx softirq preemption on realtime kernels.Signed-off-by: Dhananjay Phadke
Tested-by: Vernon Mauery
Signed-off-by: Jeff Garzik -
o separate and simpler irq handler for msi interrupts, avoids few checks
than legacy mode.
o avoid redudant tx_has_work() and rx_has_work() checks in interrupt
and napi, which can uncork irq based on racy (lockless) access to tx
and rx ring indices. If we get interrupt, there's sufficient reason to
schedule napi.
o replenish rx ring more often, remove self-imposed threshold rcv_free
that prevents posting rx desc to card. This improves performance in
low memory.Signed-off-by: Dhananjay Phadke
Tested-by: Vernon Mauery
Signed-off-by: Jeff Garzik -
Recent netxen firmware has new scheme of generating MSI interrupts, it
raises interrupt and blocks itself, waiting for driver to unmask. This
reduces chance of spurious interrupts.The driver will be able to deal with older firmware as well.
Signed-off-by: Dhananjay Phadke
Tested-by: Vernon Mauery
Signed-off-by: Jeff Garzik -
Cc: Jeff Garzik
Cc: Deepak Saxena
Cc: Nicolas Pitre
Cc: Russell King
Cc: Paul Mundt
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik -
The variable num_group_tail_writes is initialized but never used otherwise.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
identifier i;
constant C;
@@(
extern T i;
|
- T i;
)
//Signed-off-by: Julia Lawall
Signed-off-by: Auke Kok
Signed-off-by: Jeff Garzik -
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
le16_to_cpu() should be done before mask and shift...
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
Update version to 3.2.5.
Signed-off-by: Jay Vosburgh
Signed-off-by: Jeff Garzik -
For bonding interfaces any attempt to read the sysfs directory contents after
module removal results in an oops. The fix is to release sysfs attributes
for the interfaces upon module unload.Signed-off-by: Libor Pechacek
Acked-by: Jay Vosburgh
Signed-off-by: Jeff Garzik -
Fix two compiler warnings that are new with recent versions of gcc
(apparently 4.2 and up). One is fixed by refactoring; this change was
supplied by Stephen Hemminger. The other was fixed by labelling the
variable as uninitialized_var() after confirming via inspection that it
cannot actually be used uninitialized.Signed-off-by: Jay Vosburgh
Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik -
The 802.3ad state machine lock can be acquired in both softirq and
not softirq context, but was not held at _bh to prevent a deadlock (which
could occur if a LACPDU arrived and was processed while the lock was
held).Corrected this, now hold the state machine lock at _bh to prevent
deadlock.Bug reported by Todd Fleisher .
Signed-off-by: Jay Vosburgh
Signed-off-by: Jeff Garzik -
This patch to drivers/net/tokenring/smctr.c fixes a "bitwise vs
logical" or error.Signed-off-by: Jay Schulist
Signed-off-by: Jeff Garzik
25 Mar, 2008
2 commits
-
Signed-off-by: Kazunori MIYAZAWA
Signed-off-by: David S. Miller -
Proxy neighbors do not have any reference counting, so any caller
of pneigh_lookup (unless it's a netlink triggered add/del routine)
should _not_ perform any actions on the found proxy entry.There's one exception from this rule - the ipv6's ndisc_recv_ns()
uses found entry to check the flags for NTF_ROUTER.This creates a race between the ndisc and pneigh_delete - after
the pneigh is returned to the caller, the nd_tbl.lock is dropped
and the deleting procedure may proceed.One of the fixes would be to add a reference counting, but this
problem exists for ndisc only. Besides such a patch would be too
big for -rc4.So I propose to introduce a __pneigh_lookup() which is supposed
to be called with the lock held and use it in ndisc code to check
the flags on alive pneigh entry.Changes from v2:
As David noticed, Exported the __pneigh_lookup() to ipv6 module.
The checkpatch generates a warning on it, since the EXPORT_SYMBOL
does not follow the symbol itself, but in this file all the
exports come at the end, so I decided no to break this harmony.Changes from v1:
Fixed comments from YOSHIFUJI - indentation of prototype in header
and the pndisc_check_router() name - and a compilation fix, pointed
by Daniel - the is_routed was (falsely) considered as uninitialized
by gcc.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
24 Mar, 2008
3 commits
-
HTB is event driven algorithm and part of its work is to apply
scheduled events at proper times. It tried to defend itself from
livelock by processing only limited number of events per dequeue.
Because of faster computers some users already hit this hardcoded
limit.This patch limits processing up to 2 jiffies (why not 1 jiffie ?
because it might stop prematurely when only fraction of jiffie
remains).Signed-off-by: Martin Devera
Signed-off-by: David S. Miller -
From: Evgeniy Polyakov
We don't need one cqueue thread for each CPU. cqueue is used for
receiving userspace datagrams, which are very rare and thus will
happily live with a single queue.Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Signed-off-by: Wang Chen
Signed-off-by: David S. Miller
23 Mar, 2008
5 commits
-
As reported by Johannes Berg:
I started getting this warning with recent kernels:
[ 773.908927] ------------[ cut here ]------------
[ 773.908954] Badness at net/core/dev.c:2204
...If we loop more than once in gem_poll(), we'll
use more than the real budget in our gem_rx()
calls, thus eventually trigger the caller's
assertions in net_rx_action().Subtract "work_done" from "budget" for the second
arg to gem_rx() to fix the bug.Signed-off-by: David S. Miller
-
On 10GBaseT boards setting the type to TP will cause the driver to try
to configure 1GBaseT.
Since there are currently no boards that support setting of the port
type, disable this for now.Signed-off-by: Eliezer Tamir
Signed-off-by: David S. Miller -
The variable cb is initialized but never used otherwise.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
identifier i;
constant C;
@@(
extern T i;
|
- T i;
)
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
The variable hlen is initialized but never used otherwise.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
identifier i;
constant C;
@@(
extern T i;
|
- T i;
)
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
This gets rid of a warning caused by the test in rcu_assign_pointer.
I tried to fix rcu_assign_pointer, but that devolved into a long set
of discussions about doing it right that came to no real solution.
Since the test in rcu_assign_pointer for constant NULL would never
succeed in fib_trie, just open code instead.Signed-off-by: Stephen Hemminger
Acked-by: Paul E. McKenney
Signed-off-by: David S. Miller