From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Hendrik Hoeth <hendrik.hoeth@cern.ch>
Cc: linux-kernel@vger.kernel.org, linux@brodo.de
Subject: Re: serial CardBus card does not wake up after sleep
Date: Sun, 6 Mar 2005 22:41:13 +0000 [thread overview]
Message-ID: <20050306224112.C3834@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050306200946.GD3101@mail.physik.uni-wuppertal.de>; from hendrik.hoeth@cern.ch on Sun, Mar 06, 2005 at 02:09:46PM -0600
On Sun, Mar 06, 2005 at 02:09:46PM -0600, Hendrik Hoeth wrote:
> I'm using a serial CardBus card (Sony Ericsson GC79 -- combined GPRS and
> WiFi, I'm talking about the GPRS modem part of it) in a Samsung P35
> laptop, kernel version 2.6.11. If I put the laptop in S3 leaving the
> card in the laptop, the card does not wake up on resume. I need to
> remove and reinsert the card.
Looks like the card wasn't resumed properly. Please try this patch:
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/drivers/serial/8250_pci.c linux/drivers/serial/8250_pci.c
--- orig/drivers/serial/8250_pci.c Wed Mar 2 14:40:16 2005
+++ linux/drivers/serial/8250_pci.c Sun Mar 6 22:38:46 2005
@@ -1759,7 +1759,7 @@ static void __devexit pciserial_remove_o
}
}
-static int pciserial_suspend_one(struct pci_dev *dev, u32 state)
+static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
{
struct serial_private *priv = pci_get_drvdata(dev);
@@ -1769,6 +1769,8 @@ static int pciserial_suspend_one(struct
for (i = 0; i < priv->nr; i++)
serial8250_suspend_port(priv->line[i]);
}
+ pci_save_state(dev);
+ pci_set_power_state(dev, pci_choose_state(dev, state));
return 0;
}
@@ -1776,10 +1778,18 @@ static int pciserial_resume_one(struct p
{
struct serial_private *priv = pci_get_drvdata(dev);
+ pci_set_power_state(dev, PCI_D0);
+ pci_restore_state(dev);
+
if (priv) {
int i;
/*
+ * The device may have been disabled. Re-enable it.
+ */
+ pci_enable_device(dev);
+
+ /*
* Ensure that the board is correctly configured.
*/
if (priv->quirk->init)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2005-03-06 23:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 20:09 serial CardBus card does not wake up after sleep Hendrik Hoeth
2005-03-06 22:41 ` Russell King [this message]
2005-03-07 11:19 ` Hendrik Hoeth
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=20050306224112.C3834@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=hendrik.hoeth@cern.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
/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