diff options
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index c58a7a19780f..1c3a10fb3c44 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -225,7 +225,7 @@ void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat) | |||
225 | }; | 225 | }; |
226 | int i = 0; | 226 | int i = 0; |
227 | 227 | ||
228 | cmd->result = SAM_STAT_CHECK_CONDITION; | 228 | cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; |
229 | 229 | ||
230 | /* | 230 | /* |
231 | * Is this an error we can process/parse | 231 | * Is this an error we can process/parse |
@@ -1468,7 +1468,7 @@ unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf, | |||
1468 | void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8 asc, u8 ascq) | 1468 | void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8 asc, u8 ascq) |
1469 | { | 1469 | { |
1470 | DPRINTK("ENTER\n"); | 1470 | DPRINTK("ENTER\n"); |
1471 | cmd->result = SAM_STAT_CHECK_CONDITION; | 1471 | cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; |
1472 | 1472 | ||
1473 | cmd->sense_buffer[0] = 0x70; | 1473 | cmd->sense_buffer[0] = 0x70; |
1474 | cmd->sense_buffer[2] = ILLEGAL_REQUEST; | 1474 | cmd->sense_buffer[2] = ILLEGAL_REQUEST; |
@@ -1529,8 +1529,11 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat) | |||
1529 | { | 1529 | { |
1530 | struct scsi_cmnd *cmd = qc->scsicmd; | 1530 | struct scsi_cmnd *cmd = qc->scsicmd; |
1531 | 1531 | ||
1532 | VPRINTK("ENTER, drv_stat == 0x%x\n", drv_stat); | ||
1533 | |||
1532 | if (unlikely(drv_stat & (ATA_BUSY | ATA_DRQ))) | 1534 | if (unlikely(drv_stat & (ATA_BUSY | ATA_DRQ))) |
1533 | ata_to_sense_error(qc, drv_stat); | 1535 | ata_to_sense_error(qc, drv_stat); |
1536 | |||
1534 | else if (unlikely(drv_stat & ATA_ERR)) { | 1537 | else if (unlikely(drv_stat & ATA_ERR)) { |
1535 | DPRINTK("request check condition\n"); | 1538 | DPRINTK("request check condition\n"); |
1536 | 1539 | ||
@@ -1546,7 +1549,9 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat) | |||
1546 | qc->scsidone(cmd); | 1549 | qc->scsidone(cmd); |
1547 | 1550 | ||
1548 | return 1; | 1551 | return 1; |
1549 | } else { | 1552 | } |
1553 | |||
1554 | else { | ||
1550 | u8 *scsicmd = cmd->cmnd; | 1555 | u8 *scsicmd = cmd->cmnd; |
1551 | 1556 | ||
1552 | if (scsicmd[0] == INQUIRY) { | 1557 | if (scsicmd[0] == INQUIRY) { |
@@ -1578,7 +1583,6 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat) | |||
1578 | } | 1583 | } |
1579 | 1584 | ||
1580 | qc->scsidone(cmd); | 1585 | qc->scsidone(cmd); |
1581 | |||
1582 | return 0; | 1586 | return 0; |
1583 | } | 1587 | } |
1584 | /** | 1588 | /** |