Re: [PATCH] Add PM support to sis900 network driver

From: Daniele Venzano
Date: Sun Nov 02 2003 - 14:39:05 EST


On Sun, Nov 02, 2003 at 11:12:54AM -0800, Andrew Morton wrote:
> > + spin_lock_irqsave(&sis_priv->lock, flags);
> > +
> > + /* Stop the chip's Tx and Rx Status Machine */
> > + outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr);
> > +
> > + pci_set_power_state(pci_dev, 3);
>
> 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?

I don't know enough of the driver to express an opinion, but probably
the lock is needed only for the outl call, if needed at all. If nothing
new comes out, tomorrow I'll rediff and send a new patch.

--
------------------------------
Daniele Venzano
Web: http://teg.homeunix.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/