Skip to content

Commit 9a6d6a2

Browse files
Lin MingJeff Garzik
authored andcommitted
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>
1 parent 7faa33d commit 9a6d6a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libata-scsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
33983398
*/
33993399
shost->max_host_blocked = 1;
34003400

3401-
rc = scsi_add_host(ap->scsi_host, ap->host->dev);
3401+
rc = scsi_add_host(ap->scsi_host, &ap->tdev);
34023402
if (rc)
34033403
goto err_add;
34043404
}

0 commit comments

Comments
 (0)