mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
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>
This commit is contained in:
parent
3070f69b66
commit
43a49cbdf3
1 changed files with 9 additions and 0 deletions
|
@ -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(sdev->host->can_queue, ata_id_queue_depth(dev->id));
|
||||||
depth = min(ATA_MAX_QUEUE - 1, depth);
|
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_set_tag_type(sdev, MSG_SIMPLE_TAG);
|
||||||
scsi_activate_tcq(sdev, depth);
|
scsi_activate_tcq(sdev, depth);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue