Loading drivers/ata/libata-scsi.c +9 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading include/scsi/scsi_tcq.h +12 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,18 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag) */ static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) { /* * If the shared tag map isn't already initialized, do it now. * This saves callers from having to check ->bqt when setting up * devices on the shared host (for libata) */ if (!shost->bqt) { shost->bqt = blk_init_tags(depth); return shost->bqt ? 0 : -ENOMEM; if (!shost->bqt) return -ENOMEM; } return 0; } /** Loading Loading
drivers/ata/libata-scsi.c +9 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading
include/scsi/scsi_tcq.h +12 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,18 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag) */ static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) { /* * If the shared tag map isn't already initialized, do it now. * This saves callers from having to check ->bqt when setting up * devices on the shared host (for libata) */ if (!shost->bqt) { shost->bqt = blk_init_tags(depth); return shost->bqt ? 0 : -ENOMEM; if (!shost->bqt) return -ENOMEM; } return 0; } /** Loading