diff options
Diffstat (limited to 'drivers/block/xd.c')
-rw-r--r-- | drivers/block/xd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/block/xd.c b/drivers/block/xd.c index 6f6ad82ec0c0..14be4c1ed1aa 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c | |||
@@ -308,7 +308,6 @@ static void do_xd_request (struct request_queue * q) | |||
308 | while ((req = elv_next_request(q)) != NULL) { | 308 | while ((req = elv_next_request(q)) != NULL) { |
309 | unsigned block = req->sector; | 309 | unsigned block = req->sector; |
310 | unsigned count = req->nr_sectors; | 310 | unsigned count = req->nr_sectors; |
311 | int rw = rq_data_dir(req); | ||
312 | XD_INFO *disk = req->rq_disk->private_data; | 311 | XD_INFO *disk = req->rq_disk->private_data; |
313 | int res = 0; | 312 | int res = 0; |
314 | int retry; | 313 | int retry; |
@@ -321,13 +320,9 @@ static void do_xd_request (struct request_queue * q) | |||
321 | __blk_end_request_cur(req, -EIO); | 320 | __blk_end_request_cur(req, -EIO); |
322 | continue; | 321 | continue; |
323 | } | 322 | } |
324 | if (rw != READ && rw != WRITE) { | ||
325 | printk("do_xd_request: unknown request\n"); | ||
326 | __blk_end_request_cur(req, -EIO); | ||
327 | continue; | ||
328 | } | ||
329 | for (retry = 0; (retry < XD_RETRIES) && !res; retry++) | 323 | for (retry = 0; (retry < XD_RETRIES) && !res; retry++) |
330 | res = xd_readwrite(rw, disk, req->buffer, block, count); | 324 | res = xd_readwrite(rq_data_dir(req), disk, req->buffer, |
325 | block, count); | ||
331 | /* wrap up, 0 = success, -errno = fail */ | 326 | /* wrap up, 0 = success, -errno = fail */ |
332 | __blk_end_request_cur(req, res); | 327 | __blk_end_request_cur(req, res); |
333 | } | 328 | } |