diff options
Diffstat (limited to 'drivers/block/cpqarray.c')
-rw-r--r-- | drivers/block/cpqarray.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index ca268ca11159..44fa2018f6b0 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -474,7 +474,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev) | |||
474 | disk->fops = &ida_fops; | 474 | disk->fops = &ida_fops; |
475 | if (j && !drv->nr_blks) | 475 | if (j && !drv->nr_blks) |
476 | continue; | 476 | continue; |
477 | blk_queue_hardsect_size(hba[i]->queue, drv->blk_size); | 477 | blk_queue_logical_block_size(hba[i]->queue, drv->blk_size); |
478 | set_capacity(disk, drv->nr_blks); | 478 | set_capacity(disk, drv->nr_blks); |
479 | disk->queue = hba[i]->queue; | 479 | disk->queue = hba[i]->queue; |
480 | disk->private_data = drv; | 480 | disk->private_data = drv; |
@@ -903,7 +903,7 @@ static void do_ida_request(struct request_queue *q) | |||
903 | goto startio; | 903 | goto startio; |
904 | 904 | ||
905 | queue_next: | 905 | queue_next: |
906 | creq = elv_next_request(q); | 906 | creq = blk_peek_request(q); |
907 | if (!creq) | 907 | if (!creq) |
908 | goto startio; | 908 | goto startio; |
909 | 909 | ||
@@ -912,17 +912,18 @@ queue_next: | |||
912 | if ((c = cmd_alloc(h,1)) == NULL) | 912 | if ((c = cmd_alloc(h,1)) == NULL) |
913 | goto startio; | 913 | goto startio; |
914 | 914 | ||
915 | blkdev_dequeue_request(creq); | 915 | blk_start_request(creq); |
916 | 916 | ||
917 | c->ctlr = h->ctlr; | 917 | c->ctlr = h->ctlr; |
918 | c->hdr.unit = (drv_info_t *)(creq->rq_disk->private_data) - h->drv; | 918 | c->hdr.unit = (drv_info_t *)(creq->rq_disk->private_data) - h->drv; |
919 | c->hdr.size = sizeof(rblk_t) >> 2; | 919 | c->hdr.size = sizeof(rblk_t) >> 2; |
920 | c->size += sizeof(rblk_t); | 920 | c->size += sizeof(rblk_t); |
921 | 921 | ||
922 | c->req.hdr.blk = creq->sector; | 922 | c->req.hdr.blk = blk_rq_pos(creq); |
923 | c->rq = creq; | 923 | c->rq = creq; |
924 | DBGPX( | 924 | DBGPX( |
925 | printk("sector=%d, nr_sectors=%d\n", creq->sector, creq->nr_sectors); | 925 | printk("sector=%d, nr_sectors=%u\n", |
926 | blk_rq_pos(creq), blk_rq_sectors(creq)); | ||
926 | ); | 927 | ); |
927 | sg_init_table(tmp_sg, SG_MAX); | 928 | sg_init_table(tmp_sg, SG_MAX); |
928 | seg = blk_rq_map_sg(q, creq, tmp_sg); | 929 | seg = blk_rq_map_sg(q, creq, tmp_sg); |
@@ -940,9 +941,9 @@ DBGPX( | |||
940 | tmp_sg[i].offset, | 941 | tmp_sg[i].offset, |
941 | tmp_sg[i].length, dir); | 942 | tmp_sg[i].length, dir); |
942 | } | 943 | } |
943 | DBGPX( printk("Submitting %d sectors in %d segments\n", creq->nr_sectors, seg); ); | 944 | DBGPX( printk("Submitting %u sectors in %d segments\n", blk_rq_sectors(creq), seg); ); |
944 | c->req.hdr.sg_cnt = seg; | 945 | c->req.hdr.sg_cnt = seg; |
945 | c->req.hdr.blk_cnt = creq->nr_sectors; | 946 | c->req.hdr.blk_cnt = blk_rq_sectors(creq); |
946 | c->req.hdr.cmd = (rq_data_dir(creq) == READ) ? IDA_READ : IDA_WRITE; | 947 | c->req.hdr.cmd = (rq_data_dir(creq) == READ) ? IDA_READ : IDA_WRITE; |
947 | c->type = CMD_RWREQ; | 948 | c->type = CMD_RWREQ; |
948 | 949 | ||
@@ -1024,8 +1025,7 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) | |||
1024 | cmd->req.sg[i].size, ddir); | 1025 | cmd->req.sg[i].size, ddir); |
1025 | 1026 | ||
1026 | DBGPX(printk("Done with %p\n", rq);); | 1027 | DBGPX(printk("Done with %p\n", rq);); |
1027 | if (__blk_end_request(rq, error, blk_rq_bytes(rq))) | 1028 | __blk_end_request_all(rq, error); |
1028 | BUG(); | ||
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | /* | 1031 | /* |
@@ -1546,7 +1546,7 @@ static int revalidate_allvol(ctlr_info_t *host) | |||
1546 | drv_info_t *drv = &host->drv[i]; | 1546 | drv_info_t *drv = &host->drv[i]; |
1547 | if (i && !drv->nr_blks) | 1547 | if (i && !drv->nr_blks) |
1548 | continue; | 1548 | continue; |
1549 | blk_queue_hardsect_size(host->queue, drv->blk_size); | 1549 | blk_queue_logical_block_size(host->queue, drv->blk_size); |
1550 | set_capacity(disk, drv->nr_blks); | 1550 | set_capacity(disk, drv->nr_blks); |
1551 | disk->queue = host->queue; | 1551 | disk->queue = host->queue; |
1552 | disk->private_data = drv; | 1552 | disk->private_data = drv; |