From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, lkml@rtr.ca, axboe@suse.de,
forrest.zhao@intel.com, alan@lxorguk.ukuu.org.uk,
linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 6/8] sata_sil: add suspend/sleep support
Date: Wed, 28 Jun 2006 15:23:06 +0900 [thread overview]
Message-ID: <11514757862619-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11514757842728-git-send-email-htejun@gmail.com>
Add suspend/sleep support.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/sata_sil.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
0d50db138ae1cfbfb6e6ce67ce58a0e9215117ac
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 04f2cfe..e943fa8 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -109,6 +109,7 @@ enum {
};
static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
+static int sil_pci_device_resume(struct pci_dev *pdev);
static void sil_dev_config(struct ata_port *ap, struct ata_device *dev);
static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg);
static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
@@ -160,6 +161,8 @@ static struct pci_driver sil_pci_driver
.id_table = sil_pci_tbl,
.probe = sil_init_one,
.remove = ata_pci_remove_one,
+ .suspend = ata_pci_device_suspend,
+ .resume = sil_pci_device_resume,
};
static struct scsi_host_template sil_sht = {
@@ -178,6 +181,8 @@ static struct scsi_host_template sil_sht
.slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
+ .suspend = ata_scsi_device_suspend,
+ .resume = ata_scsi_device_resume,
};
static const struct ata_port_operations sil_ops = {
@@ -695,6 +700,18 @@ err_out:
return rc;
}
+static int sil_pci_device_resume(struct pci_dev *pdev)
+{
+ struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev);
+
+ ata_pci_device_do_resume(pdev);
+ sil_init_controller(pdev, host_set->n_ports, host_set->ports[0]->flags,
+ host_set->mmio_base);
+ ata_host_set_resume(host_set);
+
+ return 0;
+}
+
static int __init sil_init(void)
{
return pci_module_init(&sil_pci_driver);
--
1.3.2
next prev parent reply other threads:[~2006-06-28 6:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 6:23 [PATCHSET] new Power Management for libata, take 3 Tejun Heo
2006-06-28 6:23 ` [PATCH 1/8] libata: implement PM EH actions Tejun Heo
2006-06-28 6:23 ` [PATCH 5/8] sata_sil: separate out sil_init_controller() Tejun Heo
2006-06-28 6:23 ` [PATCH 3/8] libata: move ata_flush_cache() from libata-core.c to libata-eh.c Tejun Heo
2006-06-28 6:23 ` [PATCH 4/8] libata: reimplement controller-wide PM Tejun Heo
2006-06-28 6:23 ` [PATCH 2/8] libata: reimplement per-dev PM Tejun Heo
2006-06-28 6:23 ` [PATCH 8/8] sata_sil24: add suspend/sleep support Tejun Heo
2006-06-28 6:23 ` Tejun Heo [this message]
2006-06-28 6:23 ` [PATCH 7/8] sata_sil24: separate out sil24_init_controller() Tejun Heo
2006-06-28 6:27 ` [git-patches] new Power Management for libata, take 3 Tejun Heo
2006-06-30 16:44 ` [PATCHSET] " Jeff Garzik
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=11514757862619-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@suse.de \
--cc=forrest.zhao@intel.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=lkml@rtr.ca \
/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).