diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ee308f6f7982..b12750f82169 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1207,7 +1207,7 @@ int scsi_prep_return(struct request_queue *q, struct request *req, int ret) | |||
1207 | break; | 1207 | break; |
1208 | case BLKPREP_DEFER: | 1208 | case BLKPREP_DEFER: |
1209 | /* | 1209 | /* |
1210 | * If we defer, the elv_next_request() returns NULL, but the | 1210 | * If we defer, the blk_peek_request() returns NULL, but the |
1211 | * queue must be restarted, so we plug here if no returning | 1211 | * queue must be restarted, so we plug here if no returning |
1212 | * command will automatically do that. | 1212 | * command will automatically do that. |
1213 | */ | 1213 | */ |
@@ -1385,7 +1385,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) | |||
1385 | struct scsi_target *starget = scsi_target(sdev); | 1385 | struct scsi_target *starget = scsi_target(sdev); |
1386 | struct Scsi_Host *shost = sdev->host; | 1386 | struct Scsi_Host *shost = sdev->host; |
1387 | 1387 | ||
1388 | blkdev_dequeue_request(req); | 1388 | blk_start_request(req); |
1389 | 1389 | ||
1390 | if (unlikely(cmd == NULL)) { | 1390 | if (unlikely(cmd == NULL)) { |
1391 | printk(KERN_CRIT "impossible request in %s.\n", | 1391 | printk(KERN_CRIT "impossible request in %s.\n", |
@@ -1477,7 +1477,7 @@ static void scsi_request_fn(struct request_queue *q) | |||
1477 | 1477 | ||
1478 | if (!sdev) { | 1478 | if (!sdev) { |
1479 | printk("scsi: killing requests for dead queue\n"); | 1479 | printk("scsi: killing requests for dead queue\n"); |
1480 | while ((req = elv_next_request(q)) != NULL) | 1480 | while ((req = blk_peek_request(q)) != NULL) |
1481 | scsi_kill_request(req, q); | 1481 | scsi_kill_request(req, q); |
1482 | return; | 1482 | return; |
1483 | } | 1483 | } |
@@ -1498,7 +1498,7 @@ static void scsi_request_fn(struct request_queue *q) | |||
1498 | * that the request is fully prepared even if we cannot | 1498 | * that the request is fully prepared even if we cannot |
1499 | * accept it. | 1499 | * accept it. |
1500 | */ | 1500 | */ |
1501 | req = elv_next_request(q); | 1501 | req = blk_peek_request(q); |
1502 | if (!req || !scsi_dev_queue_ready(q, sdev)) | 1502 | if (!req || !scsi_dev_queue_ready(q, sdev)) |
1503 | break; | 1503 | break; |
1504 | 1504 | ||
@@ -1514,7 +1514,7 @@ static void scsi_request_fn(struct request_queue *q) | |||
1514 | * Remove the request from the request list. | 1514 | * Remove the request from the request list. |
1515 | */ | 1515 | */ |
1516 | if (!(blk_queue_tagged(q) && !blk_queue_start_tag(q, req))) | 1516 | if (!(blk_queue_tagged(q) && !blk_queue_start_tag(q, req))) |
1517 | blkdev_dequeue_request(req); | 1517 | blk_start_request(req); |
1518 | sdev->device_busy++; | 1518 | sdev->device_busy++; |
1519 | 1519 | ||
1520 | spin_unlock(q->queue_lock); | 1520 | spin_unlock(q->queue_lock); |
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 50988cbf7b2d..d606452297cf 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -163,12 +163,10 @@ static void sas_smp_request(struct request_queue *q, struct Scsi_Host *shost, | |||
163 | int (*handler)(struct Scsi_Host *, struct sas_rphy *, struct request *); | 163 | int (*handler)(struct Scsi_Host *, struct sas_rphy *, struct request *); |
164 | 164 | ||
165 | while (!blk_queue_plugged(q)) { | 165 | while (!blk_queue_plugged(q)) { |
166 | req = elv_next_request(q); | 166 | req = blk_fetch_request(q); |
167 | if (!req) | 167 | if (!req) |
168 | break; | 168 | break; |
169 | 169 | ||
170 | blkdev_dequeue_request(req); | ||
171 | |||
172 | spin_unlock_irq(q->queue_lock); | 170 | spin_unlock_irq(q->queue_lock); |
173 | 171 | ||
174 | handler = to_sas_internal(shost->transportt)->f->smp_handler; | 172 | handler = to_sas_internal(shost->transportt)->f->smp_handler; |