aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/mg_disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/mg_disk.c')
-rw-r--r--drivers/block/mg_disk.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index f3898353d0a8..408c2bd8a439 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -285,7 +285,7 @@ static void mg_bad_rw_intr(struct mg_host *host)
285 if (req != NULL) 285 if (req != NULL)
286 if (++req->errors >= MG_MAX_ERRORS || 286 if (++req->errors >= MG_MAX_ERRORS ||
287 host->error == MG_ERR_TIMEOUT) 287 host->error == MG_ERR_TIMEOUT)
288 end_request(req, 0); 288 __blk_end_request_cur(req, -EIO);
289} 289}
290 290
291static unsigned int mg_out(struct mg_host *host, 291static unsigned int mg_out(struct mg_host *host,
@@ -351,7 +351,7 @@ static void mg_read(struct request *req)
351 351
352 if (req->current_nr_sectors <= 0) { 352 if (req->current_nr_sectors <= 0) {
353 MG_DBG("remain : %d sects\n", remains); 353 MG_DBG("remain : %d sects\n", remains);
354 end_request(req, 1); 354 __blk_end_request_cur(req, 0);
355 if (remains > 0) 355 if (remains > 0)
356 req = elv_next_request(host->breq); 356 req = elv_next_request(host->breq);
357 } 357 }
@@ -395,7 +395,7 @@ static void mg_write(struct request *req)
395 395
396 if (req->current_nr_sectors <= 0) { 396 if (req->current_nr_sectors <= 0) {
397 MG_DBG("remain : %d sects\n", remains); 397 MG_DBG("remain : %d sects\n", remains);
398 end_request(req, 1); 398 __blk_end_request_cur(req, 0);
399 if (remains > 0) 399 if (remains > 0)
400 req = elv_next_request(host->breq); 400 req = elv_next_request(host->breq);
401 } 401 }
@@ -448,7 +448,7 @@ ok_to_read:
448 448
449 /* let know if current segment done */ 449 /* let know if current segment done */
450 if (req->current_nr_sectors <= 0) 450 if (req->current_nr_sectors <= 0)
451 end_request(req, 1); 451 __blk_end_request_cur(req, 0);
452 452
453 /* set handler if read remains */ 453 /* set handler if read remains */
454 if (i > 0) { 454 if (i > 0) {
@@ -497,7 +497,7 @@ ok_to_write:
497 497
498 /* let know if current segment or all done */ 498 /* let know if current segment or all done */
499 if (!i || (req->bio && req->current_nr_sectors <= 0)) 499 if (!i || (req->bio && req->current_nr_sectors <= 0))
500 end_request(req, 1); 500 __blk_end_request_cur(req, 0);
501 501
502 /* write 1 sector and set handler if remains */ 502 /* write 1 sector and set handler if remains */
503 if (i > 0) { 503 if (i > 0) {
@@ -563,7 +563,7 @@ static void mg_request_poll(struct request_queue *q)
563 default: 563 default:
564 printk(KERN_WARNING "%s:%d unknown command\n", 564 printk(KERN_WARNING "%s:%d unknown command\n",
565 __func__, __LINE__); 565 __func__, __LINE__);
566 end_request(req, 0); 566 __blk_end_request_cur(req, -EIO);
567 break; 567 break;
568 } 568 }
569 } 569 }
@@ -617,7 +617,7 @@ static unsigned int mg_issue_req(struct request *req,
617 default: 617 default:
618 printk(KERN_WARNING "%s:%d unknown command\n", 618 printk(KERN_WARNING "%s:%d unknown command\n",
619 __func__, __LINE__); 619 __func__, __LINE__);
620 end_request(req, 0); 620 __blk_end_request_cur(req, -EIO);
621 break; 621 break;
622 } 622 }
623 return MG_ERR_NONE; 623 return MG_ERR_NONE;
@@ -655,7 +655,7 @@ static void mg_request(struct request_queue *q)
655 "%s: bad access: sector=%d, count=%d\n", 655 "%s: bad access: sector=%d, count=%d\n",
656 req->rq_disk->disk_name, 656 req->rq_disk->disk_name,
657 sect_num, sect_cnt); 657 sect_num, sect_cnt);
658 end_request(req, 0); 658 __blk_end_request_cur(req, -EIO);
659 continue; 659 continue;
660 } 660 }
661 661