diff options
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index dc7a8c352da2..d57f11759480 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -991,13 +991,15 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd) | |||
991 | */ | 991 | */ |
992 | static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) | 992 | static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) |
993 | { | 993 | { |
994 | if ((pd->settings.size << 9) / CD_FRAMESIZE <= q->max_phys_segments) { | 994 | if ((pd->settings.size << 9) / CD_FRAMESIZE |
995 | <= queue_max_phys_segments(q)) { | ||
995 | /* | 996 | /* |
996 | * The cdrom device can handle one segment/frame | 997 | * The cdrom device can handle one segment/frame |
997 | */ | 998 | */ |
998 | clear_bit(PACKET_MERGE_SEGS, &pd->flags); | 999 | clear_bit(PACKET_MERGE_SEGS, &pd->flags); |
999 | return 0; | 1000 | return 0; |
1000 | } else if ((pd->settings.size << 9) / PAGE_SIZE <= q->max_phys_segments) { | 1001 | } else if ((pd->settings.size << 9) / PAGE_SIZE |
1002 | <= queue_max_phys_segments(q)) { | ||
1001 | /* | 1003 | /* |
1002 | * We can handle this case at the expense of some extra memory | 1004 | * We can handle this case at the expense of some extra memory |
1003 | * copies during write operations | 1005 | * copies during write operations |
@@ -2657,7 +2659,7 @@ static void pkt_init_queue(struct pktcdvd_device *pd) | |||
2657 | struct request_queue *q = pd->disk->queue; | 2659 | struct request_queue *q = pd->disk->queue; |
2658 | 2660 | ||
2659 | blk_queue_make_request(q, pkt_make_request); | 2661 | blk_queue_make_request(q, pkt_make_request); |
2660 | blk_queue_hardsect_size(q, CD_FRAMESIZE); | 2662 | blk_queue_logical_block_size(q, CD_FRAMESIZE); |
2661 | blk_queue_max_sectors(q, PACKET_MAX_SECTORS); | 2663 | blk_queue_max_sectors(q, PACKET_MAX_SECTORS); |
2662 | blk_queue_merge_bvec(q, pkt_merge_bvec); | 2664 | blk_queue_merge_bvec(q, pkt_merge_bvec); |
2663 | q->queuedata = pd; | 2665 | q->queuedata = pd; |