summaryrefslogtreecommitdiff
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 20:30:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 20:30:48 -0700
commit5cc103506289de7ee0a0b526ae0381541990cad4 (patch)
treeae8a4958e70c6d1295030b40e333dcc007b3c074 /drivers/scsi/sr.c
parent73ecf3a6e3f0206bf56a0fefe3b3eda042fb7034 (diff)
parent92ca0dc5ee022e4c0e488177e1d8865a0778c6c2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (141 commits) USB: mct_u232: fix broken close USB: gadget: amd5536udc.c: fix error path USB: imx21-hcd - fix off by one resource size calculation usb: gadget: fix Kconfig warning usb: r8a66597-udc: Add processing when USB was removed. mxc_udc: add workaround for ENGcm09152 for i.MX35 USB: ftdi_sio: add device ids for ScienceScope USB: musb: AM35x: Workaround for fifo read issue USB: musb: add musb support for AM35x USB: AM35x: Add musb support usb: Fix linker errors with CONFIG_PM=n USB: ohci-sh - use resource_size instead of defining its own resource_len macro USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro USB: xhci: Fix compile error when CONFIG_PM=n USB: accept some invalid ep0-maxpacket values USB: xHCI: PCI power management implementation USB: xHCI: bus power management implementation USB: xHCI: port remote wakeup implementation USB: xHCI: port power management implementation ... Manually fix up (non-data) conflict: the SCSI merge gad renamed the 'hw_sector_size' member to 'physical_block_size', and the USB tree brought a new use of it.
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index e148341079b5..d7b383c96d5d 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -862,10 +862,16 @@ static void get_capabilities(struct scsi_cd *cd)
static int sr_packet(struct cdrom_device_info *cdi,
struct packet_command *cgc)
{
+ struct scsi_cd *cd = cdi->handle;
+ struct scsi_device *sdev = cd->device;
+
+ if (cgc->cmd[0] == GPCMD_READ_DISC_INFO && sdev->no_read_disc_info)
+ return -EDRIVE_CANT_DO_THIS;
+
if (cgc->timeout <= 0)
cgc->timeout = IOCTL_TIMEOUT;
- sr_do_ioctl(cdi->handle, cgc);
+ sr_do_ioctl(cd, cgc);
return cgc->stat;
}