Skip to content

Commit

Permalink
pata_sis: Power Management fix
Browse files Browse the repository at this point in the history
Call sis_fixup() on resume.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Dec 3, 2009
1 parent 0826ef5 commit 750c713
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions drivers/ata/pata_sis.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pata_sis.c - SiS ATA driver
*
* (C) 2005 Red Hat
* (C) 2007 Bartlomiej Zolnierkiewicz
* (C) 2007,2009 Bartlomiej Zolnierkiewicz
*
* Based upon linux/drivers/ide/pci/sis5513.c
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
Expand Down Expand Up @@ -876,6 +876,23 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset);
}

#ifdef CONFIG_PM
static int sis_reinit_one(struct pci_dev *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
int rc;

rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;

sis_fixup(pdev, host->private_data);

ata_host_resume(host);
return 0;
}
#endif

static const struct pci_device_id sis_pci_tbl[] = {
{ PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */
{ PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */
Expand All @@ -891,7 +908,7 @@ static struct pci_driver sis_pci_driver = {
.remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume,
.resume = sis_reinit_one,
#endif
};

Expand Down

0 comments on commit 750c713

Please sign in to comment.