[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1320906166-15459-2-git-send-email-ming.m.lin@intel.com>
Date: Thu, 10 Nov 2011 14:22:43 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: linux-kernel@...r.kernel.org
Cc: linux-ide@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-pm@...r.kernel.org, Alan Stern <stern@...land.harvard.edu>,
Jeff Garzik <jgarzik@...ox.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
James Bottomley <JBottomley@...allels.com>,
Tejun Heo <tj@...nel.org>, Huang Ying <ying.huang@...el.com>,
Zhang Rui <rui.zhang@...el.com>
Subject: [PATCH v2 1/4] 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.
Signed-off-by: Lin Ming <ming.m.lin@...el.com>
---
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 72a9770..4c2a524 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3394,7 +3394,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;
}
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists