Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] qlogicpti: Some cosmetic changes

Change a printk sequencing issue where <6> ... was coming up in the middle
of a line when scsi_add_host was being called.
Reduce the length of some printk messages and make the messages
more consistant. All cosmetic but it makes it easier to read as it
scrolles off the screen during boot.

Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by

Mark Fortescue and committed by
James Bottomley
585a8a59 822b41f4

+29 -21
+29 -21
drivers/scsi/qlogicpti.c
··· 193 193 cpu_relax(); 194 194 } 195 195 if (!loop_count) 196 - printk(KERN_EMERG "qlogicpti: mbox_command loop timeout #1\n"); 196 + printk(KERN_EMERG "qlogicpti%d: mbox_command loop timeout #1\n", 197 + qpti->qpti_id); 197 198 198 199 /* Write mailbox command registers. */ 199 200 switch (mbox_param[param[0]] >> 4) { ··· 225 224 (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ)) 226 225 udelay(20); 227 226 if (!loop_count) 228 - printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #2\n", 229 - param[0]); 227 + printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #2\n", 228 + qpti->qpti_id, param[0]); 230 229 231 230 /* Wait for SBUS semaphore to get set. */ 232 231 loop_count = DEFAULT_LOOP_COUNT; ··· 239 238 break; 240 239 } 241 240 if (!loop_count) 242 - printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #3\n", 243 - param[0]); 241 + printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #3\n", 242 + qpti->qpti_id, param[0]); 244 243 245 244 /* Wait for MBOX busy condition to go away. */ 246 245 loop_count = DEFAULT_LOOP_COUNT; 247 246 while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04)) 248 247 udelay(20); 249 248 if (!loop_count) 250 - printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #4\n", 251 - param[0]); 249 + printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #4\n", 250 + qpti->qpti_id, param[0]); 252 251 253 252 /* Read back output parameters. */ 254 253 switch (mbox_param[param[0]] & 0xf) { ··· 343 342 while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04)) 344 343 udelay(20); 345 344 if (!loop_count) 346 - printk(KERN_EMERG "qlogicpti: reset_hardware loop timeout\n"); 345 + printk(KERN_EMERG "qlogicpti%d: reset_hardware loop timeout\n", 346 + qpti->qpti_id); 347 347 348 348 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); 349 349 set_sbus_cfg1(qpti); ··· 723 721 IRQF_SHARED, "Qlogic/PTI", qpti)) 724 722 goto fail; 725 723 726 - printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); 724 + printk("qlogicpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); 727 725 728 726 return 0; 729 727 730 728 fail: 731 - printk("qpti%d: Cannot acquire irq line\n", qpti->qpti_id); 729 + printk("qlogicpti%d: Cannot acquire irq line\n", qpti->qpti_id); 732 730 return -1; 733 731 } 734 732 ··· 1212 1210 host_status = DID_OK; 1213 1211 break; 1214 1212 default: 1215 - printk(KERN_EMERG "qpti%d: unknown completion status 0x%04x\n", 1213 + printk(KERN_EMERG "qlogicpti%d: unknown completion status 0x%04x\n", 1216 1214 id, sts->completion_status); 1217 1215 host_status = DID_ERROR; 1218 1216 break; ··· 1331 1329 u32 cmd_cookie; 1332 1330 int i; 1333 1331 1334 - printk(KERN_WARNING "qlogicpti : Aborting cmd for tgt[%d] lun[%d]\n", 1335 - (int)Cmnd->device->id, (int)Cmnd->device->lun); 1332 + printk(KERN_WARNING "qlogicpti%d: Aborting cmd for tgt[%d] lun[%d]\n", 1333 + qpti->qpti_id, (int)Cmnd->device->id, (int)Cmnd->device->lun); 1336 1334 1337 1335 qlogicpti_disable_irqs(qpti); 1338 1336 ··· 1350 1348 param[3] = cmd_cookie & 0xffff; 1351 1349 if (qlogicpti_mbox_command(qpti, param, 0) || 1352 1350 (param[0] != MBOX_COMMAND_COMPLETE)) { 1353 - printk(KERN_EMERG "qlogicpti : scsi abort failure: %x\n", param[0]); 1351 + printk(KERN_EMERG "qlogicpti%d: scsi abort failure: %x\n", 1352 + qpti->qpti_id, param[0]); 1354 1353 return_status = FAILED; 1355 1354 } 1356 1355 ··· 1367 1364 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; 1368 1365 int return_status = SUCCESS; 1369 1366 1370 - printk(KERN_WARNING "qlogicpti : Resetting SCSI bus!\n"); 1367 + printk(KERN_WARNING "qlogicpti%d: Resetting SCSI bus!\n", 1368 + qpti->qpti_id); 1371 1369 1372 1370 qlogicpti_disable_irqs(qpti); 1373 1371 ··· 1376 1372 param[1] = qpti->host_param.bus_reset_delay; 1377 1373 if (qlogicpti_mbox_command(qpti, param, 0) || 1378 1374 (param[0] != MBOX_COMMAND_COMPLETE)) { 1379 - printk(KERN_EMERG "qlogicisp : scsi bus reset failure: %x\n", param[0]); 1375 + printk(KERN_EMERG "qlogicisp%d: scsi bus reset failure: %x\n", 1376 + qpti->qpti_id, param[0]); 1380 1377 return_status = FAILED; 1381 1378 } 1382 1379 ··· 1459 1454 if (qlogicpti_reset_hardware(host)) 1460 1455 goto fail_unmap_queues; 1461 1456 1462 - if (scsi_add_host(host, &dev->dev)) 1463 - goto fail_unmap_queues; 1464 - 1465 1457 printk("(Firmware v%d.%d.%d)", qpti->fware_majrev, 1466 1458 qpti->fware_minrev, qpti->fware_micrev); 1467 1459 1468 1460 fcode = of_get_property(dp, "isp-fcode", NULL); 1469 1461 if (fcode && fcode[0]) 1470 - printk("(Firmware %s)", fcode); 1462 + printk("(FCode %s)", fcode); 1471 1463 if (of_find_property(dp, "differential", NULL) != NULL) 1472 1464 qpti->differential = 1; 1473 1465 1474 - printk (" [%s Wide, using %s interface]\n", 1466 + printk("\nqlogicpti%d: [%s Wide, using %s interface]\n", 1467 + qpti->qpti_id, 1475 1468 (qpti->ultra ? "Ultra" : "Fast"), 1476 1469 (qpti->differential ? "differential" : "single ended")); 1470 + 1471 + if (scsi_add_host(host, &dev->dev)) { 1472 + printk("qlogicpti%d: Failed scsi_add_host\n", qpti->qpti_id); 1473 + goto fail_unmap_queues; 1474 + } 1477 1475 1478 1476 dev_set_drvdata(&sdev->ofdev.dev, qpti); 1479 1477