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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Update ata_dev_configure() to deal with PMP links.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

---

 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


-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux