aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 561901b1cf11..9e267c6d3a43 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -360,7 +360,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
360 } 360 }
361 361
362 if (s_size != 512 && s_size != 1024 && s_size != 2048) { 362 if (s_size != 512 && s_size != 1024 && s_size != 2048) {
363 printk("sr: bad sector size %d\n", s_size); 363 sdev_printk(KERN_ERR, SCpnt->device, "bad sector size %d\n", s_size);
364 return 0; 364 return 0;
365 } 365 }
366 366
@@ -385,8 +385,9 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
385 size += sg[i].length; 385 size += sg[i].length;
386 386
387 if (size != SCpnt->request_bufflen && SCpnt->use_sg) { 387 if (size != SCpnt->request_bufflen && SCpnt->use_sg) {
388 printk(KERN_ERR "sr: mismatch count %d, bytes %d\n", 388 sdev_printk(KERN_ERR, SCpnt->device,
389 size, SCpnt->request_bufflen); 389 "mismatch count %d, bytes %d\n",
390 size, SCpnt->request_bufflen);
390 if (SCpnt->request_bufflen > size) 391 if (SCpnt->request_bufflen > size)
391 SCpnt->request_bufflen = SCpnt->bufflen = size; 392 SCpnt->request_bufflen = SCpnt->bufflen = size;
392 } 393 }
@@ -397,7 +398,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
397 */ 398 */
398 if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) || 399 if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) ||
399 (SCpnt->request_bufflen % s_size)) { 400 (SCpnt->request_bufflen % s_size)) {
400 printk("sr: unaligned transfer\n"); 401 sdev_printk(KERN_NOTICE, SCpnt->device, "unaligned transfer\n");
401 return 0; 402 return 0;
402 } 403 }
403 404
@@ -622,10 +623,8 @@ static int sr_probe(struct device *dev)
622 disk->flags |= GENHD_FL_REMOVABLE; 623 disk->flags |= GENHD_FL_REMOVABLE;
623 add_disk(disk); 624 add_disk(disk);
624 625
625 printk(KERN_DEBUG 626 sdev_printk(KERN_DEBUG, sdev,
626 "Attached scsi CD-ROM %s at scsi%d, channel %d, id %d, lun %d\n", 627 "Attached scsi CD-ROM %s\n", cd->cdi.name);
627 cd->cdi.name, sdev->host->host_no, sdev->channel,
628 sdev->id, sdev->lun);
629 return 0; 628 return 0;
630 629
631fail_put: 630fail_put: