aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index ef763ed9a0e5..2aef41112c43 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1203,12 +1203,11 @@ nothing_to_do:
1203 return 1; 1203 return 1;
1204} 1204}
1205 1205
1206static int ata_scsi_qc_complete(struct ata_queued_cmd *qc, 1206static int ata_scsi_qc_complete(struct ata_queued_cmd *qc)
1207 unsigned int err_mask)
1208{ 1207{
1209 struct scsi_cmnd *cmd = qc->scsicmd; 1208 struct scsi_cmnd *cmd = qc->scsicmd;
1210 u8 *cdb = cmd->cmnd; 1209 u8 *cdb = cmd->cmnd;
1211 int need_sense = (err_mask != 0); 1210 int need_sense = (qc->err_mask != 0);
1212 1211
1213 /* For ATA pass thru (SAT) commands, generate a sense block if 1212 /* For ATA pass thru (SAT) commands, generate a sense block if
1214 * user mandated it or if there's an error. Note that if we 1213 * user mandated it or if there's an error. Note that if we
@@ -1955,9 +1954,9 @@ void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8
1955 done(cmd); 1954 done(cmd);
1956} 1955}
1957 1956
1958static int atapi_sense_complete(struct ata_queued_cmd *qc,unsigned int err_mask) 1957static int atapi_sense_complete(struct ata_queued_cmd *qc)
1959{ 1958{
1960 if (err_mask && ((err_mask & AC_ERR_DEV) == 0)) 1959 if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0))
1961 /* FIXME: not quite right; we don't want the 1960 /* FIXME: not quite right; we don't want the
1962 * translation of taskfile registers into 1961 * translation of taskfile registers into
1963 * a sense descriptors, since that's only 1962 * a sense descriptors, since that's only
@@ -2015,15 +2014,18 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
2015 2014
2016 qc->complete_fn = atapi_sense_complete; 2015 qc->complete_fn = atapi_sense_complete;
2017 2016
2018 if (ata_qc_issue(qc)) 2017 if (ata_qc_issue(qc)) {
2019 ata_qc_complete(qc, AC_ERR_OTHER); 2018 qc->err_mask |= AC_ERR_OTHER;
2019 ata_qc_complete(qc);
2020 }
2020 2021
2021 DPRINTK("EXIT\n"); 2022 DPRINTK("EXIT\n");
2022} 2023}
2023 2024
2024static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) 2025static int atapi_qc_complete(struct ata_queued_cmd *qc)
2025{ 2026{
2026 struct scsi_cmnd *cmd = qc->scsicmd; 2027 struct scsi_cmnd *cmd = qc->scsicmd;
2028 unsigned int err_mask = qc->err_mask;
2027 2029
2028 VPRINTK("ENTER, err_mask 0x%X\n", err_mask); 2030 VPRINTK("ENTER, err_mask 0x%X\n", err_mask);
2029 2031