diff options
author | Steve French <sfrench@us.ibm.com> | 2005-11-09 14:33:22 -0800 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-11-09 14:33:22 -0800 |
commit | e82b3aec8d508d2a925a4c766e97f16b7c4dfb1b (patch) | |
tree | 69d5685ef0c194f651a03e30bff14628b4d45400 /drivers/scsi/sr.c | |
parent | ec58ef03284f0bfa50a04982b74c8c2325a0758e (diff) | |
parent | ad8f76be48d817b48222411ae16a7dfe257bdb24 (diff) | |
download | op-kernel-dev-e82b3aec8d508d2a925a4c766e97f16b7c4dfb1b.zip op-kernel-dev-e82b3aec8d508d2a925a4c766e97f16b7c4dfb1b.tar.gz |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 561901b..d68cea7 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -360,7 +360,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) } if (s_size != 512 && s_size != 1024 && s_size != 2048) { - printk("sr: bad sector size %d\n", s_size); + scmd_printk(KERN_ERR, SCpnt, "bad sector size %d\n", s_size); return 0; } @@ -385,8 +385,9 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) size += sg[i].length; if (size != SCpnt->request_bufflen && SCpnt->use_sg) { - printk(KERN_ERR "sr: mismatch count %d, bytes %d\n", - size, SCpnt->request_bufflen); + scmd_printk(KERN_ERR, SCpnt, + "mismatch count %d, bytes %d\n", + size, SCpnt->request_bufflen); if (SCpnt->request_bufflen > size) SCpnt->request_bufflen = SCpnt->bufflen = size; } @@ -397,7 +398,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) */ if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) || (SCpnt->request_bufflen % s_size)) { - printk("sr: unaligned transfer\n"); + scmd_printk(KERN_NOTICE, SCpnt, "unaligned transfer\n"); return 0; } @@ -455,7 +456,7 @@ queue: static int sr_block_open(struct inode *inode, struct file *file) { struct gendisk *disk = inode->i_bdev->bd_disk; - struct scsi_cd *cd = scsi_cd(inode->i_bdev->bd_disk); + struct scsi_cd *cd; int ret = 0; if(!(cd = scsi_cd_get(disk))) @@ -622,10 +623,8 @@ static int sr_probe(struct device *dev) disk->flags |= GENHD_FL_REMOVABLE; add_disk(disk); - printk(KERN_DEBUG - "Attached scsi CD-ROM %s at scsi%d, channel %d, id %d, lun %d\n", - cd->cdi.name, sdev->host->host_no, sdev->channel, - sdev->id, sdev->lun); + sdev_printk(KERN_DEBUG, sdev, + "Attached scsi CD-ROM %s\n", cd->cdi.name); return 0; fail_put: |