Update ata_dev_configure() to deal with PM links. --- drivers/scsi/libata-core.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) 17a1cd83a17e3c44a2732ff2e77320f79b8565cd diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 740e831..32ea394 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1314,7 +1314,7 @@ int ata_dev_configure(struct ata_device { struct ata_port *ap = dev->link->ap; const u16 *id = dev->id; - struct ata_device *tdev; + struct ata_link *tlink; unsigned int xfer_mask; int rc; @@ -1437,10 +1437,13 @@ int ata_dev_configure(struct ata_device } ap->host->max_cmd_len = 0; - ata_link_for_each_dev(tdev, dev->link) { - ap->host->max_cmd_len = max_t(unsigned int, - ap->host->max_cmd_len, - tdev->cdb_len); + ata_port_for_each_link(tlink, ap) { + struct ata_device *tdev; + ata_link_for_each_dev(tdev, tlink) { + ap->host->max_cmd_len = max_t(unsigned int, + ap->host->max_cmd_len, + tdev->cdb_len); + } } /* limit bridge transfers to udma5, 200 sectors */ -- 1.2.4 - : 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