Archived
14
0
Fork 0
Commit graph

22 commits

Author SHA1 Message Date
Arjan van de Ven
bce305f4fe [PATCH] 8139too deadlock fix
> 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>
2006-07-05 14:29:26 -04:00
Jeff Garzik
9b91cf9daa [netdrvr] use dev_xxx() printk helpers, rather than dev_printk(KERN_xxx, ...
Suggested by Jiri Slaby.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 13:42:57 -04:00
Jeff Garzik
2e8a538d86 [netdrvr] Use dev_printk() when ethernet interface isn't available
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>
2006-07-05 13:42:07 -04:00
Thomas Gleixner
1fb9df5d30 [PATCH] irq-flags: drivers/net: Use the new IRQF_ constants
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>
2006-07-02 13:58:51 -07:00
Jörn Engel
6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Greg Kroah-Hartman
7c7459d1f9 [PATCH] 64bit resource: fix up printks for resources in networks drivers
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>
2006-06-27 09:23:58 -07:00
Jeff Garzik
f3b197ac26 [netdrvr] trim trailing whitespace: 8139*.c, epic100, forcedeth, tulip/* 2006-05-26 21:39:03 -04:00
Takashi Iwai
10e705f83c [PATCH] Fix "value computed not used" warnings
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>
2006-03-24 07:33:28 -08:00
Stephen Hemminger
6756ae4b4e [NET]: Convert RTNL to mutex.
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>
2006-03-20 22:23:58 -08:00
Arjan van de Ven
f71e130966 Massive net driver const-ification. 2006-03-03 21:33:57 -05:00
Francois Romieu
371e8bc2af 8139too: fix a TX timeout watchdog thread against NAPI softirq race
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>
2006-02-01 22:04:37 +01:00
Jesper Juhl
3c6bee1d40 [PATCH] turn "const static" into "static const"
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>
2006-01-10 08:01:55 -08:00
Jeff Garzik
760559e133 [netdrvr 8139too] fast poll for thread, if an unlikely race occurs
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.
2005-11-10 04:31:55 -05:00
Jeff Garzik
96a71d52bb [netdrvr 8139too] use rtnl_shlock_nowait() rather than rtnl_lock_interruptible() 2005-11-04 22:46:35 -05:00
Jeff Garzik
38b492a21a [netdrvr 8139too] use cancel_rearming_delayed_work() to cancel thread
Noted by Herbert Xu.
2005-11-04 22:36:28 -05:00
Jeff Garzik
a15e0384dd [netdrvr 8139too] replace hand-crafted kernel thread with workqueue
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.
2005-10-31 07:59:37 -05:00
John W. Linville
7645baec58 [PATCH] 8139too: fix resume for Realtek 8100B/8139D
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>
2005-10-18 22:26:01 -04:00
John W. Linville
62a720b889 [PATCH] 8139too: support ETHTOOL_GPERMADDR
Add support for ETHTOOL_GPERMADDR to 8139too.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-14 08:29:31 -04:00
Olaf Hering
44456d37b5 [PATCH] turn many #if $undefined_string into #ifdef $undefined_string
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>
2005-07-27 16:26:08 -07:00
Christoph Lameter
3e1d1d28d9 [PATCH] Cleanup patch for process freezing
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>
2005-06-25 17:10:13 -07:00
Pekka Enberg
22f714b64b [PATCH] 8139too: use iomap for pio/mmio
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>
2005-05-12 19:38:47 -04:00
Linus Torvalds
1da177e4c3 Linux-2.6.12-rc2
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!
2005-04-16 15:20:36 -07:00