summaryrefslogtreecommitdiffstats
path: root/drivers/net/8139too.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] 8139too deadlock fixArjan van de Ven2006-07-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > stack backtrace: > [<f9099d31>] rtl8139_start_xmit+0xd9/0xff [8139too] > [<c11ad5ea>] netpoll_send_skb+0x98/0xea This seems to be a real deadlock... So netpoll_send_skb takes the _xmit_lock, which is all nitty gritty but then rtl8139_start_xmit comes around while that lock is taken, and does spin_unlock_irq(&tp->lock); which.. enables interrupts and softirqs; this is quite bad because the xmit lock is taken in softirq context for the watchdog like this: [<c1200376>] _spin_lock+0x23/0x32 [<c11af282>] dev_watchdog+0x14/0xb1 [<c101dab2>] run_timer_softirq+0xf2/0x14a [<c101a691>] __do_softirq+0x55/0xb0 [<c1004a8d>] do_softirq+0x58/0xbd Which would deadlock now that the spin_unlock_irq() has enabled irqs/softirqs while the _xmit_lock is still held. The patch below turns this into a irqsave/irqrestore pair so that interrupts don't get enabled unconditionally. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] use dev_xxx() printk helpers, rather than dev_printk(KERN_xxx, ...Jeff Garzik2006-07-051-17/+10
| | | | | | Suggested by Jiri Slaby. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] Use dev_printk() when ethernet interface isn't availableJeff Garzik2006-07-051-16/+25
| | | | | | | | | | For messages prior to register_netdev(), prefer dev_printk() because that prints out both our driver name and our [PCI | whatever] bus id. Updates: 8139{cp,too}, b44, bnx2, cassini, {eepro,epic}100, fealnx, hamachi, ne2k-pci, ns83820, pci-skeleton, r8169. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] irq-flags: drivers/net: Use the new IRQF_ constantsThomas Gleixner2006-07-021-1/+1
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] 64bit resource: fix up printks for resources in networks driversGreg Kroah-Hartman2006-06-271-3/+3
| | | | | | | | | | This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [netdrvr] trim trailing whitespace: 8139*.c, epic100, forcedeth, tulip/*Jeff Garzik2006-05-261-7/+7
|
* [PATCH] Fix "value computed not used" warningsTakashi Iwai2006-03-241-1/+1
| | | | | | | | | | | Fixes for annoying gcc-4.1 compile warnings "value computed not used". Simply cast to void. (akpm: Linus will go ballistic...) Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [NET]: Convert RTNL to mutex.Stephen Hemminger2006-03-201-1/+1
| | | | | | | | This patch turns the RTNL from a semaphore to a new 2.6.16 mutex and gets rid of some of the leftover legacy. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Massive net driver const-ification.Arjan van de Ven2006-03-031-2/+2
|
* 8139too: fix a TX timeout watchdog thread against NAPI softirq raceFrancois Romieu2006-02-011-12/+26
| | | | | | | Ingo's stealth lock validator detected that both thread acquire dev->xmit_lock and tp->rx_lock in reverse order. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
* [PATCH] turn "const static" into "static const"Jesper Juhl2006-01-101-1/+1
| | | | | | | | | | | | | ICC likes to complain about storage class not being first, GCC doesn't care much (except for cases like "inline static"). have a hard time seeing how it could break anything. Thanks to Gabriel A. Devenyi for pointing out http://linuxicc.sourceforge.net/ which is what made me create this patch. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [netdrvr 8139too] fast poll for thread, if an unlikely race occursJeff Garzik2005-11-101-1/+7
| | | | | | | | | The rtl8139 thread is triggered only on rare 8139 hardware, the race itself is unlikely, and the impact of racing is low. We don't care enough to create a more-complex race-free solution. Rather, if the trylock fails, we now simply poll twice a second until we do get the lock.
* [netdrvr 8139too] use rtnl_shlock_nowait() rather than rtnl_lock_interruptible()Jeff Garzik2005-11-041-1/+1
|
* [netdrvr 8139too] use cancel_rearming_delayed_work() to cancel threadJeff Garzik2005-11-041-16/+9
| | | | Noted by Herbert Xu.
* [netdrvr 8139too] replace hand-crafted kernel thread with workqueueJeff Garzik2005-10-311-54/+33
| | | | | | Gone are the days when 8139too was a shining example of how to use kernel threads. Delayed workqueues are easier, and map precisely to our task: running code from a kernel thread, after a periodic sleep.
* [PATCH] 8139too: fix resume for Realtek 8100B/8139DJohn W. Linville2005-10-181-1/+2
| | | | | | | | Add "HasHltClk" flag for RTL-8100B/8139D hardware in order to fix problems resuming from suspend-to-RAM. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] 8139too: support ETHTOOL_GPERMADDRJohn W. Linville2005-09-141-0/+2
| | | | | | | Add support for ETHTOOL_GPERMADDR to 8139too. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] turn many #if $undefined_string into #ifdef $undefined_stringOlaf Hering2005-07-271-3/+3
| | | | | | | | | turn many #if $undefined_string into #ifdef $undefined_string to fix some warnings after -Wno-def was added to global CFLAGS Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Cleanup patch for process freezingChristoph Lameter2005-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Establish a simple API for process freezing defined in linux/include/sched.h: frozen(process) Check for frozen process freezing(process) Check if a process is being frozen freeze(process) Tell a process to freeze (go to refrigerator) thaw_process(process) Restart process frozen_process(process) Process is frozen now 2. Remove all references to PF_FREEZE and PF_FROZEN from all kernel sources except sched.h 3. Fix numerous locations where try_to_freeze is manually done by a driver 4. Remove the argument that is no longer necessary from two function calls. 5. Some whitespace cleanup 6. Clear potential race in refrigerator (provides an open window of PF_FREEZE cleared before setting PF_FROZEN, recalc_sigpending does not check PF_FROZEN). This patch does not address the problem of freeze_processes() violating the rule that a task may only modify its own flags by setting PF_FREEZE. This is not clean in an SMP environment. freeze(process) is therefore not SMP safe! Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] 8139too: use iomap for pio/mmioPekka Enberg2005-05-121-107/+87
| | | | | | | | | | | | | | | This patch converts the 8139too driver to use the iomap infrastructure for PIO and MMIO instead of playing macro tricks. I also had to fix read_eeprom(), mdio_sync(), mdio_read(), and mdio_write() to not pass PIO base address to MMIO read() and write() functions. In addition, the patch adds proper __iomem annotations for the driver. Both modes, PIO and MMIO, were tested with a RealTel RTL8139 card on an x86 box. The 8129 support remains untested due to lack of hardware. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+2666
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud