Skip to content

Commit 839e730

Browse files
Mikulas Patockadavem330
authored andcommitted
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 feb22b7 ("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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent dc9c0be commit 839e730

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎drivers/ide/triflex.c‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = {
113113
};
114114
MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);
115115

116+
#ifdef CONFIG_PM
117+
static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state)
118+
{
119+
/*
120+
* We must not disable or powerdown the device.
121+
* APM bios refuses to suspend if IDE is not accessible.
122+
*/
123+
pci_save_state(dev);
124+
return 0;
125+
}
126+
#else
127+
#define triflex_ide_pci_suspend NULL
128+
#endif
129+
116130
static struct pci_driver triflex_pci_driver = {
117131
.name = "TRIFLEX_IDE",
118132
.id_table = triflex_pci_tbl,
119133
.probe = triflex_init_one,
120134
.remove = ide_pci_remove,
121-
.suspend = ide_pci_suspend,
135+
.suspend = triflex_ide_pci_suspend,
122136
.resume = ide_pci_resume,
123137
};
124138

0 commit comments

Comments
 (0)