Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213625
b: refs/heads/master
c: 8e04d80
h: refs/heads/master
i:
  213623: 4f9dc1a
v: v3
  • Loading branch information
Hans de Goede authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent a467317 commit 044d24e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 319feaabb6c7ccd90da6e3207563c265da7d21ae
refs/heads/master: 8e04d8056c1ea0e0aab730994b74756f0526cda8
8 changes: 7 additions & 1 deletion trunk/drivers/scsi/sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/scsi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ struct scsi_device {
unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */
unsigned last_sector_bug:1; /* do not use multisector accesses on
SD_LAST_BUGGY_SECTORS */
unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */
unsigned is_visible:1; /* is the device visible in sysfs */

DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
Expand Down

0 comments on commit 044d24e

Please sign in to comment.