diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index e1a395b438ee..4a6e203861d2 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -71,13 +71,13 @@ static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts) | |||
71 | case SAS_SG_ERR: | 71 | case SAS_SG_ERR: |
72 | return AC_ERR_INVALID; | 72 | return AC_ERR_INVALID; |
73 | 73 | ||
74 | case SAM_STAT_CHECK_CONDITION: | ||
75 | case SAS_OPEN_TO: | 74 | case SAS_OPEN_TO: |
76 | case SAS_OPEN_REJECT: | 75 | case SAS_OPEN_REJECT: |
77 | SAS_DPRINTK("%s: Saw error %d. What to do?\n", | 76 | SAS_DPRINTK("%s: Saw error %d. What to do?\n", |
78 | __func__, ts->stat); | 77 | __func__, ts->stat); |
79 | return AC_ERR_OTHER; | 78 | return AC_ERR_OTHER; |
80 | 79 | ||
80 | case SAM_STAT_CHECK_CONDITION: | ||
81 | case SAS_ABORTED_TASK: | 81 | case SAS_ABORTED_TASK: |
82 | return AC_ERR_DEV; | 82 | return AC_ERR_DEV; |
83 | 83 | ||
@@ -107,13 +107,15 @@ static void sas_ata_task_done(struct sas_task *task) | |||
107 | sas_ha = dev->port->ha; | 107 | sas_ha = dev->port->ha; |
108 | 108 | ||
109 | spin_lock_irqsave(dev->sata_dev.ap->lock, flags); | 109 | spin_lock_irqsave(dev->sata_dev.ap->lock, flags); |
110 | if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_STAT_GOOD) { | 110 | if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_STAT_GOOD || |
111 | ((stat->stat == SAM_STAT_CHECK_CONDITION && | ||
112 | dev->sata_dev.command_set == ATAPI_COMMAND_SET))) { | ||
111 | ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf); | 113 | ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf); |
112 | qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command); | 114 | qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command); |
113 | dev->sata_dev.sstatus = resp->sstatus; | 115 | dev->sata_dev.sstatus = resp->sstatus; |
114 | dev->sata_dev.serror = resp->serror; | 116 | dev->sata_dev.serror = resp->serror; |
115 | dev->sata_dev.scontrol = resp->scontrol; | 117 | dev->sata_dev.scontrol = resp->scontrol; |
116 | } else if (stat->stat != SAM_STAT_GOOD) { | 118 | } else { |
117 | ac = sas_to_ata_err(stat); | 119 | ac = sas_to_ata_err(stat); |
118 | if (ac) { | 120 | if (ac) { |
119 | SAS_DPRINTK("%s: SAS error %x\n", __func__, | 121 | SAS_DPRINTK("%s: SAS error %x\n", __func__, |