Messages in this thread | | | Date | Mon, 3 Nov 2003 12:06:47 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] Add PM support to sis900 network driver |
| |
Daniele Venzano <webvenza@libero.it> wrote: > > On Sun, Nov 02, 2003 at 11:12:54AM -0800, Andrew Morton wrote: > > pci_set_power_state() can sleep, so we shouldn't be calling it > > under spin_lock_irqsave(). Is it necessary to hold the lock > > here? > > New patch with locking completely removed, since in a similar > function none was used.
OK. I think. Net driver suspend handlers in general seem a bit racy wrt interrupt activity as well as SMP. Maybe I'm missing something.
> I think also the 8139too driver has the same locking problem in > rtl8139_suspend, do you want a patch ?
Wouldn't hurt, thanks. It's one way to wake Jeff up ;)
8139too just does netif_device_detach(), whereas your sis900 patch does netif_stop_queue() and then netif_device_detach().
I don't know which is right, really. 8139too will end up with a non-stopped queue if __LINK_STATE_PRESENT is clear. The sis900 approach is certainly safe enough, but it'd be nice to know what netif_device_detach() is trying to do there. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |