linux-stable-rt/drivers
Alan Stern 44ec95425c [SCSI] sg: cap reserved_size values at max_sectors
This patch (as857) modifies the SG_GET_RESERVED_SIZE and
SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
the device's request_queue's max_sectors value.  This will permit
cdrecord to obtain a legal value for the maximum transfer length,
fixing Bugzilla #7026.

The patch also caps the initial reserved_size value.  There's no
reason to have a reserved buffer larger than max_sectors, since it
would be impossible to use the extra space.

The corresponding ioctls in the block layer are modified similarly,
and the initial value for the reserved_size is set as large as
possible.  This will effectively make it default to max_sectors.
Note that the actual value is meaningless anyway, since block devices
don't have a reserved buffer.

Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
uniform way for users to determine the actual max_sectors value for
any raw SCSI transport.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-17 18:09:56 -04:00
..
acorn
acpi Pull misc-for-upstream into release branch 2007-03-09 23:19:50 -05:00
amba
ata Pull bugzilla-7907 into release branch 2007-03-09 23:18:53 -05:00
atm
auxdisplay
base driver core: export device_rename 2007-03-09 15:32:58 -08:00
block
bluetooth
cdrom
char
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c
ide
ieee1394
infiniband [SCSI] iscsi: rename DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 2007-03-11 11:26:50 -05:00
input
isdn
kvm
leds
macintosh
mca
md
media
message [SCSI] fusion: make mptspi_target_destroy() static 2007-04-01 10:11:54 -05:00
mfd
misc asus-laptop: make code static 2007-03-09 21:06:40 -05:00
mmc
mtd
net Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-03-09 11:58:11 -05:00
nubus
oprofile
parisc
parport
pci pci: fix section mismatch warning 2007-03-09 15:36:30 -08:00
pcmcia
pnp
ps3
rapidio
rtc
s390 [SCSI] zfcp: fix initialization of FSF timer 2007-04-01 10:27:58 -05:00
sbus
scsi [SCSI] sg: cap reserved_size values at max_sectors 2007-04-17 18:09:56 -04:00
serial
sh
sn
spi
tc
telephony
usb Revert "USB: pxa2xx_udc: fix hardcoded irq number" 2007-03-10 14:22:07 -08:00
video
w1
zorro
Kconfig
Makefile