diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 4b95c4387e9e..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,8 +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 | scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); | 1107 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); |
1111 | scsi_activate_tcq(sdev, depth); | ||
1112 | } | 1108 | } |
1113 | 1109 | ||
1114 | return 0; | 1110 | return 0; |
@@ -1948,11 +1944,6 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) | |||
1948 | hdr[1] |= (1 << 7); | 1944 | hdr[1] |= (1 << 7); |
1949 | 1945 | ||
1950 | memcpy(rbuf, hdr, sizeof(hdr)); | 1946 | memcpy(rbuf, hdr, sizeof(hdr)); |
1951 | |||
1952 | /* if ncq, set tags supported */ | ||
1953 | if (ata_id_has_ncq(args->id)) | ||
1954 | rbuf[7] |= (1 << 1); | ||
1955 | |||
1956 | memcpy(&rbuf[8], "ATA ", 8); | 1947 | memcpy(&rbuf[8], "ATA ", 8); |
1957 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); | 1948 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); |
1958 | 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); |