David S. Miller [Wed, 13 Aug 2008 09:13:34 +0000 (02:13 -0700)]
pkt_sched: Add queue stopped test back to qdisc_run().
Based upon a bug report by Andrew Gallatin on netdev
with subject "CPU utilization increased in 2.6.27rc"
In commit 37437bb2e1ae8af470dfcd5b4ff454110894ccaf
("pkt_sched: Schedule qdiscs instead of netdev_queue.")
the test of the queue being stopped was erroneously
removed from qdisc_run().
When the TX queue of the device fills up, this omission
causes lots of extraneous useless work to be queued up
to softirq context, where we'll just return immediately
because the device is still stuffed up.
Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Mon, 11 Aug 2008 07:19:14 +0000 (17:19 +1000)]
ipvs: Explictly clear ip_vs_stats members
In order to align the coding styles of ip_vs_zero_stats() and
its child-function ip_vs_zero_estimator(), clear ip_vs_stats
members explicitlty rather than doing a limited memset().
This was chosen over modifying ip_vs_zero_estimator() to use
memset() as it is more robust against changes in members
in the relevant structures. memset() would be prefered if
all members of the structure were to be cleared.
Cc: Sven Wegener <sven.wegener@stealer.net> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Sven Wegener [Sun, 10 Aug 2008 18:24:41 +0000 (18:24 +0000)]
ipvs: Embed estimator object into stats object
There's no reason for dynamically allocating an estimator object for every
stats object. Directly embed an estimator object into every stats object and
switch to using the kernel-provided list implementation. This makes the code
much simpler and faster, as we do not need to traverse the list of all
estimators to find the one belonging to a stats object. There's no need to use
an rwlock, as we only have one reader. Also reorder the members of the
estimator structure slightly to avoid padding overhead. This can't be done
with the stats object as the members are currently copied to our user space
object via memcpy() and changing it would break ABI.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 18:24:35 +0000 (18:24 +0000)]
ipvs: Annotate init functions with __init
Being able to discard these functions saves a couple of bytes at runtime. The
cleanup functions can't be annotated with __exit as they are also called from
init functions.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:17:59 +0000 (09:17 +0000)]
ipvs: Fix possible deadlock in estimator code
There is a slight chance for a deadlock in the estimator code. We can't call
del_timer_sync() while holding our lock, as the timer might be active and
spinning for the lock on another cpu. Work around this issue by using
try_to_del_timer_sync() and releasing the lock. We could actually delete the
timer outside of our lock, as the add and kill functions are only every called
from userspace via [gs]etsockopt() and are serialized by a mutex, but better
make this explicit.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Cc: stable <stable@kernel.org> Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:14:05 +0000 (09:14 +0000)]
ipvs: Fix possible deadlock in sync code
Commit 998e7a76804b7a273a0460c2cdd5a51fa9856717 ("ipvs: Use kthread_run()
instead of doing a double-fork via kernel_thread()") introduced a possible
deadlock in the sync code. We need to use the _bh versions for the lock, as the
lock is also accessed from a bottom half.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
Herbert Xu [Sat, 9 Aug 2008 07:35:05 +0000 (00:35 -0700)]
udp: Drop socket lock for encapsulated packets
The socket lock is there to protect the normal UDP receive path.
Encapsulation UDP sockets don't need that protection. In fact
the locking is deadly for them as they may contain another UDP
packet within, possibly with the same addresses.
Also the nested bit was copied from TCP. TCP needs it because
of accept(2) spawning sockets. This simply doesn't apply to UDP
so I've removed it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Marcel Holtmann [Thu, 7 Aug 2008 20:26:54 +0000 (22:26 +0200)]
[Bluetooth] Add parameters to control BNEP header compression
The Bluetooth qualification for PAN demands testing with BNEP header
compression disabled. This is actually pretty stupid and the Linux
implementation outsmarts the test system since it compresses whenever
possible. So to pass qualification two need parameters have been added
to control the compression of source and destination headers.
Sujith [Thu, 7 Aug 2008 05:23:10 +0000 (10:53 +0530)]
ath9k: Remove redundant data structure ath9k_txq_info
Use ath9k_tx_queue_info which contains the same elements,
and merge get/set functions of tx queue properties.
Also, fix whitespace damage in struct ath_softc.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adrian Bunk [Tue, 5 Aug 2008 19:06:51 +0000 (22:06 +0300)]
ath9k: work around gcc ICEs
This patch works around an internal compiler error (gcc bug #37014) in
all gcc 4.2 compilers and the gcc 4.3 series up to at least 4.3.1
on at least powerpc and mips.
Many thanks to Andrew Pinski for analyzing the gcc bug.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
list.h: Add list_splice_tail() and list_splice_tail_init()
If you are using linked lists for queues list_splice() will not do what
you would expect even if you use the elements passed reversed. We need
to handle these differently. We add list_splice_tail() and
list_splice_tail_init().
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Wed, 6 Aug 2008 14:18:31 +0000 (16:18 +0200)]
rt2x00: Block all unsupported modes
It was possible for unsupported operating modes
to be accepted by the add_interface callback function.
This patch will block those modes until proper support
has been implemented for them.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Currently a mesh node will not forward a multicast frame if it is not subscribed
to the specific multicast address. This patch addresses the issue and fixes mesh
multicast forwarding.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Now we deal with mesh forwarding before the 802.11->802.3 conversion, thus
eliminating a few unnecessary steps. The next hop lookup is called from
ieee80211_master_start_xmit() instead of subif_start_xmit(). Until the next hop
is found, RA in the frame will be all zeroes for frames originating from the
device. For forwarded frames, RA will contain the TA of the received frame,
which will be necessary to send a path error if a next hop is not found.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 5 Aug 2008 16:23:16 +0000 (11:23 -0500)]
p54: Fix for TX sequence number problem
Following "mac80211: fix TX sequence numbers", if a packet
has the IEEE80211_TX_CTL_ASSIGN_SEQ assigned, a sequence number must be
supplied, either by hardware or software. AFAIK, no such hardware exists
for the p54, thus it must be done in software. With this patch, a connection
qith p54usb is stable, whereas the interface went off-line in 2-3 hours
without this change. Note that this code will have to be reworked for proper
sequence numbers on beacons. In addition, the sequence number has been placed
in the hardware state, not the vif state.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Mon, 4 Aug 2008 08:00:44 +0000 (16:00 +0800)]
iwlwifi: cleanup iwl_tx_skb
This patch cleans up iwl_tx_skb function.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Robert Olsson [Thu, 7 Aug 2008 09:23:01 +0000 (02:23 -0700)]
pktgen: multiqueue etc.
Sofar far pktgen have had a restriction to only use one device per kernel
thread. With the new multiqueue architecture this is no longer adequate.
The patch below is an effort to remove this by in pktgen configuration
adding a tag to the device name a la eth0@0 etc. The tag is used for
usual device config just as before. Also a new flag is introduced to mirror
queue_map with sending threads smp_processor_id() QUEUE_MAP_CPU.
An example: We use 4 CPU's to send to one 10g interface (eth0)
and we use the new tagging to send a mix of packet sizes, 64, 576 and
1500 bytes. Also we use TX queues according to smp_processor_id()
Joe Eykholt [Thu, 3 Jul 2008 01:22:01 +0000 (18:22 -0700)]
net/core: Allow certain receives on inactive slave.
Allow a packet_type that specifies the exact device to receive
even on an inactive bonding slave devices. This is important for some
L2 protocols such as LLDP and FCoE. This can eventually be used
for the bonding special cases as well.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Moni Shoua [Thu, 3 Jul 2008 01:21:59 +0000 (18:21 -0700)]
bonding: Don't destroy bonding master when removing slave via sysfs
It is wrong to destroy a bonding master from a context that uses the sysfs
of that bond. When last IPoIB slave is unenslaved from by writing to a
sysfs file (for bond0 this would be /sys/class/net/bond0/bonding/slaves)
the driver tries to destroy the bond. This is wrong and can lead to a
lockup or a crash. This fix lets the bonding master stay and relies on
the user to destroy the bonding master if necessary (i.e. before module
ib_ipoib is unloaded)
This patch affects only bonds of IPoIB slaves. Ethernet slaves stay
unaffected.
Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Thu, 3 Jul 2008 01:21:58 +0000 (18:21 -0700)]
bonding: refactor mii monitor
Refactor mii monitor. As with the previous ARP monitor refactor,
the motivation for this is to handle locking rationally (in this case,
removing conditional locking) and generally clean up the code.
This patch breaks up the monolithic mii monitor into two phases:
an inspection phase, followed by an optional commit phase. The commit phase
is the only portion that requires RTNL or makes changes to state, and is
only called when inspection finds something to change.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Gui Jianfeng [Thu, 7 Aug 2008 06:50:04 +0000 (23:50 -0700)]
tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup
If the following packet flow happen, kernel will panic.
MathineA MathineB
SYN
---------------------->
SYN+ACK
<----------------------
ACK(bad seq)
---------------------->
When a bad seq ACK is received, tcp_v4_md5_do_lookup(skb->sk, ip_hdr(skb)->daddr))
is finally called by tcp_v4_reqsk_send_ack(), but the first parameter(skb->sk) is
NULL at that moment, so kernel panic happens.
This patch fixes this bug.
Wang Chen [Tue, 22 Jul 2008 05:13:12 +0000 (13:13 +0800)]
[netdrvr] Drivers should not set IFF_* flag themselves
Some hardware set promisc when they are requested to set IFF_ALLMULTI flag.
It's ok, but if drivers set IFF_PROMISC flag when they set promisc,
it will broken upper layer handle for promisc and allmulti.
In addition, drivers can use their own hardware programming to make it.
So do not allow drivers to set IFF_* flags.
This is a general driver fix, so I didn't split it to pieces and send
to specific driver maintainers.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
dm9000: Support MAC address setting through platform data.
The dm9000 driver reads the chip's MAC address from the attached EEPROM. When
no EEPROM is present, or when the MAC address is invalid, it falls back to
reading the address from the chip.
This patch lets platform code set the desired MAC address through platform
data.
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Fix possible bug where end of receive buffer could be overwritten.
The allocation needs to allow for the reserved space. This would only happen
if device received packet greater than Ethernet standard MTU.
Change this driver to use netdev_alloc_skb rather than setting skb->dev
directly. For the initial allocation it doesn't need to be GFP_ATOMIC.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Introduce the speed_hi field to ethtool_cmd, using the reserved space,
to expand the speed field to 2^32 Megabits/second.
Making this field expansion now gives us plenty of time to fix up the
user-space pieces that use SIOCETHTOOL before hardware faster than 64
Gb/s is available.
Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Ben Collins [Wed, 30 Jul 2008 19:39:02 +0000 (12:39 -0700)]
pegasus: add blacklist support to fix Belkin bluetooth dongle.
Reference: https://launchpad.net/bugs/140511
The Belkin bluetooth dongle unfortunately shares the vendor and device id
with the network adapter which causes lockups whenever the bluetooth
dongle is inserted.
Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Ben Collins <ben.collins@canonical.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_read_direct':
drivers/net/netxen/netxen_nic_hw.c:1414: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_write_direct':
drivers/net/netxen/netxen_nic_hw.c:1487: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
You don't know what type was used for u64 hence they cannot be printed without
casting.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
hamradio: add missing sanity check to tty operation
Add missing sanity check to tty operation.
Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Eugene Teo <eteo@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Adrian Bunk [Mon, 4 Aug 2008 08:59:36 +0000 (11:59 +0300)]
remove bogus CONFIG_GFAR_NAPI's
The commit that made the CONFIG_GFAR_NAPI code unconditional was
included at the same time as a new CONFIG_GFAR_NAPI user, resulting
in these bugus #ifdef's.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Li Yang [Wed, 6 Aug 2008 07:08:50 +0000 (15:08 +0800)]
net/fs_enet: remove redundant messages for performance
Currently when we do a packet flood to the Ethernet port, the console
reports error every time when a packet is dropped. This is too
redundant and cost performance. Remove message for this type of event.
Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Ayaz Abdulla [Wed, 6 Aug 2008 16:12:34 +0000 (12:12 -0400)]
forcedeth: add tx pause limit
This patch adds support for limiting the number of tx pause frames to a
default of 8. Previously, hardware would send out continuous stream of
pause frames.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Fix the problems reported for 2.6.27-rc1 caused by over aggressive
power management. Turning clock off on PCI Express is problematic for WOL,
and when doing multi-booting.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 22:00:27 +0000 (15:00 -0700)]
igb: remove igb_init_managability as it is deprecated
igb_init_managability does not actually perform any function as the two
registers it attempts to write are both read only on the host. This patch
removes the function and all references to it from the driver.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 22:00:18 +0000 (15:00 -0700)]
igb: remove three redundant functions left in the code
Three functions were left in the code that are no longer used. I am removing
these functions just to keep the code clean.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 22:00:06 +0000 (15:00 -0700)]
igb: correct issue of set_mta member of mac.ops not being populated
The igb_mta_set function was not being correctly used
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 21:59:56 +0000 (14:59 -0700)]
igb: fixes 82576 serdes init to correctly support manual flow control changes
This patch changes the PCS configuration for serdes so that the flow
control options change be set via the ethtool -A option.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 21:59:46 +0000 (14:59 -0700)]
igb: fix null pointer dereference seen with fiber NICs
With a fiber or serdes NIC installed the driver was causing a null pointer
dereference on driver unload.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alexander Duyck [Mon, 4 Aug 2008 21:59:37 +0000 (14:59 -0700)]
igb: fix comments
The internal name was used in comments, replaced with silicon part number.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Cliburn [Tue, 5 Aug 2008 00:05:10 +0000 (19:05 -0500)]
atl1: deal with hardware rx checksum bug
The L1 hardware contains a bug that flags a fragmented IP packet
as having an incorrect TCP/UDP checksum, even though the packet
is perfectly valid and its checksum is correct. There's no way to
distinguish between one of these good packets and a packet that
actually contains a TCP/UDP checksum error, so all we can do is
allow the packet to be handed up to the higher layers and let it
be sorted out there.
Add a comment describing this condition and remove the code that
currently fails to handle what may or may not be a checksum error.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Bruce Allan [Tue, 5 Aug 2008 00:21:53 +0000 (17:21 -0700)]
e1000e: remove inapplicable test for ioport
There are currently no devices supported by the e1000e driver which need
ioport resources, remove the test for it and all unnecessary code
associated with it (struct e1000_adapter elements, local variables, etc.)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
a few people seem to have problems maintaining gigabit link
and it was root caused to an interaction between the managability
firmware on the host and the driver, not communicating.
The form of communication they use is the drv_load bit.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Auke Kok [Tue, 5 Aug 2008 00:21:20 +0000 (17:21 -0700)]
e1000e: perform basic 82573 EEPROM checks for known issues
82573 EEPROMs have been shipped out with known issues. While most
people will never see the issues some people do and we know
how to address them. Warn the user if we find one of these
EEPROM issues.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>