--- zzzz-none-000/linux-3.10.107/drivers/scsi/sr_vendor.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/scsi/sr_vendor.c 2021-02-04 17:41:59.000000000 +0000 @@ -123,7 +123,7 @@ return -ENOMEM; #ifdef DEBUG - printk("%s: MODE SELECT 0x%x/%d\n", cd->cdi.name, density, blocklength); + sr_printk(KERN_INFO, cd, "MODE SELECT 0x%x/%d\n", density, blocklength); #endif memset(&cgc, 0, sizeof(struct packet_command)); cgc.cmd[0] = MODE_SELECT; @@ -144,8 +144,9 @@ } #ifdef DEBUG else - printk("%s: switching blocklength to %d bytes failed\n", - cd->cdi.name, blocklength); + sr_printk(KERN_INFO, cd, + "switching blocklength to %d bytes failed\n", + blocklength); #endif kfree(buffer); return rc; @@ -190,8 +191,8 @@ if (rc != 0) break; if ((buffer[0] << 8) + buffer[1] < 0x0a) { - printk(KERN_INFO "%s: Hmm, seems the drive " - "doesn't support multisession CD's\n", cd->cdi.name); + sr_printk(KERN_INFO, cd, "Hmm, seems the drive " + "doesn't support multisession CD's\n"); no_multi = 1; break; } @@ -218,9 +219,9 @@ if (rc != 0) break; if (buffer[14] != 0 && buffer[14] != 0xb0) { - printk(KERN_INFO "%s: Hmm, seems the cdrom " - "doesn't support multisession CD's\n", - cd->cdi.name); + sr_printk(KERN_INFO, cd, "Hmm, seems the cdrom " + "doesn't support multisession CD's\n"); + no_multi = 1; break; } @@ -245,9 +246,8 @@ cgc.timeout = VENDOR_TIMEOUT; rc = sr_do_ioctl(cd, &cgc); if (rc == -EINVAL) { - printk(KERN_INFO "%s: Hmm, seems the drive " - "doesn't support multisession CD's\n", - cd->cdi.name); + sr_printk(KERN_INFO, cd, "Hmm, seems the drive " + "doesn't support multisession CD's\n"); no_multi = 1; break; } @@ -277,8 +277,8 @@ break; } if ((rc = buffer[2]) == 0) { - printk(KERN_WARNING - "%s: No finished session\n", cd->cdi.name); + sr_printk(KERN_WARNING, cd, + "No finished session\n"); break; } cgc.cmd[0] = READ_TOC; /* Read TOC */ @@ -301,9 +301,9 @@ default: /* should not happen */ - printk(KERN_WARNING - "%s: unknown vendor code (%i), not initialized ?\n", - cd->cdi.name, cd->vendor); + sr_printk(KERN_WARNING, cd, + "unknown vendor code (%i), not initialized ?\n", + cd->vendor); sector = 0; no_multi = 1; break; @@ -321,8 +321,8 @@ #ifdef DEBUG if (sector) - printk(KERN_DEBUG "%s: multisession offset=%lu\n", - cd->cdi.name, sector); + sr_printk(KERN_DEBUG, cd, "multisession offset=%lu\n", + sector); #endif kfree(buffer); return rc;