Commit c7e09574 authored by Christoph Hellwig's avatar Christoph Hellwig

sr: reduce debug noise in sr_do_ioctl

The midlayer scsi logging already logs the command and sense code
if the logging level is high enough, no need to duplicate that
in the sr driver.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJames Bottomley <JBottomley@Parallels.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
parent 63c6ea17
...@@ -188,7 +188,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) ...@@ -188,7 +188,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
struct scsi_sense_hdr sshdr; struct scsi_sense_hdr sshdr;
int result, err = 0, retries = 0; int result, err = 0, retries = 0;
struct request_sense *sense = cgc->sense; struct request_sense *sense = cgc->sense;
char logbuf[SCSI_LOG_BUFSIZE];
SDev = cd->device; SDev = cd->device;
...@@ -246,9 +245,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) ...@@ -246,9 +245,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
sr_printk(KERN_INFO, cd, sr_printk(KERN_INFO, cd,
"CDROM not ready. Make sure there " "CDROM not ready. Make sure there "
"is a disc in the drive.\n"); "is a disc in the drive.\n");
#ifdef DEBUG
scsi_print_sense_hdr(cd->device, cd->cdi.name, &sshdr);
#endif
err = -ENOMEDIUM; err = -ENOMEDIUM;
break; break;
case ILLEGAL_REQUEST: case ILLEGAL_REQUEST:
...@@ -257,22 +253,8 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) ...@@ -257,22 +253,8 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
sshdr.ascq == 0x00) sshdr.ascq == 0x00)
/* sense: Invalid command operation code */ /* sense: Invalid command operation code */
err = -EDRIVE_CANT_DO_THIS; err = -EDRIVE_CANT_DO_THIS;
#ifdef DEBUG
__scsi_format_command(logbuf, sizeof(logbuf),
cgc->cmd, CDROM_PACKET_SIZE);
sr_printk(KERN_INFO, cd,
"CDROM (ioctl) invalid command: %s\n",
logbuf);
scsi_print_sense_hdr(cd->device, cd->cdi.name, &sshdr);
#endif
break; break;
default: default:
__scsi_format_command(logbuf, sizeof(logbuf),
cgc->cmd, CDROM_PACKET_SIZE);
sr_printk(KERN_ERR, cd,
"CDROM (ioctl) error, command: %s\n",
logbuf);
scsi_print_sense_hdr(cd->device, cd->cdi.name, &sshdr);
err = -EIO; err = -EIO;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment