diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-27 11:41:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-27 11:41:51 -0700 |
commit | 49fdf6785fd660e18a1eb4588928f47e9fa29a9a (patch) | |
tree | 71cccf385d734bfc33e9cd4752b5046aef99c130 /drivers/ata/libata-scsi.c | |
parent | b70a6b27ed4cbb9ea7a4e1abc080ed65692ecb9b (diff) | |
parent | 43a49cbdf31e812c0d8f553d433b09b421f5d52c (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
libata: fix NCQ devices behind port multipliers
scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 4b95c4387e9..bbb30d882f0 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, depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); depth = min(ATA_MAX_QUEUE - 1, depth); + + /* + * If this device is behind a port multiplier, we have + * to share the tag map between all devices on that PMP. + * Set up the shared tag map here and we get automatic. + */ + if (dev->link->ap->pmp_link) + scsi_init_shared_tag_map(sdev->host, ATA_MAX_QUEUE - 1); + scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); scsi_activate_tcq(sdev, depth); } |