aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/sx8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/sx8.c')
-rw-r--r--drivers/block/sx8.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index ff0448e4bf03..da403b6a7f43 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -749,8 +749,7 @@ static inline void carm_end_request_queued(struct carm_host *host,
749 struct request *req = crq->rq; 749 struct request *req = crq->rq;
750 int rc; 750 int rc;
751 751
752 rc = __blk_end_request(req, error, blk_rq_bytes(req)); 752 __blk_end_request_all(req, error);
753 assert(rc == 0);
754 753
755 rc = carm_put_request(host, crq); 754 rc = carm_put_request(host, crq);
756 assert(rc == 0); 755 assert(rc == 0);
@@ -811,12 +810,10 @@ static void carm_oob_rq_fn(struct request_queue *q)
811 810
812 while (1) { 811 while (1) {
813 DPRINTK("get req\n"); 812 DPRINTK("get req\n");
814 rq = elv_next_request(q); 813 rq = blk_fetch_request(q);
815 if (!rq) 814 if (!rq)
816 break; 815 break;
817 816
818 blkdev_dequeue_request(rq);
819
820 crq = rq->special; 817 crq = rq->special;
821 assert(crq != NULL); 818 assert(crq != NULL);
822 assert(crq->rq == rq); 819 assert(crq->rq == rq);
@@ -847,7 +844,7 @@ static void carm_rq_fn(struct request_queue *q)
847 844
848queue_one_request: 845queue_one_request:
849 VPRINTK("get req\n"); 846 VPRINTK("get req\n");
850 rq = elv_next_request(q); 847 rq = blk_peek_request(q);
851 if (!rq) 848 if (!rq)
852 return; 849 return;
853 850
@@ -858,7 +855,7 @@ queue_one_request:
858 } 855 }
859 crq->rq = rq; 856 crq->rq = rq;
860 857
861 blkdev_dequeue_request(rq); 858 blk_start_request(rq);
862 859
863 if (rq_data_dir(rq) == WRITE) { 860 if (rq_data_dir(rq) == WRITE) {
864 writing = 1; 861 writing = 1;
@@ -904,10 +901,10 @@ queue_one_request:
904 msg->sg_count = n_elem; 901 msg->sg_count = n_elem;
905 msg->sg_type = SGT_32BIT; 902 msg->sg_type = SGT_32BIT;
906 msg->handle = cpu_to_le32(TAG_ENCODE(crq->tag)); 903 msg->handle = cpu_to_le32(TAG_ENCODE(crq->tag));
907 msg->lba = cpu_to_le32(rq->sector & 0xffffffff); 904 msg->lba = cpu_to_le32(blk_rq_pos(rq) & 0xffffffff);
908 tmp = (rq->sector >> 16) >> 16; 905 tmp = (blk_rq_pos(rq) >> 16) >> 16;
909 msg->lba_high = cpu_to_le16( (u16) tmp ); 906 msg->lba_high = cpu_to_le16( (u16) tmp );
910 msg->lba_count = cpu_to_le16(rq->nr_sectors); 907 msg->lba_count = cpu_to_le16(blk_rq_sectors(rq));
911 908
912 msg_size = sizeof(struct carm_msg_rw) - sizeof(msg->sg); 909 msg_size = sizeof(struct carm_msg_rw) - sizeof(msg->sg);
913 for (i = 0; i < n_elem; i++) { 910 for (i = 0; i < n_elem; i++) {