aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptspi.c
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-09-14 20:46:51 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:48:34 -0400
commit29dd3609f2fc70e02ce48123485b14d9417b834f (patch)
tree54d4f8dc50dd8a45b37f66352a902fbf225b24c8 /drivers/message/fusion/mptspi.c
parent685b9e02fb77c6f33319ca59c52ae67e92fb750c (diff)
[SCSI] mpt fusion: standardize printks and debug info
Standardize all prints using common MYIOC_s_XXX_FMT macro defined in mptbase.h. Currently the driver uses several different methods to display info, where in some cases the "controller name" generating the printk is not provided. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r--drivers/message/fusion/mptspi.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 31087882d235..0e1cf5d60bd9 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -139,8 +139,9 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
139 factor = MPT_ULTRA320; 139 factor = MPT_ULTRA320;
140 if (scsi_device_qas(sdev)) { 140 if (scsi_device_qas(sdev)) {
141 ddvprintk(hd->ioc, 141 ddvprintk(hd->ioc,
142 printk(KERN_DEBUG "Enabling QAS due to " 142 printk(MYIOC_s_DEBUG_FMT "Enabling QAS due to "
143 "byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id)); 143 "byte56=%02x on id=%d!\n", hd->ioc->name,
144 scsi_device_qas(sdev), id));
144 noQas = 0; 145 noQas = 0;
145 } 146 }
146 if (sdev->type == TYPE_TAPE && 147 if (sdev->type == TYPE_TAPE &&
@@ -227,8 +228,8 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
227 /* Disable QAS in a mixed configuration case 228 /* Disable QAS in a mixed configuration case
228 */ 229 */
229 230
230 ddvprintk(hd->ioc, printk(KERN_DEBUG 231 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT
231 "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); 232 "Disabling QAS due to noQas=%02x on id=%d!\n", hd->ioc->name, noQas, id));
232 } 233 }
233} 234}
234 235
@@ -302,7 +303,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id)
302 303
303 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT 304 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
304 "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", 305 "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
305 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel)); 306 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel));
306 307
307 mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); 308 mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
308 309
@@ -425,8 +426,8 @@ static int mptspi_target_alloc(struct scsi_target *starget)
425 if (starget->channel == 0 && 426 if (starget->channel == 0 &&
426 mptspi_is_raid(hd, starget->id)) { 427 mptspi_is_raid(hd, starget->id)) {
427 vtarget->raidVolume = 1; 428 vtarget->raidVolume = 1;
428 ddvprintk(hd->ioc, printk(KERN_DEBUG 429 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT
429 "RAID Volume @ channel=%d id=%d\n", starget->channel, 430 "RAID Volume @ channel=%d id=%d\n", hd->ioc->name, starget->channel,
430 starget->id)); 431 starget->id));
431 } 432 }
432 433
@@ -532,7 +533,8 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
532 533
533 pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg0_dma, GFP_KERNEL); 534 pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg0_dma, GFP_KERNEL);
534 if (pg0 == NULL) { 535 if (pg0 == NULL) {
535 starget_printk(KERN_ERR, starget, "dma_alloc_coherent for parameters failed\n"); 536 starget_printk(MYIOC_s_ERR_FMT, starget,
537 "dma_alloc_coherent for parameters failed\n", ioc->name);
536 return -EINVAL; 538 return -EINVAL;
537 } 539 }
538 540
@@ -552,7 +554,7 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
552 cfg.pageAddr = starget->id; 554 cfg.pageAddr = starget->id;
553 555
554 if (mpt_config(ioc, &cfg)) { 556 if (mpt_config(ioc, &cfg)) {
555 starget_printk(KERN_ERR, starget, "mpt_config failed\n"); 557 starget_printk(MYIOC_s_ERR_FMT, starget, "mpt_config failed\n", ioc->name);
556 goto out_free; 558 goto out_free;
557 } 559 }
558 err = 0; 560 err = 0;
@@ -673,8 +675,8 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
673 /* If this is a piece of a RAID, then quiesce first */ 675 /* If this is a piece of a RAID, then quiesce first */
674 if (sdev->channel == 1 && 676 if (sdev->channel == 1 &&
675 mptscsih_quiesce_raid(hd, 1, vtarget->channel, vtarget->id) < 0) { 677 mptscsih_quiesce_raid(hd, 1, vtarget->channel, vtarget->id) < 0) {
676 starget_printk(KERN_ERR, scsi_target(sdev), 678 starget_printk(MYIOC_s_ERR_FMT, scsi_target(sdev),
677 "Integrated RAID quiesce failed\n"); 679 "Integrated RAID quiesce failed\n", hd->ioc->name);
678 return; 680 return;
679 } 681 }
680 682
@@ -684,8 +686,8 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
684 686
685 if (sdev->channel == 1 && 687 if (sdev->channel == 1 &&
686 mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0) 688 mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0)
687 starget_printk(KERN_ERR, scsi_target(sdev), 689 starget_printk(MYIOC_s_ERR_FMT, scsi_target(sdev),
688 "Integrated RAID resume failed\n"); 690 "Integrated RAID resume failed\n", hd->ioc->name);
689 691
690 mptspi_read_parameters(sdev->sdev_target); 692 mptspi_read_parameters(sdev->sdev_target);
691 spi_display_xfer_agreement(sdev->sdev_target); 693 spi_display_xfer_agreement(sdev->sdev_target);
@@ -847,7 +849,8 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
847 849
848 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL); 850 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL);
849 if (pg1 == NULL) { 851 if (pg1 == NULL) {
850 starget_printk(KERN_ERR, starget, "dma_alloc_coherent for parameters failed\n"); 852 starget_printk(MYIOC_s_ERR_FMT, starget,
853 "dma_alloc_coherent for parameters failed\n", ioc->name);
851 return -EINVAL; 854 return -EINVAL;
852 } 855 }
853 856
@@ -876,7 +879,8 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
876 mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); 879 mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
877 880
878 if (mpt_config(ioc, &cfg)) { 881 if (mpt_config(ioc, &cfg)) {
879 starget_printk(KERN_ERR, starget, "mpt_config failed\n"); 882 starget_printk(MYIOC_s_ERR_FMT, starget,
883 "mpt_config failed\n", ioc->name);
880 goto out_free; 884 goto out_free;
881 } 885 }
882 err = 0; 886 err = 0;
@@ -1092,12 +1096,12 @@ static void mpt_work_wrapper(struct work_struct *work)
1092 if(vtarget->id != disk) 1096 if(vtarget->id != disk)
1093 continue; 1097 continue;
1094 1098
1095 starget_printk(KERN_INFO, vtarget->starget, 1099 starget_printk(MYIOC_s_INFO_FMT, vtarget->starget,
1096 "Integrated RAID requests DV of new device\n"); 1100 "Integrated RAID requests DV of new device\n", hd->ioc->name);
1097 mptspi_dv_device(hd, sdev); 1101 mptspi_dv_device(hd, sdev);
1098 } 1102 }
1099 shost_printk(KERN_INFO, shost, 1103 shost_printk(MYIOC_s_INFO_FMT, shost,
1100 "Integrated RAID detects new device %d\n", disk); 1104 "Integrated RAID detects new device %d\n", hd->ioc->name, disk);
1101 scsi_scan_target(&hd->ioc->sh->shost_gendev, 1, disk, 0, 1); 1105 scsi_scan_target(&hd->ioc->sh->shost_gendev, 1, disk, 0, 1);
1102} 1106}
1103 1107
@@ -1107,9 +1111,9 @@ static void mpt_dv_raid(struct _MPT_SCSI_HOST *hd, int disk)
1107 struct work_queue_wrapper *wqw = kmalloc(sizeof(*wqw), GFP_ATOMIC); 1111 struct work_queue_wrapper *wqw = kmalloc(sizeof(*wqw), GFP_ATOMIC);
1108 1112
1109 if (!wqw) { 1113 if (!wqw) {
1110 shost_printk(KERN_ERR, hd->ioc->sh, 1114 shost_printk(MYIOC_s_ERR_FMT, hd->ioc->sh,
1111 "Failed to act on RAID event for physical disk %d\n", 1115 "Failed to act on RAID event for physical disk %d\n",
1112 disk); 1116 hd->ioc->name, disk);
1113 return; 1117 return;
1114 } 1118 }
1115 INIT_WORK(&wqw->work, mpt_work_wrapper); 1119 INIT_WORK(&wqw->work, mpt_work_wrapper);
@@ -1418,7 +1422,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1418 1422
1419 if (numSGE < sh->sg_tablesize) { 1423 if (numSGE < sh->sg_tablesize) {
1420 /* Reset this value */ 1424 /* Reset this value */
1421 dprintk(ioc, printk(MYIOC_s_INFO_FMT 1425 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1422 "Resetting sg_tablesize to %d from %d\n", 1426 "Resetting sg_tablesize to %d from %d\n",
1423 ioc->name, numSGE, sh->sg_tablesize)); 1427 ioc->name, numSGE, sh->sg_tablesize));
1424 sh->sg_tablesize = numSGE; 1428 sh->sg_tablesize = numSGE;
@@ -1484,8 +1488,8 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1484 1488
1485 error = scsi_add_host (sh, &ioc->pcidev->dev); 1489 error = scsi_add_host (sh, &ioc->pcidev->dev);
1486 if(error) { 1490 if(error) {
1487 dprintk(ioc, printk(KERN_ERR MYNAM 1491 dprintk(ioc, printk(MYIOC_s_ERR_FMT
1488 "scsi_add_host failed\n")); 1492 "scsi_add_host failed\n", ioc->name));
1489 goto out_mptspi_probe; 1493 goto out_mptspi_probe;
1490 } 1494 }
1491 1495