Anton Vorontsov 704cc92e9f 3c59x: Get rid of "Trying to free already-free IRQ"
Following trace pops up if we try to suspend with 3c59x ethernet NIC
brought down:

  root@b1:~# ifconfig eth16 down
  root@b1:~# echo mem > /sys/power/state
  ...
  3c59x 0000:00:10.0: suspend
  3c59x 0000:00:10.0: PME# disabled
  Trying to free already-free IRQ 48
  ------------[ cut here ]------------
  Badness at c00554e4 [verbose debug info unavailable]
  NIP: c00554e4 LR: c00554e4 CTR: c019a098
  REGS: c7975c60 TRAP: 0700   Not tainted  (2.6.31-rc4)
  MSR: 00021032 <ME,CE,IR,DR>  CR: 28242422  XER: 20000000
  TASK = c79cb0c0[1746] 'bash' THREAD: c7974000
  ...
  NIP [c00554e4] __free_irq+0x108/0x1b0
  LR [c00554e4] __free_irq+0x108/0x1b0
  Call Trace:
  [c7975d10] [c00554e4] __free_irq+0x108/0x1b0 (unreliable)
  [c7975d30] [c005559c] free_irq+0x10/0x24
  [c7975d40] [c01e21ec] vortex_suspend+0x70/0xc4
  [c7975d60] [c017e584] pci_legacy_suspend+0x58/0x100

This is because the driver manages interrupts without checking for
netif_running().

Though, there are few other issues with suspend/resume in this driver.
The intention of calling free_irq() in suspend() was to avoid any
possible spurious interrupts (see commit 5b039e681b8c5f30aac9cc04385
"3c59x PM fixes"). But,

- On resume, the driver was requesting IRQ just after pci_set_master(),
  but before vortex_up() (which actually resets 3c59x chips).

- Issuing free_irq() on a shared IRQ doesn't guarantee that a buggy
  HW won't trigger spurious interrupts in another driver that
  requested the same interrupt. So, if we want to protect from
  unexpected interrupts, then on suspend we should issue disable_irq(),
  not free_irq().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-24 15:39:26 -07:00
..
2009-09-22 14:00:10 -07:00
2009-09-16 00:00:21 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2009-09-01 01:13:50 -07:00
2008-11-25 18:25:32 -08:00
2009-04-04 16:51:14 -07:00
2009-08-12 23:03:00 -07:00
2009-08-12 22:53:28 -07:00
2009-08-12 23:03:01 -07:00
2009-08-12 23:03:01 -07:00
2008-09-22 19:27:10 -07:00
2009-08-15 18:50:44 -07:00
2008-02-01 20:54:03 +11:00
2009-07-06 18:54:51 -07:00
2009-09-23 07:39:43 -07:00
2008-11-25 18:23:59 -08:00
2009-02-04 16:43:44 -08:00
2009-02-26 21:02:19 -08:00
2008-11-25 18:24:57 -08:00
2009-04-16 02:20:08 -07:00
2009-09-07 01:56:52 -07:00
2009-01-06 10:47:44 -08:00
2009-07-06 13:05:13 -07:00
2009-09-23 07:39:43 -07:00
2009-07-20 08:23:26 -07:00
2008-11-25 18:24:38 -08:00
2009-04-16 02:20:16 -07:00
2009-09-03 20:02:13 -07:00
2009-04-16 02:20:21 -07:00
2009-09-21 15:14:58 +02:00
2008-03-26 00:18:00 -04:00
2009-07-16 09:14:23 -07:00
2008-01-28 15:11:27 -08:00
2009-09-14 17:03:09 -07:00
2008-11-10 15:11:56 -05:00
2009-04-29 17:32:34 -07:00
2009-08-02 12:20:40 -07:00
2009-09-21 15:14:58 +02:00
2008-01-28 15:11:27 -08:00
2009-09-19 13:13:17 -07:00
2009-09-15 09:37:12 -07:00
2009-03-27 00:46:48 -07:00
2008-04-16 20:06:50 -04:00
2008-11-25 18:25:49 -08:00
2008-08-29 02:13:33 -07:00
2008-08-29 02:14:29 -07:00
2008-08-29 02:14:43 -07:00
2009-09-11 16:50:16 -07:00
2009-09-02 00:44:09 -07:00
2008-05-30 22:18:02 -04:00
2009-09-23 22:26:32 +09:30
2009-01-11 00:06:36 -08:00