diff options
author | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 22:51:13 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 16:07:49 +0200 |
commit | df64d3caab8db6ae17dacd229a03d7689a10c432 (patch) | |
tree | 247fe4f9f39b22186e42e7f4687dd62c2690e47b /drivers/scsi/libsas/sas_ata.c | |
parent | [SCSI] mptfusion: release resources in error return path (diff) | |
download | linux-df64d3caab8db6ae17dacd229a03d7689a10c432.tar.xz linux-df64d3caab8db6ae17dacd229a03d7689a10c432.zip |
[SCSI] Unify SAM_ and SAM_STAT_ macros
We have two separate definitions for identical constants with nearly the
same name. One comes from the generic headers in scsi.h; the other is
an enum in libsas.h ... it's causing confusion about which one is
correct (fortunately they both are).
Fix this by eliminating the libsas.h duplicate
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libsas/sas_ata.c')
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 8c496b56556c..042153cbbde1 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -71,7 +71,7 @@ static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts) case SAS_SG_ERR: return AC_ERR_INVALID; - case SAM_CHECK_COND: + case SAM_STAT_CHECK_CONDITION: case SAS_OPEN_TO: case SAS_OPEN_REJECT: SAS_DPRINTK("%s: Saw error %d. What to do?\n", @@ -107,7 +107,7 @@ static void sas_ata_task_done(struct sas_task *task) sas_ha = dev->port->ha; spin_lock_irqsave(dev->sata_dev.ap->lock, flags); - if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_GOOD) { + if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_STAT_GOOD) { ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf); qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command); dev->sata_dev.sstatus = resp->sstatus; @@ -511,12 +511,12 @@ static int sas_execute_task(struct sas_task *task, void *buffer, int size, goto ex_err; } } - if (task->task_status.stat == SAM_BUSY || - task->task_status.stat == SAM_TASK_SET_FULL || + if (task->task_status.stat == SAM_STAT_BUSY || + task->task_status.stat == SAM_STAT_TASK_SET_FULL || task->task_status.stat == SAS_QUEUE_FULL) { SAS_DPRINTK("task: q busy, sleeping...\n"); schedule_timeout_interruptible(HZ); - } else if (task->task_status.stat == SAM_CHECK_COND) { + } else if (task->task_status.stat == SAM_STAT_CHECK_CONDITION) { struct scsi_sense_hdr shdr; if (!scsi_normalize_sense(ts->buf, ts->buf_valid_size, @@ -549,7 +549,7 @@ static int sas_execute_task(struct sas_task *task, void *buffer, int size, shdr.asc, shdr.ascq); } } else if (task->task_status.resp != SAS_TASK_COMPLETE || - task->task_status.stat != SAM_GOOD) { + task->task_status.stat != SAM_STAT_GOOD) { SAS_DPRINTK("task finished with resp:0x%x, " "stat:0x%x\n", task->task_status.resp, |