diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aic7xxx_old.c | 22 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 13 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 18 |
3 files changed, 11 insertions, 42 deletions
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 93984c9dfe14..aee73fafccc8 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
@@ -2850,12 +2850,6 @@ aic7xxx_done(struct aic7xxx_host *p, struct aic7xxx_scb *scb) | |||
2850 | aic_dev->r_total++; | 2850 | aic_dev->r_total++; |
2851 | ptr = aic_dev->r_bins; | 2851 | ptr = aic_dev->r_bins; |
2852 | } | 2852 | } |
2853 | if(cmd->device->simple_tags && cmd->request->cmd_flags & REQ_HARDBARRIER) | ||
2854 | { | ||
2855 | aic_dev->barrier_total++; | ||
2856 | if(scb->tag_action == MSG_ORDERED_Q_TAG) | ||
2857 | aic_dev->ordered_total++; | ||
2858 | } | ||
2859 | x = scb->sg_length; | 2853 | x = scb->sg_length; |
2860 | x >>= 10; | 2854 | x >>= 10; |
2861 | for(i=0; i<6; i++) | 2855 | for(i=0; i<6; i++) |
@@ -10125,7 +10119,6 @@ static void aic7xxx_buildscb(struct aic7xxx_host *p, struct scsi_cmnd *cmd, | |||
10125 | struct aic_dev_data *aic_dev = cmd->device->hostdata; | 10119 | struct aic_dev_data *aic_dev = cmd->device->hostdata; |
10126 | struct scsi_device *sdptr = cmd->device; | 10120 | struct scsi_device *sdptr = cmd->device; |
10127 | unsigned char tindex = TARGET_INDEX(cmd); | 10121 | unsigned char tindex = TARGET_INDEX(cmd); |
10128 | struct request *req = cmd->request; | ||
10129 | int use_sg; | 10122 | int use_sg; |
10130 | 10123 | ||
10131 | mask = (0x01 << tindex); | 10124 | mask = (0x01 << tindex); |
@@ -10144,19 +10137,8 @@ static void aic7xxx_buildscb(struct aic7xxx_host *p, struct scsi_cmnd *cmd, | |||
10144 | /* We always force TEST_UNIT_READY to untagged */ | 10137 | /* We always force TEST_UNIT_READY to untagged */ |
10145 | if (cmd->cmnd[0] != TEST_UNIT_READY && sdptr->simple_tags) | 10138 | if (cmd->cmnd[0] != TEST_UNIT_READY && sdptr->simple_tags) |
10146 | { | 10139 | { |
10147 | if (req->cmd_flags & REQ_HARDBARRIER) | 10140 | hscb->control |= MSG_SIMPLE_Q_TAG; |
10148 | { | 10141 | scb->tag_action = MSG_SIMPLE_Q_TAG; |
10149 | if(sdptr->ordered_tags) | ||
10150 | { | ||
10151 | hscb->control |= MSG_ORDERED_Q_TAG; | ||
10152 | scb->tag_action = MSG_ORDERED_Q_TAG; | ||
10153 | } | ||
10154 | } | ||
10155 | else | ||
10156 | { | ||
10157 | hscb->control |= MSG_SIMPLE_Q_TAG; | ||
10158 | scb->tag_action = MSG_SIMPLE_Q_TAG; | ||
10159 | } | ||
10160 | } | 10142 | } |
10161 | } | 10143 | } |
10162 | if ( !(aic_dev->dtr_pending) && | 10144 | if ( !(aic_dev->dtr_pending) && |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index f0cfba9a1fc8..535085cd27ec 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -130,17 +130,6 @@ static void sas_scsi_task_done(struct sas_task *task) | |||
130 | sc->scsi_done(sc); | 130 | sc->scsi_done(sc); |
131 | } | 131 | } |
132 | 132 | ||
133 | static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd) | ||
134 | { | ||
135 | enum task_attribute ta = TASK_ATTR_SIMPLE; | ||
136 | if (cmd->request && blk_rq_tagged(cmd->request)) { | ||
137 | if (cmd->device->ordered_tags && | ||
138 | (cmd->request->cmd_flags & REQ_HARDBARRIER)) | ||
139 | ta = TASK_ATTR_ORDERED; | ||
140 | } | ||
141 | return ta; | ||
142 | } | ||
143 | |||
144 | static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, | 133 | static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, |
145 | struct domain_device *dev, | 134 | struct domain_device *dev, |
146 | gfp_t gfp_flags) | 135 | gfp_t gfp_flags) |
@@ -160,7 +149,7 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, | |||
160 | task->ssp_task.retry_count = 1; | 149 | task->ssp_task.retry_count = 1; |
161 | int_to_scsilun(cmd->device->lun, &lun); | 150 | int_to_scsilun(cmd->device->lun, &lun); |
162 | memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); | 151 | memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); |
163 | task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd); | 152 | task->ssp_task.task_attr = TASK_ATTR_SIMPLE; |
164 | memcpy(task->ssp_task.cdb, cmd->cmnd, 16); | 153 | memcpy(task->ssp_task.cdb, cmd->cmnd, 16); |
165 | 154 | ||
166 | task->scatter = scsi_sglist(cmd); | 155 | task->scatter = scsi_sglist(cmd); |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index ffa0689ee840..20514c47a5aa 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2109,7 +2109,7 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
2109 | struct scsi_disk *sdkp = scsi_disk(disk); | 2109 | struct scsi_disk *sdkp = scsi_disk(disk); |
2110 | struct scsi_device *sdp = sdkp->device; | 2110 | struct scsi_device *sdp = sdkp->device; |
2111 | unsigned char *buffer; | 2111 | unsigned char *buffer; |
2112 | unsigned ordered; | 2112 | unsigned flush = 0; |
2113 | 2113 | ||
2114 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, | 2114 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, |
2115 | "sd_revalidate_disk\n")); | 2115 | "sd_revalidate_disk\n")); |
@@ -2151,17 +2151,15 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
2151 | 2151 | ||
2152 | /* | 2152 | /* |
2153 | * We now have all cache related info, determine how we deal | 2153 | * We now have all cache related info, determine how we deal |
2154 | * with ordered requests. Note that as the current SCSI | 2154 | * with flush requests. |
2155 | * dispatch function can alter request order, we cannot use | ||
2156 | * QUEUE_ORDERED_TAG_* even when ordered tag is supported. | ||
2157 | */ | 2155 | */ |
2158 | if (sdkp->WCE) | 2156 | if (sdkp->WCE) { |
2159 | ordered = sdkp->DPOFUA | 2157 | flush |= REQ_FLUSH; |
2160 | ? QUEUE_ORDERED_DRAIN_FUA : QUEUE_ORDERED_DRAIN_FLUSH; | 2158 | if (sdkp->DPOFUA) |
2161 | else | 2159 | flush |= REQ_FUA; |
2162 | ordered = QUEUE_ORDERED_DRAIN; | 2160 | } |
2163 | 2161 | ||
2164 | blk_queue_ordered(sdkp->disk->queue, ordered); | 2162 | blk_queue_flush(sdkp->disk->queue, flush); |
2165 | 2163 | ||
2166 | set_capacity(disk, sdkp->capacity); | 2164 | set_capacity(disk, sdkp->capacity); |
2167 | kfree(buffer); | 2165 | kfree(buffer); |