pktcdvd.c (086fa5ff0854c676ec333760f4c0154b3b242616) | pktcdvd.c (8a78362c4eefc1deddbefe2c7f38aabbc2429d6b) |
---|---|
1/* 2 * Copyright (C) 2000 Jens Axboe <axboe@suse.de> 3 * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com> 4 * Copyright (C) 2006 Thomas Maier <balagi@justmail.de> 5 * 6 * May be copied or modified under the terms of the GNU General Public 7 * License. See linux/COPYING for more information. 8 * --- 936 unchanged lines hidden (view full) --- 945 946/* 947 * Special care is needed if the underlying block device has a small 948 * max_phys_segments value. 949 */ 950static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) 951{ 952 if ((pd->settings.size << 9) / CD_FRAMESIZE | 1/* 2 * Copyright (C) 2000 Jens Axboe <axboe@suse.de> 3 * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com> 4 * Copyright (C) 2006 Thomas Maier <balagi@justmail.de> 5 * 6 * May be copied or modified under the terms of the GNU General Public 7 * License. See linux/COPYING for more information. 8 * --- 936 unchanged lines hidden (view full) --- 945 946/* 947 * Special care is needed if the underlying block device has a small 948 * max_phys_segments value. 949 */ 950static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) 951{ 952 if ((pd->settings.size << 9) / CD_FRAMESIZE |
953 <= queue_max_phys_segments(q)) { | 953 <= queue_max_segments(q)) { |
954 /* 955 * The cdrom device can handle one segment/frame 956 */ 957 clear_bit(PACKET_MERGE_SEGS, &pd->flags); 958 return 0; 959 } else if ((pd->settings.size << 9) / PAGE_SIZE | 954 /* 955 * The cdrom device can handle one segment/frame 956 */ 957 clear_bit(PACKET_MERGE_SEGS, &pd->flags); 958 return 0; 959 } else if ((pd->settings.size << 9) / PAGE_SIZE |
960 <= queue_max_phys_segments(q)) { | 960 <= queue_max_segments(q)) { |
961 /* 962 * We can handle this case at the expense of some extra memory 963 * copies during write operations 964 */ 965 set_bit(PACKET_MERGE_SEGS, &pd->flags); 966 return 0; 967 } else { 968 printk(DRIVER_NAME": cdrom max_phys_segments too small\n"); --- 2124 unchanged lines hidden --- | 961 /* 962 * We can handle this case at the expense of some extra memory 963 * copies during write operations 964 */ 965 set_bit(PACKET_MERGE_SEGS, &pd->flags); 966 return 0; 967 } else { 968 printk(DRIVER_NAME": cdrom max_phys_segments too small\n"); --- 2124 unchanged lines hidden --- |