diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bbb30d882f05..47c7afcb36f2 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -190,7 +190,7 @@ static ssize_t ata_scsi_park_show(struct device *device, | |||
190 | struct ata_port *ap; | 190 | struct ata_port *ap; |
191 | struct ata_link *link; | 191 | struct ata_link *link; |
192 | struct ata_device *dev; | 192 | struct ata_device *dev; |
193 | unsigned long flags; | 193 | unsigned long flags, now; |
194 | unsigned int uninitialized_var(msecs); | 194 | unsigned int uninitialized_var(msecs); |
195 | int rc = 0; | 195 | int rc = 0; |
196 | 196 | ||
@@ -208,10 +208,11 @@ static ssize_t ata_scsi_park_show(struct device *device, | |||
208 | } | 208 | } |
209 | 209 | ||
210 | link = dev->link; | 210 | link = dev->link; |
211 | now = jiffies; | ||
211 | if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS && | 212 | if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS && |
212 | link->eh_context.unloaded_mask & (1 << dev->devno) && | 213 | link->eh_context.unloaded_mask & (1 << dev->devno) && |
213 | time_after(dev->unpark_deadline, jiffies)) | 214 | time_after(dev->unpark_deadline, now)) |
214 | msecs = jiffies_to_msecs(dev->unpark_deadline - jiffies); | 215 | msecs = jiffies_to_msecs(dev->unpark_deadline - now); |
215 | else | 216 | else |
216 | msecs = 0; | 217 | msecs = 0; |
217 | 218 | ||
@@ -708,11 +709,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, | |||
708 | { | 709 | { |
709 | struct ata_queued_cmd *qc; | 710 | struct ata_queued_cmd *qc; |
710 | 711 | ||
711 | if (cmd->request->tag != -1) | 712 | qc = ata_qc_new_init(dev); |
712 | qc = ata_qc_new_init(dev, cmd->request->tag); | ||
713 | else | ||
714 | qc = ata_qc_new_init(dev, 0); | ||
715 | |||
716 | if (qc) { | 713 | if (qc) { |
717 | qc->scsicmd = cmd; | 714 | qc->scsicmd = cmd; |
718 | qc->scsidone = done; | 715 | qc->scsidone = done; |
@@ -1107,17 +1104,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, | |||
1107 | 1104 | ||
1108 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); | 1105 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); |
1109 | depth = min(ATA_MAX_QUEUE - 1, depth); | 1106 | depth = min(ATA_MAX_QUEUE - 1, depth); |
1110 | 1107 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); | |
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 | |||
1119 | scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); | ||
1120 | scsi_activate_tcq(sdev, depth); | ||
1121 | } | 1108 | } |
1122 | 1109 | ||
1123 | return 0; | 1110 | return 0; |
@@ -1957,11 +1944,6 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) | |||
1957 | hdr[1] |= (1 << 7); | 1944 | hdr[1] |= (1 << 7); |
1958 | 1945 | ||
1959 | memcpy(rbuf, hdr, sizeof(hdr)); | 1946 | memcpy(rbuf, hdr, sizeof(hdr)); |
1960 | |||
1961 | /* if ncq, set tags supported */ | ||
1962 | if (ata_id_has_ncq(args->id)) | ||
1963 | rbuf[7] |= (1 << 1); | ||
1964 | |||
1965 | memcpy(&rbuf[8], "ATA ", 8); | 1947 | memcpy(&rbuf[8], "ATA ", 8); |
1966 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); | 1948 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); |
1967 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); | 1949 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); |