Thread (22 messages) 22 messages, 2 authors, 2006-07-24
STALE7278d

[PATCH 14/17] libata-link: update ata_dev_configure() to deal with PMP links

From: Tejun Heo <hidden>
Date: 2006-07-08 05:44:52
Subsystem: scsi subsystem, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

Update ata_dev_configure() to deal with PMP links.

Signed-off-by: Tejun Heo <redacted>

---

 drivers/scsi/libata-core.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

6ed21e82bcfd8f7aa256f072fee6332682a4671f
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 0cf2661..3604fce 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1330,14 +1330,20 @@ static void ata_dev_config_ncq(struct at
 
 static void ata_set_port_max_cmd_len(struct ata_port *ap)
 {
-	struct ata_device *dev;
+	struct ata_link *link;
+
+	if (!ap->host)
+		return;
+
+	ap->host->max_cmd_len = 0;
 
-	if (ap->host) {
-		ap->host->max_cmd_len = 0;
-		ata_link_for_each_dev(dev, &ap->link)
+	ata_port_for_each_link(link, ap) {
+		struct ata_device *dev;
+		ata_link_for_each_dev(dev, link) {
 			ap->host->max_cmd_len = max_t(unsigned int,
 						      ap->host->max_cmd_len,
 						      dev->cdb_len);
+		}
 	}
 }
 
-- 
1.3.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help