lkml.org 
[lkml]   [2003]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add PM support to sis900 network driver

Daniele Venzano <webvenza@libero.it> wrote:
>
> The attached patch adds support for suspend/resume to the sis900 driver.

...

> +static int sis900_suspend(struct pci_dev *pci_dev, u32 state)
> +{
> + struct net_device *net_dev = pci_get_drvdata(pci_dev);
> + struct sis900_private *sis_priv = net_dev->priv;
> + long ioaddr = net_dev->base_addr;
> + unsigned long flags;
> +
> + if(!netif_running(net_dev))
> + return 0;
> + netif_stop_queue(net_dev);
> +
> + netif_device_detach(net_dev);
> + 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?
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.050 / U:1.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site