From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: "David S. Miller" <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
Date: Tue, 11 Oct 2011 18:56:05 +0200 [thread overview]
Message-ID: <201110111856.05491.bzolnier@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1105152228530.12411@artax.karlin.mff.cuni.cz>
Mikulas Patocka wrote:
> Don't powerdown Compaq Triflex IDE device on suspend
>
> This fixes APM suspend on Compaq Armada 7400.
> APM BIOS doesn't suspend if IDE is powered down when suspending.
> The Triflex controller is found only on old Compaq boards,
> so this patch will hopefully have no side effects.
>
> This patch fixes a suspend regression introduced in
> feb22b7f8e62b1b987a3a1dbad95af767a1df832
>
> Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Reviewed-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This patch is still valid for 3.1. Dave, ping?
> ---
> drivers/ide/triflex.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> Index: linux-2.6.39-rc7-fast/drivers/ide/triflex.c
> ===================================================================
> --- linux-2.6.39-rc7-fast.orig/drivers/ide/triflex.c 2011-05-09 21:05:37.000000000 +0200
> +++ linux-2.6.39-rc7-fast/drivers/ide/triflex.c 2011-05-15 14:06:14.000000000 +0200
> @@ -113,12 +113,26 @@ static const struct pci_device_id trifle
> };
> MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);
>
> +#ifdef CONFIG_PM
> +static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state)
> +{
> + /*
> + * We must not disable or powerdown the device.
> + * APM bios refuses to suspend if IDE is not accessible.
> + */
> + pci_save_state(dev);
> + return 0;
> +}
> +#else
> +#define triflex_ide_pci_suspend NULL
> +#endif
> +
> static struct pci_driver triflex_pci_driver = {
> .name = "TRIFLEX_IDE",
> .id_table = triflex_pci_tbl,
> .probe = triflex_init_one,
> .remove = ide_pci_remove,
> - .suspend = ide_pci_suspend,
> + .suspend = triflex_ide_pci_suspend,
> .resume = ide_pci_resume,
> };
next prev parent reply other threads:[~2011-10-11 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-15 20:32 [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend Mikulas Patocka
2011-05-15 20:33 ` [PATCH] ATA: " Mikulas Patocka
2011-05-16 9:25 ` [PATCH] IDE: " Sergei Shtylyov
2011-10-11 16:56 ` Bartlomiej Zolnierkiewicz [this message]
2011-10-11 19:02 ` David Miller
2011-10-12 14:31 ` Bartlomiej Zolnierkiewicz
2011-10-13 21:05 ` David Miller
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=201110111856.05491.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/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;
as well as URLs for NNTP newsgroup(s).