From: Andrew Morton <akpm@osdl.org>
To: Daniele Venzano <webvenza@libero.it>
Cc: mochel@osdl.org, linux-kernel@vger.kernel.org,
acpi-devel@lists.sorceforge.net
Subject: Re: [PATCH] Add PM support to sis900 network driver
Date: Sun, 2 Nov 2003 11:12:54 -0800 [thread overview]
Message-ID: <20031102111254.481bcbfd.akpm@osdl.org> (raw)
In-Reply-To: <20031102182852.GC18017@picchio.gall.it>
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?
next prev parent reply other threads:[~2003-11-02 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-02 18:28 Daniele Venzano
2003-11-02 19:12 ` Andrew Morton [this message]
2003-11-02 19:16 ` Daniele Venzano
2003-11-03 18:17 ` Daniele Venzano
2003-11-03 20:06 ` Andrew Morton
2003-11-03 22:46 ` Daniele Venzano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031102111254.481bcbfd.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=acpi-devel@lists.sorceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=webvenza@libero.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®