aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-07-27 16:51:13 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:07:49 -0400
commitdf64d3caab8db6ae17dacd229a03d7689a10c432 (patch)
tree247fe4f9f39b22186e42e7f4687dd62c2690e47b /drivers/scsi/libsas
parent653c42d552d0fd0b05485442aed45dd2d62269c0 (diff)
[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')
-rw-r--r--drivers/scsi/libsas/sas_ata.c12
-rw-r--r--drivers/scsi/libsas/sas_expander.c2
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c4
-rw-r--r--drivers/scsi/libsas/sas_task.c6
4 files changed, 12 insertions, 12 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)
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_CHECK_COND: 74 case SAM_STAT_CHECK_CONDITION:
75 case SAS_OPEN_TO: 75 case SAS_OPEN_TO:
76 case SAS_OPEN_REJECT: 76 case SAS_OPEN_REJECT:
77 SAS_DPRINTK("%s: Saw error %d. What to do?\n", 77 SAS_DPRINTK("%s: Saw error %d. What to do?\n",
@@ -107,7 +107,7 @@ 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_GOOD) { 110 if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_STAT_GOOD) {
111 ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf); 111 ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf);
112 qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command); 112 qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command);
113 dev->sata_dev.sstatus = resp->sstatus; 113 dev->sata_dev.sstatus = resp->sstatus;
@@ -511,12 +511,12 @@ static int sas_execute_task(struct sas_task *task, void *buffer, int size,
511 goto ex_err; 511 goto ex_err;
512 } 512 }
513 } 513 }
514 if (task->task_status.stat == SAM_BUSY || 514 if (task->task_status.stat == SAM_STAT_BUSY ||
515 task->task_status.stat == SAM_TASK_SET_FULL || 515 task->task_status.stat == SAM_STAT_TASK_SET_FULL ||
516 task->task_status.stat == SAS_QUEUE_FULL) { 516 task->task_status.stat == SAS_QUEUE_FULL) {
517 SAS_DPRINTK("task: q busy, sleeping...\n"); 517 SAS_DPRINTK("task: q busy, sleeping...\n");
518 schedule_timeout_interruptible(HZ); 518 schedule_timeout_interruptible(HZ);
519 } else if (task->task_status.stat == SAM_CHECK_COND) { 519 } else if (task->task_status.stat == SAM_STAT_CHECK_CONDITION) {
520 struct scsi_sense_hdr shdr; 520 struct scsi_sense_hdr shdr;
521 521
522 if (!scsi_normalize_sense(ts->buf, ts->buf_valid_size, 522 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,
549 shdr.asc, shdr.ascq); 549 shdr.asc, shdr.ascq);
550 } 550 }
551 } else if (task->task_status.resp != SAS_TASK_COMPLETE || 551 } else if (task->task_status.resp != SAS_TASK_COMPLETE ||
552 task->task_status.stat != SAM_GOOD) { 552 task->task_status.stat != SAM_STAT_GOOD) {
553 SAS_DPRINTK("task finished with resp:0x%x, " 553 SAS_DPRINTK("task finished with resp:0x%x, "
554 "stat:0x%x\n", 554 "stat:0x%x\n",
555 task->task_status.resp, 555 task->task_status.resp,
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index c65af02dcfe8..83dd5070a15c 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -107,7 +107,7 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
107 } 107 }
108 } 108 }
109 if (task->task_status.resp == SAS_TASK_COMPLETE && 109 if (task->task_status.resp == SAS_TASK_COMPLETE &&
110 task->task_status.stat == SAM_GOOD) { 110 task->task_status.stat == SAM_STAT_GOOD) {
111 res = 0; 111 res = 0;
112 break; 112 break;
113 } if (task->task_status.resp == SAS_TASK_COMPLETE && 113 } if (task->task_status.resp == SAS_TASK_COMPLETE &&
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index a7890c6d878e..f0cfba9a1fc8 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -113,10 +113,10 @@ static void sas_scsi_task_done(struct sas_task *task)
113 case SAS_ABORTED_TASK: 113 case SAS_ABORTED_TASK:
114 hs = DID_ABORT; 114 hs = DID_ABORT;
115 break; 115 break;
116 case SAM_CHECK_COND: 116 case SAM_STAT_CHECK_CONDITION:
117 memcpy(sc->sense_buffer, ts->buf, 117 memcpy(sc->sense_buffer, ts->buf,
118 min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size)); 118 min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size));
119 stat = SAM_CHECK_COND; 119 stat = SAM_STAT_CHECK_CONDITION;
120 break; 120 break;
121 default: 121 default:
122 stat = ts->stat; 122 stat = ts->stat;
diff --git a/drivers/scsi/libsas/sas_task.c b/drivers/scsi/libsas/sas_task.c
index 594524d5bfa1..b13a3346894c 100644
--- a/drivers/scsi/libsas/sas_task.c
+++ b/drivers/scsi/libsas/sas_task.c
@@ -15,13 +15,13 @@ void sas_ssp_task_response(struct device *dev, struct sas_task *task,
15 else if (iu->datapres == 1) 15 else if (iu->datapres == 1)
16 tstat->stat = iu->resp_data[3]; 16 tstat->stat = iu->resp_data[3];
17 else if (iu->datapres == 2) { 17 else if (iu->datapres == 2) {
18 tstat->stat = SAM_CHECK_COND; 18 tstat->stat = SAM_STAT_CHECK_CONDITION;
19 tstat->buf_valid_size = 19 tstat->buf_valid_size =
20 min_t(int, SAS_STATUS_BUF_SIZE, 20 min_t(int, SAS_STATUS_BUF_SIZE,
21 be32_to_cpu(iu->sense_data_len)); 21 be32_to_cpu(iu->sense_data_len));
22 memcpy(tstat->buf, iu->sense_data, tstat->buf_valid_size); 22 memcpy(tstat->buf, iu->sense_data, tstat->buf_valid_size);
23 23
24 if (iu->status != SAM_CHECK_COND) 24 if (iu->status != SAM_STAT_CHECK_CONDITION)
25 dev_printk(KERN_WARNING, dev, 25 dev_printk(KERN_WARNING, dev,
26 "dev %llx sent sense data, but " 26 "dev %llx sent sense data, but "
27 "stat(%x) is not CHECK CONDITION\n", 27 "stat(%x) is not CHECK CONDITION\n",
@@ -30,7 +30,7 @@ void sas_ssp_task_response(struct device *dev, struct sas_task *task,
30 } 30 }
31 else 31 else
32 /* when datapres contains corrupt/unknown value... */ 32 /* when datapres contains corrupt/unknown value... */
33 tstat->stat = SAM_CHECK_COND; 33 tstat->stat = SAM_STAT_CHECK_CONDITION;
34} 34}
35EXPORT_SYMBOL_GPL(sas_ssp_task_response); 35EXPORT_SYMBOL_GPL(sas_ssp_task_response);
36 36