aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-10-27 14:23:06 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-27 14:25:30 -0400
commit43a49cbdf31e812c0d8f553d433b09b421f5d52c (patch)
treebe1e56a51d9a35c1414f26a8d30badc4c4256662
parent3070f69b66b7ab2f02d8a2500edae07039c38508 (diff)
libata: fix NCQ devices behind port multipliers
For devices behind sata port multipliers, we have to make sure that they share a tag map since all tags for that PMP must be unique. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--drivers/ata/libata-scsi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 4b95c4387e9e..bbb30d882f05 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1107,6 +1107,15 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
1107 1107
1108 depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); 1108 depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
1109 depth = min(ATA_MAX_QUEUE - 1, depth); 1109 depth = min(ATA_MAX_QUEUE - 1, depth);
1110
1111 /*
1112 * If this device is behind a port multiplier, we have
1113 * to share the tag map between all devices on that PMP.
1114 * Set up the shared tag map here and we get automatic.
1115 */
1116 if (dev->link->ap->pmp_link)
1117 scsi_init_shared_tag_map(sdev->host, ATA_MAX_QUEUE - 1);
1118
1110 scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); 1119 scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
1111 scsi_activate_tcq(sdev, depth); 1120 scsi_activate_tcq(sdev, depth);
1112 } 1121 }