summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] zd1211rw: Convert installer CDROM device into WLAN deviceDaniel Drake2006-08-142-0/+60
| | | | | | | | | | | | Some devices identify themselves as a virtual USB CDROM drive. The virtual CD includes the windows driver. We aren't interested in this, so we eject the virtual CDROM and then the real wireless device appears. Patch fixed over the earlier version to not leak cmd, thanks to Michael Buesch for spotting that. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Add ID for ZyXEL G220FDaniel Drake2006-08-141-0/+1
| | | | | | | | | zd1211 chip 0586:3402 v4916 high 00-13-49 AL2230_RF pa0 ---- This device pops up after the virtual driver CD has been ejected. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Firmware version vs bootcode version mismatch handlingDaniel Drake2006-08-142-7/+44
| | | | | | | | | | | | | This is needed for my G220F, otherwise it fails to initialize after the existing firmware upload routine. The vendor driver actually does more than what I have done here: it downloads the firmware + boot code, modifies it, and uploads it again (really messy). I have not copied that part over, as my device can get on its feet without it. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Add ID for Allnet ALLSPOT Hotspot finderDaniel Drake2006-08-141-0/+1
| | | | | | | | | Tested by Wonka on IRC. zd1211 chip 157e:3204 v4810 high 00-11-e0 AL7230B_RF pa0 g--- Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Add ID for Senao NUB-8301Daniel Drake2006-08-141-0/+1
| | | | | | | | | Tested by lyakh on IRC zd1211 chip 1740:2000 v4721 high 00-02-6f AL7230B_RF pa0 g--- Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Support AL7230B RFDaniel Drake2006-08-146-1/+284
| | | | | | | | | This patch adds support for another Airoha RF which is present in some ZD1211 adapters. This RF supports 802.11a as well as 802.11b/g, but 802.11a connectivity is not yet supported by this driver. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: AL2230 ZD1211B vendor syncDaniel Drake2006-08-143-51/+152
| | | | | | | | | This patch synchronizes our code to some recent vendor driver modifications. A new PHY layout is supported, some values are tweaked, and the AL2230 is now programmed over a new interface which is many times faster. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: Match vendor driver IFS valuesDaniel Drake2006-08-142-4/+15
| | | | | | | | The vendor driver resets the IFS value every time the channel changes, to this one. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] zd1211rw: ZD1211B ASIC/FWT, not jointly decoderDaniel Drake2006-08-141-1/+1
| | | | | | | | The vendor driver chooses this value based on an ifndef ASIC, and ASIC is never defined. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'from-linus' into upstreamJohn W. Linville2006-08-14172-1045/+1786
|\
| * [INET]: Use pskb_trim_unique when trimming paged unique skbsHerbert Xu2006-08-133-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPv4/IPv6 datagram output path was using skb_trim to trim paged packets because they know that the packet has not been cloned yet (since the packet hasn't been given to anything else in the system). This broke because skb_trim no longer allows paged packets to be trimmed. Paged packets must be given to one of the pskb_trim functions instead. This patch adds a new pskb_trim_unique function to cover the IPv4/IPv6 datagram output path scenario and replaces the corresponding skb_trim calls with it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: ulog: fix panic on SMP kernelsMark Huang2006-08-133-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix kernel panic on various SMP machines. The culprit is a null ub->skb in ulog_send(). If ulog_timer() has already been scheduled on one CPU and is spinning on the lock, and ipt_ulog_packet() flushes the queue on another CPU by calling ulog_send() right before it exits, there will be no skbuff when ulog_timer() acquires the lock and calls ulog_send(). Cancelling the timer in ulog_send() doesn't help because it has already been scheduled and is running on the first CPU. Similar problem exists in ebt_ulog.c and nfnetlink_log.c. Signed-off-by: Mark Huang <mlhuang@cs.princeton.edu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: {arp,ip,ip6}_tables: proper error recovery in init pathPatrick McHardy2006-08-133-24/+70
| | | | | | | | | | | | | | | | | | | | Neither of {arp,ip,ip6}_tables cleans up behind itself when something goes wrong during initialization. Noticed by Rennie deGraaf <degraaf@cpsc.ucalgary.ca> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [LLC]: multicast receive device matchStephen Hemminger2006-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix from Aji_Srinivas@emc.com, STP packets are incorrectly received on all LLC datagram sockets, whichever interface they are bound to. The llc_sap datagram receive logic sends packets with a unicast destination MAC to one socket bound to that SAP and MAC, and multicast packets to all sockets bound to that SAP. STP packets are multicast, and we do need to know on which interface they were received. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPSEC]: Validate properly in xfrm_dst_check()David S. Miller2006-08-131-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If dst->obsolete is -1, this is a signal from the bundle creator that we want the XFRM dst and the dsts that it references to be validated on every use. I misunderstood this intention when I changed xfrm_dst_check() to always return NULL. Now, when we purge a dst entry, by running dst_free() on it. This will set the dst->obsolete to a positive integer, and we want to return NULL in that case so that the socket does a relookup for the route. Thus, if dst->obsolete<0, let stale_bundle() validate the state, else always return NULL. In general, we need to do things more intelligently here because we flush too much state during rule changes. Herbert Xu has some ideas wherein the key manager gives us some help in this area. We can also use smarter state management algorithms inside of the kernel as well. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: xt_hashlimit: fix limit off-by-onePatrick McHardy2006-08-131-7/+4
| | | | | | | | | | | | | | | | | | | | Hashlimit doesn't account for the first packet, which is inconsistent with the limit match. Reported by ryan.castellucci@gmail.com, netfilter bugzilla #500. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: xt_string: fix negationPhil Oester2006-08-131-1/+1
| | | | | | | | | | | | | | | | | | The xt_string match is broken with ! negation. This resolves a portion of netfilter bugzilla #497. Signed-off-by: Phil Oester <kernel@linuxace.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [TCP]: Fix botched memory leak fix to tcpprobe_read().David S. Miller2006-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Somehow I clobbered James's original fix and only my subsequent compiler warning change went in for that changeset. Get the real fix in there. Noticed by Jesper Juhl. Signed-off-by: David S. Miller <davem@davemloft.net>
| * USB: usbtest.c: unsigned retval makes ctrl_out return 0 in case of errorOrjan Friberg2006-08-111-2/+3
| | | | | | | | | | | | | | | | | | | | In my quest to try and figure out why test 14 (control write) doesn't work with my EZ-USB board, I noticed that sometimes testusb reported no error even though the kernel log complained "byte 0 is 0 not 2" etc. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: ftdi_sio driver - new PIDsJonathan Davies2006-08-112-0/+8
| | | | | | | | | | | | Signed-off-by: Jonathan Davies <jjd27@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: Additional PID for SHARP W-ZERO3Norihiko Tomiyama2006-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | I write a patch for ipaq.c. Would you like to add upstream tree ? This patch enables a support of "SHARP W-ZERO3(WS004SH)" and "SHARP W-ZERO3[es](WS007SH)". From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: appletouch: fix atp_disconnectJohannes Berg2006-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | appletouch uses urb->transfer_dma after having freed the urb, this shows up only if the system is compiled with slab debugging. This patch fixes it by reordering the free calls. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: removed a unbalanced #endif from ohci-au1xxx.cYoichi Yuasa2006-08-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch has removed a unbalanced #endif from ohci-au1xxx.c . Please apply before 2.6.18 release. Error message was: In file included from drivers/usb/host/ohci-hcd.c:909: drivers/usb/host/ohci-au1xxx.c:113:2: #endif without #if Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: unusual_devs entry for A-VOX WSX-300ER MP3 playerDavid Kuehling2006-08-111-0/+10
| | | | | | | | | | | | | | | | | | | | This patch (as763) adds an unusual_devs entry for the A-VOX WSX-300ER MP3 player. From: David Kuehling <dvdkhlng@gmx.de> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: remove dead HOTPLUG_PCI_SHPC_PHPRM_LEGACY option.Dave Jones2006-08-111-7/+0
| | | | | | | | | | | | | | | | Nothing in the tree references this config option. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * pciehp: make pciehp build for powerpcKristen Carlson Accardi2006-08-112-4/+5
| | | | | | | | | | | | | | | | | | | | Make pciehp build on powerpc Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * pr_debug() should not be used in driversPavel Machek2006-08-111-0/+1
| | | | | | | | | | | | | | | | pr_debug() should not be used from drivers, add comment saying that. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * genhd.c reference in Documentation/kobjects.txtBrandon Philips2006-08-111-1/+1
| | | | | | | | | | | | | | | | block/genhd.c no longer in drivers/. Update Documentation/kobjects.txt Signed-off-by: Brandon Philips <brandon@ifup.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Add stable branch to maintainers fileSteven Rostedt2006-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While helping someone to submit a patch to the stable branch, I noticed that the stable branch is not listed in the MAINTAINERS file. This was after I went there to look for the email addresses for the stable branch list (stable@kernel.org). This patch adds the stable branch to the maintainers file so that people can find where to send patches when they have a fix for the stable team. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Merge gregkh@master.kernel.org:/home/rmk/linux-2.6-mmcGreg Kroah-Hartman2006-08-102-5/+7
| |\
| | * [MMC] Another stray 'io' referencePierre Ossman2006-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | | Another misuse of the global 'io' variable instead of the local 'base'. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * [MMC] Fix base address configuration in wbsdPierre Ossman2006-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some confusion about base I/O variables in the wbsd driver. Seems like things have been working on shear luck so far. The global 'io' variable (used when manually configuring the resources) was used instead of the local 'base' variable. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * [ARM] 3744/1: MMC: mmcqd gets stuck when block queue is pluggedJuha [êölä2006-08-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Juha [êölä When the block queue is plugged, mq->req must be set to NULL. Otherwise mq->req might be left non-NULL, even though mmcqd is not processing a request, thus preventing the MMC queue thread from being woken up when new requests do arrive. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | Merge gregkh@master.kernel.org:/home/rmk/linux-2.6-armGreg Kroah-Hartman2006-08-105-8/+7
| |\ \
| | * | [ARM] Fix Acorn platform SCSI driver build failuresRussell King2006-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SCSI folk forgot to fix up all the uses of 'buffer' before deleting this struct member. Do it for them to rescue the resulting build failures. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] Fix NCR5380-based SCSI card buildRussell King2006-08-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The NCR5380-based SCSI cards need the SCSI SPI transport selected to build correctly. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] Fix pci export warningsRussell King2006-08-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove duplicate PCI exports from ixp4xx machine class. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] 3747/1: Fix compilation error in mach-ixp4xx/gtwx5715-setup.cMartin Michlmayr2006-08-061-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Martin Michlmayr Fix the following compilation error in arm/mach-ixp4xx/gtwx5715-setup: CC arch/arm/mach-ixp4xx/gtwx5715-setup.o arch/arm/mach-ixp4xx/gtwx5715-setup.c:110: error: expected identifier or '(' before ‘=’ token arch/arm/mach-ixp4xx/gtwx5715-setup.c:121: error: 'gtwx5715_flash_resource' undeclared here (not in a function) arch/arm/mach-ixp4xx/gtwx5715-setup.c: In function 'gtwx5715_init': arch/arm/mach-ixp4xx/gtwx5715-setup.c:133: error: 'flash_resource' undeclared (first use in this function) arch/arm/mach-ixp4xx/gtwx5715-setup.c:133: error: (Each undeclared identifier is reported only once arch/arm/mach-ixp4xx/gtwx5715-setup.c:133: error: for each function it appears in.) make[1]: *** [arch/arm/mach-ixp4xx/gtwx5715-setup.o] Error 1 Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] 3745/1: Add EXPORT_SYMBOL(rtc_next_alarm_time) to ARM rtctime.cGeorge G. Davis2006-08-061-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from George G. Davis Fix "WARNING: "rtc_next_alarm_time" [drivers/rtc/rtc-sa1100.ko] undefined!" Signed-off-by: George G. Davis <gdavis@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | Merge git://oss.sgi.com:8090/nathans/xfs-rc-2.6Greg Kroah-Hartman2006-08-091-49/+54
| |\ \
| | * | [XFS] Fix xfs_free_extent related NULL pointer dereference.Nathan Scott2006-08-101-49/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently fixed an out-of-space deadlock in XFS, and part of that fix involved the addition of the XFS_ALLOC_FLAG_FREEING flag to some of the space allocator calls to indicate they're freeing space, not allocating it. There was a missed xfs_alloc_fix_freelist condition test that did not correctly test "flags". The same test would also test an uninitialised structure field (args->userdata) and depending on its value either would or would not return early with a critical buffer pointer set to NULL. This fixes that up, adds asserts to several places to catch future botches of this nature, and skips sections of xfs_alloc_fix_freelist that are irrelevent for the space-freeing case. SGI-PV: 955303 SGI-Modid: xfs-linux-melb:xfs-kern:26743a Signed-off-by: Nathan Scott <nathans@sgi.com>
| * | | [IPX]: Fix typo, ipxhdr() --> ipx_hdr()David S. Miller2006-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Noticed by Dave Jones. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [IPV6]: The ifa lock is a BH lockHerbert Xu2006-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ifa lock is expected to be taken in BH context (by addrconf timers) so we must disable BH when accessing it from user context. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [PATCH] PATCH: 2.6.18 oops on boot fix for IDEAlan Cox2006-08-091-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the IDE fix for Jmicron went in one piece went walking somewhere (send log shows my end somehow). Without this sometimes you get an oops on boot. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Greg Kroah-Hartman2006-08-0910-41/+72
| |\ \ \
| | * | | [NET]: add_timer -> mod_timer() in dst_run_gc()Dmitry Mishin2006-08-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Dmitry Mishin <dim@openvz.org>: Replace add_timer() by mod_timer() in dst_run_gc in order to avoid BUG message. CPU1 CPU2 dst_run_gc() entered dst_run_gc() entered spin_lock(&dst_lock) ..... del_timer(&dst_gc_timer) fail to get lock .... mod_timer() <--- puts timer back to the list add_timer(&dst_gc_timer) <--- BUG because timer is in list already. Found during OpenVZ internal testing. At first we thought that it is OpenVZ specific as we added dst_run_gc(0) call in dst_dev_event(), but as Alexey pointed to me it is possible to trigger this condition in mainstream kernel. F.e. timer has fired on CPU2, but the handler was preeempted by an irq before dst_lock is tried. Meanwhile, someone on CPU1 adds an entry to gc list and starts the timer. If CPU2 was preempted long enough, this timer can expire simultaneously with resuming timer handler on CPU1, arriving exactly to the situation described. Signed-off-by: Dmitry Mishin <dim@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * | | [IPX]: Another nonlinear receive fixStephen Hemminger2006-08-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to check some more cases in IPX receive. If the skb is purely fragments, the IPX header needs to be extracted. The function pskb_may_pull() may in theory invalidate all the pointers in the skb, so references to ipx header must be refreshed. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * | | [RTNETLINK]: Fix IFLA_ADDRESS handling.David S. Miller2006-08-081-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ->set_mac_address handlers expect a pointer to a sockaddr which contains the MAC address, whereas IFLA_ADDRESS provides just the MAC address itself. So whip up a sockaddr to wrap around the netlink attribute for the ->set_mac_address call. Signed-off-by: David S. Miller <davem@davemloft.net>
| | * | | [TG3]: Fix tx race conditionMichael Chan2006-08-072-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a subtle race condition between tg3_start_xmit() and tg3_tx() discovered by Herbert Xu <herbert@gondor.apana.org.au>: CPU0 CPU1 tg3_start_xmit() if (tx_ring_full) { tx_lock tg3_tx() if (!netif_queue_stopped) netif_stop_queue() if (!tx_ring_full) update_tx_ring netif_wake_queue() tx_unlock } Even though tx_ring is updated before the if statement in tg3_tx() in program order, it can be re-ordered by the CPU as shown above. This scenario can cause the tx queue to be stopped forever if tg3_tx() has just freed up the entire tx_ring. The possibility of this happening should be very rare though. The following changes are made: 1. Add memory barrier to fix the above race condition. 2. Eliminate the private tx_lock altogether and rely solely on netif_tx_lock. This eliminates one spinlock in tg3_start_xmit() when the ring is full. 3. Because of 2, use netif_tx_lock in tg3_tx() before calling netif_wake_queue(). 4. Change TX_BUFFS_AVAIL to an inline function with a memory barrier. Herbert and David suggested using the memory barrier instead of volatile. 5. Check for the full wake queue condition before getting netif_tx_lock in tg3_tx(). This reduces the number of unnecessary spinlocks when the tx ring is full in a steady-state condition. 6. Update version to 3.65. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * | | [TCP]: SNMPv2 tcpOutSegs counter errorWei Yongjun2006-08-071-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not count retransmitted segments. Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud