diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
commit | 82681a318f9f028ea64e61f24bbd9ac535531921 (patch) | |
tree | 529b6a5b4fd040fb54b7672b1a224ebd47445876 /drivers/s390 | |
parent | 3860c97bd60a4525bb62eb90e3e7d2f02662ac59 (diff) | |
parent | 8ebf975608aaebd7feb33d77f07ba21a6380e086 (diff) |
[SCSI] Merge branch 'linus'
Conflicts:
drivers/message/fusion/mptsas.c
fixed up conflict between req->data_len accessors and mptsas driver updates.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd.c | 37 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 5 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 6 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 7 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/xpram.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 26 |
9 files changed, 33 insertions, 56 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index d1815272c435..27a1be0cd4d4 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -603,7 +603,7 @@ static void dasd_profile_end(struct dasd_block *block, | |||
603 | if (dasd_profile_level != DASD_PROFILE_ON) | 603 | if (dasd_profile_level != DASD_PROFILE_ON) |
604 | return; | 604 | return; |
605 | 605 | ||
606 | sectors = req->nr_sectors; | 606 | sectors = blk_rq_sectors(req); |
607 | if (!cqr->buildclk || !cqr->startclk || | 607 | if (!cqr->buildclk || !cqr->startclk || |
608 | !cqr->stopclk || !cqr->endclk || | 608 | !cqr->stopclk || !cqr->endclk || |
609 | !sectors) | 609 | !sectors) |
@@ -1614,15 +1614,6 @@ void dasd_block_clear_timer(struct dasd_block *block) | |||
1614 | } | 1614 | } |
1615 | 1615 | ||
1616 | /* | 1616 | /* |
1617 | * posts the buffer_cache about a finalized request | ||
1618 | */ | ||
1619 | static inline void dasd_end_request(struct request *req, int error) | ||
1620 | { | ||
1621 | if (__blk_end_request(req, error, blk_rq_bytes(req))) | ||
1622 | BUG(); | ||
1623 | } | ||
1624 | |||
1625 | /* | ||
1626 | * Process finished error recovery ccw. | 1617 | * Process finished error recovery ccw. |
1627 | */ | 1618 | */ |
1628 | static inline void __dasd_block_process_erp(struct dasd_block *block, | 1619 | static inline void __dasd_block_process_erp(struct dasd_block *block, |
@@ -1665,18 +1656,14 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1665 | if (basedev->state < DASD_STATE_READY) | 1656 | if (basedev->state < DASD_STATE_READY) |
1666 | return; | 1657 | return; |
1667 | /* Now we try to fetch requests from the request queue */ | 1658 | /* Now we try to fetch requests from the request queue */ |
1668 | while (!blk_queue_plugged(queue) && | 1659 | while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) { |
1669 | elv_next_request(queue)) { | ||
1670 | |||
1671 | req = elv_next_request(queue); | ||
1672 | |||
1673 | if (basedev->features & DASD_FEATURE_READONLY && | 1660 | if (basedev->features & DASD_FEATURE_READONLY && |
1674 | rq_data_dir(req) == WRITE) { | 1661 | rq_data_dir(req) == WRITE) { |
1675 | DBF_DEV_EVENT(DBF_ERR, basedev, | 1662 | DBF_DEV_EVENT(DBF_ERR, basedev, |
1676 | "Rejecting write request %p", | 1663 | "Rejecting write request %p", |
1677 | req); | 1664 | req); |
1678 | blkdev_dequeue_request(req); | 1665 | blk_start_request(req); |
1679 | dasd_end_request(req, -EIO); | 1666 | __blk_end_request_all(req, -EIO); |
1680 | continue; | 1667 | continue; |
1681 | } | 1668 | } |
1682 | cqr = basedev->discipline->build_cp(basedev, block, req); | 1669 | cqr = basedev->discipline->build_cp(basedev, block, req); |
@@ -1704,8 +1691,8 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1704 | "CCW creation failed (rc=%ld) " | 1691 | "CCW creation failed (rc=%ld) " |
1705 | "on request %p", | 1692 | "on request %p", |
1706 | PTR_ERR(cqr), req); | 1693 | PTR_ERR(cqr), req); |
1707 | blkdev_dequeue_request(req); | 1694 | blk_start_request(req); |
1708 | dasd_end_request(req, -EIO); | 1695 | __blk_end_request_all(req, -EIO); |
1709 | continue; | 1696 | continue; |
1710 | } | 1697 | } |
1711 | /* | 1698 | /* |
@@ -1714,7 +1701,7 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1714 | */ | 1701 | */ |
1715 | cqr->callback_data = (void *) req; | 1702 | cqr->callback_data = (void *) req; |
1716 | cqr->status = DASD_CQR_FILLED; | 1703 | cqr->status = DASD_CQR_FILLED; |
1717 | blkdev_dequeue_request(req); | 1704 | blk_start_request(req); |
1718 | list_add_tail(&cqr->blocklist, &block->ccw_queue); | 1705 | list_add_tail(&cqr->blocklist, &block->ccw_queue); |
1719 | dasd_profile_start(block, cqr, req); | 1706 | dasd_profile_start(block, cqr, req); |
1720 | } | 1707 | } |
@@ -1731,7 +1718,7 @@ static void __dasd_cleanup_cqr(struct dasd_ccw_req *cqr) | |||
1731 | status = cqr->block->base->discipline->free_cp(cqr, req); | 1718 | status = cqr->block->base->discipline->free_cp(cqr, req); |
1732 | if (status <= 0) | 1719 | if (status <= 0) |
1733 | error = status ? status : -EIO; | 1720 | error = status ? status : -EIO; |
1734 | dasd_end_request(req, error); | 1721 | __blk_end_request_all(req, error); |
1735 | } | 1722 | } |
1736 | 1723 | ||
1737 | /* | 1724 | /* |
@@ -2003,7 +1990,7 @@ static void dasd_setup_queue(struct dasd_block *block) | |||
2003 | { | 1990 | { |
2004 | int max; | 1991 | int max; |
2005 | 1992 | ||
2006 | blk_queue_hardsect_size(block->request_queue, block->bp_block); | 1993 | blk_queue_logical_block_size(block->request_queue, block->bp_block); |
2007 | max = block->base->discipline->max_blocks << block->s2b_shift; | 1994 | max = block->base->discipline->max_blocks << block->s2b_shift; |
2008 | blk_queue_max_sectors(block->request_queue, max); | 1995 | blk_queue_max_sectors(block->request_queue, max); |
2009 | blk_queue_max_phys_segments(block->request_queue, -1L); | 1996 | blk_queue_max_phys_segments(block->request_queue, -1L); |
@@ -2038,10 +2025,8 @@ static void dasd_flush_request_queue(struct dasd_block *block) | |||
2038 | return; | 2025 | return; |
2039 | 2026 | ||
2040 | spin_lock_irq(&block->request_queue_lock); | 2027 | spin_lock_irq(&block->request_queue_lock); |
2041 | while ((req = elv_next_request(block->request_queue))) { | 2028 | while ((req = blk_fetch_request(block->request_queue))) |
2042 | blkdev_dequeue_request(req); | 2029 | __blk_end_request_all(req, -EIO); |
2043 | dasd_end_request(req, -EIO); | ||
2044 | } | ||
2045 | spin_unlock_irq(&block->request_queue_lock); | 2030 | spin_unlock_irq(&block->request_queue_lock); |
2046 | } | 2031 | } |
2047 | 2032 | ||
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index b9a7f7733446..2efaddfae560 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -505,8 +505,9 @@ static struct dasd_ccw_req *dasd_diag_build_cp(struct dasd_device *memdev, | |||
505 | return ERR_PTR(-EINVAL); | 505 | return ERR_PTR(-EINVAL); |
506 | blksize = block->bp_block; | 506 | blksize = block->bp_block; |
507 | /* Calculate record id of first and last block. */ | 507 | /* Calculate record id of first and last block. */ |
508 | first_rec = req->sector >> block->s2b_shift; | 508 | first_rec = blk_rq_pos(req) >> block->s2b_shift; |
509 | last_rec = (req->sector + req->nr_sectors - 1) >> block->s2b_shift; | 509 | last_rec = |
510 | (blk_rq_pos(req) + blk_rq_sectors(req) - 1) >> block->s2b_shift; | ||
510 | /* Check struct bio and count the number of blocks for the request. */ | 511 | /* Check struct bio and count the number of blocks for the request. */ |
511 | count = 0; | 512 | count = 0; |
512 | rq_for_each_segment(bv, req, iter) { | 513 | rq_for_each_segment(bv, req, iter) { |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index cb52da033f06..a41c94053e64 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -2354,10 +2354,10 @@ static struct dasd_ccw_req *dasd_eckd_build_cp(struct dasd_device *startdev, | |||
2354 | blksize = block->bp_block; | 2354 | blksize = block->bp_block; |
2355 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); | 2355 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); |
2356 | /* Calculate record id of first and last block. */ | 2356 | /* Calculate record id of first and last block. */ |
2357 | first_rec = first_trk = req->sector >> block->s2b_shift; | 2357 | first_rec = first_trk = blk_rq_pos(req) >> block->s2b_shift; |
2358 | first_offs = sector_div(first_trk, blk_per_trk); | 2358 | first_offs = sector_div(first_trk, blk_per_trk); |
2359 | last_rec = last_trk = | 2359 | last_rec = last_trk = |
2360 | (req->sector + req->nr_sectors - 1) >> block->s2b_shift; | 2360 | (blk_rq_pos(req) + blk_rq_sectors(req) - 1) >> block->s2b_shift; |
2361 | last_offs = sector_div(last_trk, blk_per_trk); | 2361 | last_offs = sector_div(last_trk, blk_per_trk); |
2362 | cdlspecial = (private->uses_cdl && first_rec < 2*blk_per_trk); | 2362 | cdlspecial = (private->uses_cdl && first_rec < 2*blk_per_trk); |
2363 | 2363 | ||
@@ -2420,7 +2420,7 @@ dasd_eckd_free_cp(struct dasd_ccw_req *cqr, struct request *req) | |||
2420 | private = (struct dasd_eckd_private *) cqr->block->base->private; | 2420 | private = (struct dasd_eckd_private *) cqr->block->base->private; |
2421 | blksize = cqr->block->bp_block; | 2421 | blksize = cqr->block->bp_block; |
2422 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); | 2422 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); |
2423 | recid = req->sector >> cqr->block->s2b_shift; | 2423 | recid = blk_rq_pos(req) >> cqr->block->s2b_shift; |
2424 | ccw = cqr->cpaddr; | 2424 | ccw = cqr->cpaddr; |
2425 | /* Skip over define extent & locate record. */ | 2425 | /* Skip over define extent & locate record. */ |
2426 | ccw++; | 2426 | ccw++; |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index a3eb6fd14673..8912358daa2f 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -270,8 +270,9 @@ static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev, | |||
270 | return ERR_PTR(-EINVAL); | 270 | return ERR_PTR(-EINVAL); |
271 | blksize = block->bp_block; | 271 | blksize = block->bp_block; |
272 | /* Calculate record id of first and last block. */ | 272 | /* Calculate record id of first and last block. */ |
273 | first_rec = req->sector >> block->s2b_shift; | 273 | first_rec = blk_rq_pos(req) >> block->s2b_shift; |
274 | last_rec = (req->sector + req->nr_sectors - 1) >> block->s2b_shift; | 274 | last_rec = |
275 | (blk_rq_pos(req) + blk_rq_sectors(req) - 1) >> block->s2b_shift; | ||
275 | /* Check struct bio and count the number of blocks for the request. */ | 276 | /* Check struct bio and count the number of blocks for the request. */ |
276 | count = 0; | 277 | count = 0; |
277 | cidaw = 0; | 278 | cidaw = 0; |
@@ -309,7 +310,7 @@ static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev, | |||
309 | ccw = cqr->cpaddr; | 310 | ccw = cqr->cpaddr; |
310 | /* First ccw is define extent. */ | 311 | /* First ccw is define extent. */ |
311 | define_extent(ccw++, cqr->data, rq_data_dir(req), | 312 | define_extent(ccw++, cqr->data, rq_data_dir(req), |
312 | block->bp_block, req->sector, req->nr_sectors); | 313 | block->bp_block, blk_rq_pos(req), blk_rq_sectors(req)); |
313 | /* Build locate_record + read/write ccws. */ | 314 | /* Build locate_record + read/write ccws. */ |
314 | idaws = (unsigned long *) (cqr->data + sizeof(struct DE_fba_data)); | 315 | idaws = (unsigned long *) (cqr->data + sizeof(struct DE_fba_data)); |
315 | LO_data = (struct LO_fba_data *) (idaws + cidaw); | 316 | LO_data = (struct LO_fba_data *) (idaws + cidaw); |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index cfdcf1aed33c..a4c7ffcd9987 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -602,7 +602,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char | |||
602 | dev_info->gd->private_data = dev_info; | 602 | dev_info->gd->private_data = dev_info; |
603 | dev_info->gd->driverfs_dev = &dev_info->dev; | 603 | dev_info->gd->driverfs_dev = &dev_info->dev; |
604 | blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request); | 604 | blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request); |
605 | blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096); | 605 | blk_queue_logical_block_size(dev_info->dcssblk_queue, 4096); |
606 | 606 | ||
607 | seg_byte_size = (dev_info->end - dev_info->start + 1); | 607 | seg_byte_size = (dev_info->end - dev_info->start + 1); |
608 | set_capacity(dev_info->gd, seg_byte_size >> 9); // size in sectors | 608 | set_capacity(dev_info->gd, seg_byte_size >> 9); // size in sectors |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 76814f3e898a..0ae0c83ef879 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -343,7 +343,7 @@ static int __init xpram_setup_blkdev(void) | |||
343 | goto out; | 343 | goto out; |
344 | } | 344 | } |
345 | blk_queue_make_request(xpram_queues[i], xpram_make_request); | 345 | blk_queue_make_request(xpram_queues[i], xpram_make_request); |
346 | blk_queue_hardsect_size(xpram_queues[i], 4096); | 346 | blk_queue_logical_block_size(xpram_queues[i], 4096); |
347 | } | 347 | } |
348 | 348 | ||
349 | /* | 349 | /* |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 5f8e8ef43dd3..2d00a383a475 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -1134,7 +1134,7 @@ tape_34xx_bread(struct tape_device *device, struct request *req) | |||
1134 | /* Setup ccws. */ | 1134 | /* Setup ccws. */ |
1135 | request->op = TO_BLOCK; | 1135 | request->op = TO_BLOCK; |
1136 | start_block = (struct tape_34xx_block_id *) request->cpdata; | 1136 | start_block = (struct tape_34xx_block_id *) request->cpdata; |
1137 | start_block->block = req->sector >> TAPEBLOCK_HSEC_S2B; | 1137 | start_block->block = blk_rq_pos(req) >> TAPEBLOCK_HSEC_S2B; |
1138 | DBF_EVENT(6, "start_block = %i\n", start_block->block); | 1138 | DBF_EVENT(6, "start_block = %i\n", start_block->block); |
1139 | 1139 | ||
1140 | ccw = request->cpaddr; | 1140 | ccw = request->cpaddr; |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 823b05bd0dd7..c453b2f3e9f4 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -633,7 +633,7 @@ tape_3590_bread(struct tape_device *device, struct request *req) | |||
633 | struct req_iterator iter; | 633 | struct req_iterator iter; |
634 | 634 | ||
635 | DBF_EVENT(6, "xBREDid:"); | 635 | DBF_EVENT(6, "xBREDid:"); |
636 | start_block = req->sector >> TAPEBLOCK_HSEC_S2B; | 636 | start_block = blk_rq_pos(req) >> TAPEBLOCK_HSEC_S2B; |
637 | DBF_EVENT(6, "start_block = %i\n", start_block); | 637 | DBF_EVENT(6, "start_block = %i\n", start_block); |
638 | 638 | ||
639 | rq_for_each_segment(bv, req, iter) | 639 | rq_for_each_segment(bv, req, iter) |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index f32e89e7c4f2..47ff695255ea 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -74,13 +74,6 @@ tapeblock_trigger_requeue(struct tape_device *device) | |||
74 | * Post finished request. | 74 | * Post finished request. |
75 | */ | 75 | */ |
76 | static void | 76 | static void |
77 | tapeblock_end_request(struct request *req, int error) | ||
78 | { | ||
79 | if (blk_end_request(req, error, blk_rq_bytes(req))) | ||
80 | BUG(); | ||
81 | } | ||
82 | |||
83 | static void | ||
84 | __tapeblock_end_request(struct tape_request *ccw_req, void *data) | 77 | __tapeblock_end_request(struct tape_request *ccw_req, void *data) |
85 | { | 78 | { |
86 | struct tape_device *device; | 79 | struct tape_device *device; |
@@ -90,17 +83,17 @@ __tapeblock_end_request(struct tape_request *ccw_req, void *data) | |||
90 | 83 | ||
91 | device = ccw_req->device; | 84 | device = ccw_req->device; |
92 | req = (struct request *) data; | 85 | req = (struct request *) data; |
93 | tapeblock_end_request(req, (ccw_req->rc == 0) ? 0 : -EIO); | 86 | blk_end_request_all(req, (ccw_req->rc == 0) ? 0 : -EIO); |
94 | if (ccw_req->rc == 0) | 87 | if (ccw_req->rc == 0) |
95 | /* Update position. */ | 88 | /* Update position. */ |
96 | device->blk_data.block_position = | 89 | device->blk_data.block_position = |
97 | (req->sector + req->nr_sectors) >> TAPEBLOCK_HSEC_S2B; | 90 | (blk_rq_pos(req) + blk_rq_sectors(req)) >> TAPEBLOCK_HSEC_S2B; |
98 | else | 91 | else |
99 | /* We lost the position information due to an error. */ | 92 | /* We lost the position information due to an error. */ |
100 | device->blk_data.block_position = -1; | 93 | device->blk_data.block_position = -1; |
101 | device->discipline->free_bread(ccw_req); | 94 | device->discipline->free_bread(ccw_req); |
102 | if (!list_empty(&device->req_queue) || | 95 | if (!list_empty(&device->req_queue) || |
103 | elv_next_request(device->blk_data.request_queue)) | 96 | blk_peek_request(device->blk_data.request_queue)) |
104 | tapeblock_trigger_requeue(device); | 97 | tapeblock_trigger_requeue(device); |
105 | } | 98 | } |
106 | 99 | ||
@@ -118,7 +111,7 @@ tapeblock_start_request(struct tape_device *device, struct request *req) | |||
118 | ccw_req = device->discipline->bread(device, req); | 111 | ccw_req = device->discipline->bread(device, req); |
119 | if (IS_ERR(ccw_req)) { | 112 | if (IS_ERR(ccw_req)) { |
120 | DBF_EVENT(1, "TBLOCK: bread failed\n"); | 113 | DBF_EVENT(1, "TBLOCK: bread failed\n"); |
121 | tapeblock_end_request(req, -EIO); | 114 | blk_end_request_all(req, -EIO); |
122 | return PTR_ERR(ccw_req); | 115 | return PTR_ERR(ccw_req); |
123 | } | 116 | } |
124 | ccw_req->callback = __tapeblock_end_request; | 117 | ccw_req->callback = __tapeblock_end_request; |
@@ -131,7 +124,7 @@ tapeblock_start_request(struct tape_device *device, struct request *req) | |||
131 | * Start/enqueueing failed. No retries in | 124 | * Start/enqueueing failed. No retries in |
132 | * this case. | 125 | * this case. |
133 | */ | 126 | */ |
134 | tapeblock_end_request(req, -EIO); | 127 | blk_end_request_all(req, -EIO); |
135 | device->discipline->free_bread(ccw_req); | 128 | device->discipline->free_bread(ccw_req); |
136 | } | 129 | } |
137 | 130 | ||
@@ -169,19 +162,16 @@ tapeblock_requeue(struct work_struct *work) { | |||
169 | spin_lock_irq(&device->blk_data.request_queue_lock); | 162 | spin_lock_irq(&device->blk_data.request_queue_lock); |
170 | while ( | 163 | while ( |
171 | !blk_queue_plugged(queue) && | 164 | !blk_queue_plugged(queue) && |
172 | elv_next_request(queue) && | 165 | (req = blk_fetch_request(queue)) && |
173 | nr_queued < TAPEBLOCK_MIN_REQUEUE | 166 | nr_queued < TAPEBLOCK_MIN_REQUEUE |
174 | ) { | 167 | ) { |
175 | req = elv_next_request(queue); | ||
176 | if (rq_data_dir(req) == WRITE) { | 168 | if (rq_data_dir(req) == WRITE) { |
177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); | 169 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); |
178 | blkdev_dequeue_request(req); | ||
179 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 170 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
180 | tapeblock_end_request(req, -EIO); | 171 | blk_end_request_all(req, -EIO); |
181 | spin_lock_irq(&device->blk_data.request_queue_lock); | 172 | spin_lock_irq(&device->blk_data.request_queue_lock); |
182 | continue; | 173 | continue; |
183 | } | 174 | } |
184 | blkdev_dequeue_request(req); | ||
185 | nr_queued++; | 175 | nr_queued++; |
186 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 176 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
187 | rc = tapeblock_start_request(device, req); | 177 | rc = tapeblock_start_request(device, req); |
@@ -232,7 +222,7 @@ tapeblock_setup_device(struct tape_device * device) | |||
232 | if (rc) | 222 | if (rc) |
233 | goto cleanup_queue; | 223 | goto cleanup_queue; |
234 | 224 | ||
235 | blk_queue_hardsect_size(blkdat->request_queue, TAPEBLOCK_HSEC_SIZE); | 225 | blk_queue_logical_block_size(blkdat->request_queue, TAPEBLOCK_HSEC_SIZE); |
236 | blk_queue_max_sectors(blkdat->request_queue, TAPEBLOCK_MAX_SEC); | 226 | blk_queue_max_sectors(blkdat->request_queue, TAPEBLOCK_MAX_SEC); |
237 | blk_queue_max_phys_segments(blkdat->request_queue, -1L); | 227 | blk_queue_max_phys_segments(blkdat->request_queue, -1L); |
238 | blk_queue_max_hw_segments(blkdat->request_queue, -1L); | 228 | blk_queue_max_hw_segments(blkdat->request_queue, -1L); |