aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qlogicpti.c
diff options
context:
space:
mode:
authorMark Fortescue <mark@mtfhpc.demon.co.uk>2007-07-31 15:10:45 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-02 10:02:42 -0400
commit585a8a59ebfc81327e1c4f2c0e80730bdd2e5d8e (patch)
tree2bef858e329df3ea6aa45a03c39b434960aa128e /drivers/scsi/qlogicpti.c
parent822b41f4eb98c144a07747e88e94941946bda124 (diff)
[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>
Diffstat (limited to 'drivers/scsi/qlogicpti.c')
-rw-r--r--drivers/scsi/qlogicpti.c50
1 files changed, 29 insertions, 21 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index c4195ea869e..594887205b0 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -193,7 +193,8 @@ static int qlogicpti_mbox_command(struct qlogicpti *qpti, u_short param[], int f
193 cpu_relax(); 193 cpu_relax();
194 } 194 }
195 if (!loop_count) 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 /* Write mailbox command registers. */ 199 /* Write mailbox command registers. */
199 switch (mbox_param[param[0]] >> 4) { 200 switch (mbox_param[param[0]] >> 4) {
@@ -224,8 +225,8 @@ static int qlogicpti_mbox_command(struct qlogicpti *qpti, u_short param[], int f
224 (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ)) 225 (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ))
225 udelay(20); 226 udelay(20);
226 if (!loop_count) 227 if (!loop_count)
227 printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #2\n", 228 printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #2\n",
228 param[0]); 229 qpti->qpti_id, param[0]);
229 230
230 /* Wait for SBUS semaphore to get set. */ 231 /* Wait for SBUS semaphore to get set. */
231 loop_count = DEFAULT_LOOP_COUNT; 232 loop_count = DEFAULT_LOOP_COUNT;
@@ -238,16 +239,16 @@ static int qlogicpti_mbox_command(struct qlogicpti *qpti, u_short param[], int f
238 break; 239 break;
239 } 240 }
240 if (!loop_count) 241 if (!loop_count)
241 printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #3\n", 242 printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #3\n",
242 param[0]); 243 qpti->qpti_id, param[0]);
243 244
244 /* Wait for MBOX busy condition to go away. */ 245 /* Wait for MBOX busy condition to go away. */
245 loop_count = DEFAULT_LOOP_COUNT; 246 loop_count = DEFAULT_LOOP_COUNT;
246 while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04)) 247 while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04))
247 udelay(20); 248 udelay(20);
248 if (!loop_count) 249 if (!loop_count)
249 printk(KERN_EMERG "qlogicpti: mbox_command[%04x] loop timeout #4\n", 250 printk(KERN_EMERG "qlogicpti%d: mbox_command[%04x] loop timeout #4\n",
250 param[0]); 251 qpti->qpti_id, param[0]);
251 252
252 /* Read back output parameters. */ 253 /* Read back output parameters. */
253 switch (mbox_param[param[0]] & 0xf) { 254 switch (mbox_param[param[0]] & 0xf) {
@@ -342,7 +343,8 @@ static int qlogicpti_reset_hardware(struct Scsi_Host *host)
342 while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04)) 343 while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04))
343 udelay(20); 344 udelay(20);
344 if (!loop_count) 345 if (!loop_count)
345 printk(KERN_EMERG "qlogicpti: reset_hardware loop timeout\n"); 346 printk(KERN_EMERG "qlogicpti%d: reset_hardware loop timeout\n",
347 qpti->qpti_id);
346 348
347 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); 349 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL);
348 set_sbus_cfg1(qpti); 350 set_sbus_cfg1(qpti);
@@ -721,12 +723,12 @@ static int __init qpti_register_irq(struct qlogicpti *qpti)
721 IRQF_SHARED, "Qlogic/PTI", qpti)) 723 IRQF_SHARED, "Qlogic/PTI", qpti))
722 goto fail; 724 goto fail;
723 725
724 printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); 726 printk("qlogicpti%d: IRQ %d ", qpti->qpti_id, qpti->irq);
725 727
726 return 0; 728 return 0;
727 729
728fail: 730fail:
729 printk("qpti%d: Cannot acquire irq line\n", qpti->qpti_id); 731 printk("qlogicpti%d: Cannot acquire irq line\n", qpti->qpti_id);
730 return -1; 732 return -1;
731} 733}
732 734
@@ -1210,7 +1212,7 @@ static int qlogicpti_return_status(struct Status_Entry *sts, int id)
1210 host_status = DID_OK; 1212 host_status = DID_OK;
1211 break; 1213 break;
1212 default: 1214 default:
1213 printk(KERN_EMERG "qpti%d: unknown completion status 0x%04x\n", 1215 printk(KERN_EMERG "qlogicpti%d: unknown completion status 0x%04x\n",
1214 id, sts->completion_status); 1216 id, sts->completion_status);
1215 host_status = DID_ERROR; 1217 host_status = DID_ERROR;
1216 break; 1218 break;
@@ -1329,8 +1331,8 @@ static int qlogicpti_abort(struct scsi_cmnd *Cmnd)
1329 u32 cmd_cookie; 1331 u32 cmd_cookie;
1330 int i; 1332 int i;
1331 1333
1332 printk(KERN_WARNING "qlogicpti : Aborting cmd for tgt[%d] lun[%d]\n", 1334 printk(KERN_WARNING "qlogicpti%d: Aborting cmd for tgt[%d] lun[%d]\n",
1333 (int)Cmnd->device->id, (int)Cmnd->device->lun); 1335 qpti->qpti_id, (int)Cmnd->device->id, (int)Cmnd->device->lun);
1334 1336
1335 qlogicpti_disable_irqs(qpti); 1337 qlogicpti_disable_irqs(qpti);
1336 1338
@@ -1348,7 +1350,8 @@ static int qlogicpti_abort(struct scsi_cmnd *Cmnd)
1348 param[3] = cmd_cookie & 0xffff; 1350 param[3] = cmd_cookie & 0xffff;
1349 if (qlogicpti_mbox_command(qpti, param, 0) || 1351 if (qlogicpti_mbox_command(qpti, param, 0) ||
1350 (param[0] != MBOX_COMMAND_COMPLETE)) { 1352 (param[0] != MBOX_COMMAND_COMPLETE)) {
1351 printk(KERN_EMERG "qlogicpti : scsi abort failure: %x\n", param[0]); 1353 printk(KERN_EMERG "qlogicpti%d: scsi abort failure: %x\n",
1354 qpti->qpti_id, param[0]);
1352 return_status = FAILED; 1355 return_status = FAILED;
1353 } 1356 }
1354 1357
@@ -1364,7 +1367,8 @@ static int qlogicpti_reset(struct scsi_cmnd *Cmnd)
1364 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; 1367 struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
1365 int return_status = SUCCESS; 1368 int return_status = SUCCESS;
1366 1369
1367 printk(KERN_WARNING "qlogicpti : Resetting SCSI bus!\n"); 1370 printk(KERN_WARNING "qlogicpti%d: Resetting SCSI bus!\n",
1371 qpti->qpti_id);
1368 1372
1369 qlogicpti_disable_irqs(qpti); 1373 qlogicpti_disable_irqs(qpti);
1370 1374
@@ -1372,7 +1376,8 @@ static int qlogicpti_reset(struct scsi_cmnd *Cmnd)
1372 param[1] = qpti->host_param.bus_reset_delay; 1376 param[1] = qpti->host_param.bus_reset_delay;
1373 if (qlogicpti_mbox_command(qpti, param, 0) || 1377 if (qlogicpti_mbox_command(qpti, param, 0) ||
1374 (param[0] != MBOX_COMMAND_COMPLETE)) { 1378 (param[0] != MBOX_COMMAND_COMPLETE)) {
1375 printk(KERN_EMERG "qlogicisp : scsi bus reset failure: %x\n", param[0]); 1379 printk(KERN_EMERG "qlogicisp%d: scsi bus reset failure: %x\n",
1380 qpti->qpti_id, param[0]);
1376 return_status = FAILED; 1381 return_status = FAILED;
1377 } 1382 }
1378 1383
@@ -1454,22 +1459,25 @@ static int __devinit qpti_sbus_probe(struct of_device *dev, const struct of_devi
1454 if (qlogicpti_reset_hardware(host)) 1459 if (qlogicpti_reset_hardware(host))
1455 goto fail_unmap_queues; 1460 goto fail_unmap_queues;
1456 1461
1457 if (scsi_add_host(host, &dev->dev))
1458 goto fail_unmap_queues;
1459
1460 printk("(Firmware v%d.%d.%d)", qpti->fware_majrev, 1462 printk("(Firmware v%d.%d.%d)", qpti->fware_majrev,
1461 qpti->fware_minrev, qpti->fware_micrev); 1463 qpti->fware_minrev, qpti->fware_micrev);
1462 1464
1463 fcode = of_get_property(dp, "isp-fcode", NULL); 1465 fcode = of_get_property(dp, "isp-fcode", NULL);
1464 if (fcode && fcode[0]) 1466 if (fcode && fcode[0])
1465 printk("(Firmware %s)", fcode); 1467 printk("(FCode %s)", fcode);
1466 if (of_find_property(dp, "differential", NULL) != NULL) 1468 if (of_find_property(dp, "differential", NULL) != NULL)
1467 qpti->differential = 1; 1469 qpti->differential = 1;
1468 1470
1469 printk (" [%s Wide, using %s interface]\n", 1471 printk("\nqlogicpti%d: [%s Wide, using %s interface]\n",
1472 qpti->qpti_id,
1470 (qpti->ultra ? "Ultra" : "Fast"), 1473 (qpti->ultra ? "Ultra" : "Fast"),
1471 (qpti->differential ? "differential" : "single ended")); 1474 (qpti->differential ? "differential" : "single ended"));
1472 1475
1476 if (scsi_add_host(host, &dev->dev)) {
1477 printk("qlogicpti%d: Failed scsi_add_host\n", qpti->qpti_id);
1478 goto fail_unmap_queues;
1479 }
1480
1473 dev_set_drvdata(&sdev->ofdev.dev, qpti); 1481 dev_set_drvdata(&sdev->ofdev.dev, qpti);
1474 1482
1475 qpti_chain_add(qpti); 1483 qpti_chain_add(qpti);