aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index cb115d1bf228..c0cf4acda7de 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -383,7 +383,6 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
383 sector_t block = rq->sector; 383 sector_t block = rq->sector;
384 sector_t threshold; 384 sector_t threshold;
385 unsigned int this_count = rq->nr_sectors; 385 unsigned int this_count = rq->nr_sectors;
386 unsigned int timeout = sdp->timeout;
387 int ret; 386 int ret;
388 387
389 if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { 388 if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
@@ -584,7 +583,6 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
584 SCpnt->transfersize = sdp->sector_size; 583 SCpnt->transfersize = sdp->sector_size;
585 SCpnt->underflow = this_count << 9; 584 SCpnt->underflow = this_count << 9;
586 SCpnt->allowed = SD_MAX_RETRIES; 585 SCpnt->allowed = SD_MAX_RETRIES;
587 SCpnt->timeout_per_command = timeout;
588 586
589 /* 587 /*
590 * This indicates that the command is ready from our end to be 588 * This indicates that the command is ready from our end to be
@@ -1878,11 +1876,12 @@ static int sd_probe(struct device *dev)
1878 sdkp->openers = 0; 1876 sdkp->openers = 0;
1879 sdkp->previous_state = 1; 1877 sdkp->previous_state = 1;
1880 1878
1881 if (!sdp->timeout) { 1879 if (!sdp->request_queue->rq_timeout) {
1882 if (sdp->type != TYPE_MOD) 1880 if (sdp->type != TYPE_MOD)
1883 sdp->timeout = SD_TIMEOUT; 1881 blk_queue_rq_timeout(sdp->request_queue, SD_TIMEOUT);
1884 else 1882 else
1885 sdp->timeout = SD_MOD_TIMEOUT; 1883 blk_queue_rq_timeout(sdp->request_queue,
1884 SD_MOD_TIMEOUT);
1886 } 1885 }
1887 1886
1888 device_initialize(&sdkp->dev); 1887 device_initialize(&sdkp->dev);