]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ata: make ata port as parent device of scsi host
authorLin Ming <ming.m.lin@intel.com>
Mon, 5 Dec 2011 01:20:23 +0000 (09:20 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 7 Dec 2011 19:59:36 +0000 (14:59 -0500)
commit3eb63c7463e5c3de3bedec4528abafe1de9d00ed
treeb81718a677a06b1552612fda6271f84f3583997c
parent41bb89334db4fd7098ca9d8b78a1ebf35b6d0bbe
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>
drivers/ata/libata-scsi.c