diff options
author | Lin Ming <ming.m.lin@intel.com> | 2011-12-05 09:20:23 +0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-01-08 19:14:57 -0500 |
commit | 9a6d6a2ddabbd32c07f6a38b659e5f3db319fa5a (patch) | |
tree | 4501e80654ad8adb928ec575f2cd866c15ba87db /drivers/ata | |
parent | 7faa33da9b7add01db9f1ad92c6a5d9145e940a7 (diff) |
ata: make ata port as parent device of scsi host
Currently, the device tree of ata port and scsi host looks as below,
/sys/devices/pci0000:00/0000:00:1f.2 (ahci controller)
|-- ata1 (ata port)
|-- host0 (scsi host)
|-- target0:0:0 (scsi target)
|-- 0:0:0:0 (disk)
This patch makes ata port as parent device of scsi host, then it becomes
/sys/devices/pci0000:00/0000:00:1f.2 (ahci controller)
|-- ata1 (ata port)
|-- host0 (scsi host)
|-- target0:0:0 (scsi target)
|-- 0:0:0:0 (disk)
With this change, the ata port runtime PM is easier.
For example, the ata port runtime suspend will happen as,
disk suspend --> scsi target suspend --> scsi host suspend --> ata port
suspend.
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 2a5412e7e9c..7ae1e771d95 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3398,7 +3398,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) */ shost->max_host_blocked = 1; - rc = scsi_add_host(ap->scsi_host, ap->host->dev); + rc = scsi_add_host(ap->scsi_host, &ap->tdev); if (rc) goto err_add; } |