diff options
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 561901b1cf11..d68cea753bb2 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 | scmd_printk(KERN_ERR, SCpnt, "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 | scmd_printk(KERN_ERR, SCpnt, |
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 | scmd_printk(KERN_NOTICE, SCpnt, "unaligned transfer\n"); |
401 | return 0; | 402 | return 0; |
402 | } | 403 | } |
403 | 404 | ||
@@ -455,7 +456,7 @@ queue: | |||
455 | static int sr_block_open(struct inode *inode, struct file *file) | 456 | static int sr_block_open(struct inode *inode, struct file *file) |
456 | { | 457 | { |
457 | struct gendisk *disk = inode->i_bdev->bd_disk; | 458 | struct gendisk *disk = inode->i_bdev->bd_disk; |
458 | struct scsi_cd *cd = scsi_cd(inode->i_bdev->bd_disk); | 459 | struct scsi_cd *cd; |
459 | int ret = 0; | 460 | int ret = 0; |
460 | 461 | ||
461 | if(!(cd = scsi_cd_get(disk))) | 462 | if(!(cd = scsi_cd_get(disk))) |
@@ -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 | ||
631 | fail_put: | 630 | fail_put: |