* [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
@ 2011-05-15 20:32 Mikulas Patocka
2011-05-15 20:33 ` [PATCH] ATA: " Mikulas Patocka
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mikulas Patocka @ 2011-05-15 20:32 UTC (permalink / raw)
To: David S. Miller, Jeff Garzik; +Cc: linux-ide
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>
---
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,
};
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ATA: Don't powerdown Compaq Triflex IDE device on suspend
2011-05-15 20:32 [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend Mikulas Patocka
@ 2011-05-15 20:33 ` Mikulas Patocka
2011-05-16 9:25 ` [PATCH] IDE: " Sergei Shtylyov
2011-10-11 16:56 ` Bartlomiej Zolnierkiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Mikulas Patocka @ 2011-05-15 20:33 UTC (permalink / raw)
To: David S. Miller, Jeff Garzik; +Cc: linux-ide
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.
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
---
drivers/ata/pata_triflex.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
Index: linux-2.6.39-rc7-libata/drivers/ata/pata_triflex.c
===================================================================
--- linux-2.6.39-rc7-libata.orig/drivers/ata/pata_triflex.c 2011-05-09 21:04:22.000000000 +0200
+++ linux-2.6.39-rc7-libata/drivers/ata/pata_triflex.c 2011-05-15 16:13:31.000000000 +0200
@@ -210,13 +210,34 @@ static const struct pci_device_id trifle
{ },
};
+#ifdef CONFIG_PM
+static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
+{
+ struct ata_host *host = dev_get_drvdata(&pdev->dev);
+ int rc = 0;
+
+ rc = ata_host_suspend(host, mesg);
+ if (rc)
+ return rc;
+
+ /*
+ * We must not disable or powerdown the device.
+ * APM bios refuses to suspend if IDE is not accessible.
+ */
+ pci_save_state(pdev);
+
+ return 0;
+}
+
+#endif
+
static struct pci_driver triflex_pci_driver = {
.name = DRV_NAME,
.id_table = triflex,
.probe = triflex_init_one,
.remove = ata_pci_remove_one,
#ifdef CONFIG_PM
- .suspend = ata_pci_device_suspend,
+ .suspend = triflex_ata_pci_device_suspend,
.resume = ata_pci_device_resume,
#endif
};
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
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 ` Sergei Shtylyov
2011-10-11 16:56 ` Bartlomiej Zolnierkiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2011-05-16 9:25 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: David S. Miller, Jeff Garzik, linux-ide
Hello.
On 16-05-2011 0:32, 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
Please also specify that commit's summary in parens -- for the human
readers. Commit ID is only immediately usable to gitweb.
> Signed-off-by: Mikulas Patocka<mikulas@artax.karlin.mff.cuni.cz>
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
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
2011-10-11 19:02 ` David Miller
2 siblings, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-11 16:56 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: David S. Miller, Jeff Garzik, linux-ide
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,
> };
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
2011-10-11 16:56 ` Bartlomiej Zolnierkiewicz
@ 2011-10-11 19:02 ` David Miller
2011-10-12 14:31 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2011-10-11 19:02 UTC (permalink / raw)
To: bzolnier; +Cc: mikulas, jgarzik, linux-ide
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue, 11 Oct 2011 18:56:05 +0200
> 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?
Feedback was given on this patch, and changes were requested. The patch
was never fixed up and resubmitted by the author:
http://patchwork.ozlabs.org/patch/95665/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
2011-10-11 19:02 ` David Miller
@ 2011-10-12 14:31 ` Bartlomiej Zolnierkiewicz
2011-10-13 21:05 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-12 14:31 UTC (permalink / raw)
To: David Miller; +Cc: mikulas, jgarzik, linux-ide
David Miller wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Date: Tue, 11 Oct 2011 18:56:05 +0200
>
> > 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?
>
> Feedback was given on this patch, and changes were requested. The patch
> was never fixed up and resubmitted by the author:
>
> http://patchwork.ozlabs.org/patch/95665/
Here is updated patch:
From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Subject: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
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 ("ide: add proper PCI PM
support (v2)").
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
[bart: add commit's summary in parens]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
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,
};
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
2011-10-12 14:31 ` Bartlomiej Zolnierkiewicz
@ 2011-10-13 21:05 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-10-13 21:05 UTC (permalink / raw)
To: bzolnier; +Cc: mikulas, jgarzik, linux-ide
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Wed, 12 Oct 2011 16:31:51 +0200
> From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> Subject: [PATCH] IDE: Don't powerdown Compaq Triflex IDE device on suspend
>
> 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 ("ide: add proper PCI PM
> support (v2)").
>
> Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> [bart: add commit's summary in parens]
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-13 21:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-10-11 19:02 ` David Miller
2011-10-12 14:31 ` Bartlomiej Zolnierkiewicz
2011-10-13 21:05 ` David Miller
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).