diff options
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_emc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 61966750bd60..63032ec3db92 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c | |||
@@ -272,7 +272,7 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
272 | int len = 0; | 272 | int len = 0; |
273 | 273 | ||
274 | rq = blk_get_request(sdev->request_queue, | 274 | rq = blk_get_request(sdev->request_queue, |
275 | (cmd == MODE_SELECT) ? WRITE : READ, GFP_NOIO); | 275 | (cmd != INQUIRY) ? WRITE : READ, GFP_NOIO); |
276 | if (!rq) { | 276 | if (!rq) { |
277 | sdev_printk(KERN_INFO, sdev, "get_req: blk_get_request failed"); | 277 | sdev_printk(KERN_INFO, sdev, "get_req: blk_get_request failed"); |
278 | return NULL; | 278 | return NULL; |
@@ -286,14 +286,17 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
286 | len = sizeof(short_trespass); | 286 | len = sizeof(short_trespass); |
287 | rq->cmd_flags |= REQ_RW; | 287 | rq->cmd_flags |= REQ_RW; |
288 | rq->cmd[1] = 0x10; | 288 | rq->cmd[1] = 0x10; |
289 | rq->cmd[4] = len; | ||
289 | break; | 290 | break; |
290 | case MODE_SELECT_10: | 291 | case MODE_SELECT_10: |
291 | len = sizeof(long_trespass); | 292 | len = sizeof(long_trespass); |
292 | rq->cmd_flags |= REQ_RW; | 293 | rq->cmd_flags |= REQ_RW; |
293 | rq->cmd[1] = 0x10; | 294 | rq->cmd[1] = 0x10; |
295 | rq->cmd[8] = len; | ||
294 | break; | 296 | break; |
295 | case INQUIRY: | 297 | case INQUIRY: |
296 | len = CLARIION_BUFFER_SIZE; | 298 | len = CLARIION_BUFFER_SIZE; |
299 | rq->cmd[4] = len; | ||
297 | memset(buffer, 0, len); | 300 | memset(buffer, 0, len); |
298 | break; | 301 | break; |
299 | default: | 302 | default: |
@@ -301,7 +304,6 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
301 | break; | 304 | break; |
302 | } | 305 | } |
303 | 306 | ||
304 | rq->cmd[4] = len; | ||
305 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 307 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
306 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 308 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
307 | REQ_FAILFAST_DRIVER; | 309 | REQ_FAILFAST_DRIVER; |