[SCSI] mpt fusion: fix up fusion prints using the sdev_printk, dev_printk, and shost_...
authorEric Moore <eric.moore@lsi.com>
Sat, 29 Sep 2007 16:17:21 +0000 (10:17 -0600)
committerJames Bottomley <jejb@mulgrave.localdomain>
Fri, 12 Oct 2007 18:52:19 +0000 (14:52 -0400)
Cleaning up prints that use the xxx_printk API, in that the fusion
preamble "mptbase: iocX" follows the info provided by the print API.
The way its currently coded, the [H:C:T] print in sdev_printk will be
inbetween "mptbase" and "iocX", instead of before.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptspi.c

index eb65c493ce0aa1bfabf7bbb01d7a48834ab9fcc6..d7682e083f590c8ca39a49a346797300cff02f7e 100644 (file)
  * MPT drivers.  NOTE: Users of these macro defs must
  * themselves define their own MYNAM.
  */
+#define MYIOC_s_FMT                    MYNAM ": %s: "
 #define MYIOC_s_DEBUG_FMT              KERN_DEBUG MYNAM ": %s: "
 #define MYIOC_s_INFO_FMT               KERN_INFO MYNAM ": %s: "
 #define MYIOC_s_NOTE_FMT               KERN_NOTICE MYNAM ": %s: "
index ba4f5e7fcbc7aca39b7d5bfb617d950d5e411b13..e4c94f93de16a98462518419c923bb24f24d9414 100644 (file)
@@ -318,8 +318,8 @@ mptsas_set_rphy(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_rp
        }
 
        if (rphy) {
-               dsaswideprintk(ioc, dev_printk(MYIOC_s_DEBUG_FMT,
-                   &rphy->dev, "add:", ioc->name));
+               dsaswideprintk(ioc, dev_printk(KERN_DEBUG,
+                   &rphy->dev, MYIOC_s_FMT "add:", ioc->name));
                dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rphy=%p release=%p\n",
                    ioc->name, rphy, rphy->dev.release));
        }
@@ -341,8 +341,8 @@ mptsas_set_port(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_po
                phy_info->port_details->port = port;
 
        if (port) {
-               dsaswideprintk(ioc, dev_printk(MYIOC_s_DEBUG_FMT,
-                   &port->dev, "add:", ioc->name));
+               dsaswideprintk(ioc, dev_printk(KERN_DEBUG,
+                   &port->dev, MYIOC_s_FMT "add:", ioc->name));
                dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "port=%p release=%p\n",
                    ioc->name, port, port->dev.release));
        }
@@ -2296,8 +2296,9 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
                                        expander_sas_address)
                                        continue;
                                dsaswideprintk(ioc,
-                                   dev_printk(MYIOC_s_DEBUG_FMT, &port->dev,
-                                   "delete port (%d)\n", ioc->name, port->port_identifier));
+                                   dev_printk(KERN_DEBUG, &port->dev,
+                                   MYIOC_s_FMT "delete port (%d)\n", ioc->name,
+                                   port->port_identifier));
                                sas_port_delete(port);
                                mptsas_port_delete(ioc, phy_info->port_details);
                        }
@@ -2681,7 +2682,7 @@ mptsas_hotplug_work(struct work_struct *work)
                printk(MYIOC_s_INFO_FMT
                       "removing %s device, channel %d, id %d, phy %d\n",
                       ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
-               dev_printk(MYIOC_s_DEBUG_FMT, &port->dev,
+               dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT
                    "delete port (%d)\n", ioc->name, port->port_identifier);
                sas_port_delete(port);
                mptsas_port_delete(ioc, phy_info->port_details);
index dc5e996a8944f7832246c17b4454fc1d9a9768c4..bdff950a54a19103195e893ada00b76f187f251e 100644 (file)
@@ -992,7 +992,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
                scsi_dma_unmap(sc);
                sc->result = DID_RESET << 16;
                sc->host_scribble = NULL;
-               sdev_printk(MYIOC_s_INFO_FMT, sc->device,
+               sdev_printk(KERN_INFO, sc->device, MYIOC_s_FMT
                    "completing cmds: fw_channel %d, fw_id %d, sc=%p,"
                    " mf = %p, idx=%x\n", ioc->name, channel, id, sc, mf, ii);
                sc->scsi_done(sc);
@@ -1053,7 +1053,7 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
                        scsi_dma_unmap(sc);
                        sc->host_scribble = NULL;
                        sc->result = DID_NO_CONNECT << 16;
-                       sdev_printk(MYIOC_s_INFO_FMT, sc->device, "completing cmds: fw_channel %d,"
+                       sdev_printk(KERN_INFO, sc->device, MYIOC_s_FMT "completing cmds: fw_channel %d,"
                           "fw_id %d, sc=%p, mf = %p, idx=%x\n", ioc->name, vdevice->vtarget->channel,
                           vdevice->vtarget->id, sc, mf, ii);
                        sc->scsi_done(sc);
index 42fdf7db90b0bd39c8007f73669f185670fa8f29..25bcfcf36f2e365bbdebf0afc06b261ab2be8a36 100644 (file)
@@ -537,7 +537,7 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
 
        spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL);
        if (spi_dev_pg0 == NULL) {
-               starget_printk(MYIOC_s_ERR_FMT, starget,
+               starget_printk(KERN_ERR, starget, MYIOC_s_FMT
                    "dma_alloc_coherent for parameters failed\n", ioc->name);
                return -EINVAL;
        }
@@ -558,7 +558,7 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
        cfg.pageAddr = starget->id;
 
        if (mpt_config(ioc, &cfg)) {
-               starget_printk(MYIOC_s_ERR_FMT, starget, "mpt_config failed\n", ioc->name);
+               starget_printk(KERN_ERR, starget, MYIOC_s_FMT "mpt_config failed\n", ioc->name);
                goto out_free;
        }
        err = 0;
@@ -681,7 +681,7 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
        /* If this is a piece of a RAID, then quiesce first */
        if (sdev->channel == 1 &&
            mptscsih_quiesce_raid(hd, 1, vtarget->channel, vtarget->id) < 0) {
-               starget_printk(MYIOC_s_ERR_FMT, scsi_target(sdev),
+               starget_printk(KERN_ERR, scsi_target(sdev), MYIOC_s_FMT
                    "Integrated RAID quiesce failed\n", ioc->name);
                return;
        }
@@ -692,7 +692,7 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
 
        if (sdev->channel == 1 &&
            mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0)
-               starget_printk(MYIOC_s_ERR_FMT, scsi_target(sdev),
+               starget_printk(KERN_ERR, scsi_target(sdev), MYIOC_s_FMT
                    "Integrated RAID resume failed\n", ioc->name);
 
        mptspi_read_parameters(sdev->sdev_target);
@@ -856,7 +856,7 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
 
        pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL);
        if (pg1 == NULL) {
-               starget_printk(MYIOC_s_ERR_FMT, starget,
+               starget_printk(KERN_ERR, starget, MYIOC_s_FMT
                    "dma_alloc_coherent for parameters failed\n", ioc->name);
                return -EINVAL;
        }
@@ -886,7 +886,7 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
        mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
 
        if (mpt_config(ioc, &cfg)) {
-               starget_printk(MYIOC_s_ERR_FMT, starget,
+               starget_printk(KERN_ERR, starget, MYIOC_s_FMT
                    "mpt_config failed\n", ioc->name);
                goto out_free;
        }
@@ -1104,11 +1104,11 @@ static void mpt_work_wrapper(struct work_struct *work)
                if(vtarget->id != disk)
                        continue;
 
-               starget_printk(MYIOC_s_INFO_FMT, vtarget->starget,
+               starget_printk(KERN_INFO, vtarget->starget, MYIOC_s_FMT
                    "Integrated RAID requests DV of new device\n", ioc->name);
                mptspi_dv_device(hd, sdev);
        }
-       shost_printk(MYIOC_s_INFO_FMT, shost,
+       shost_printk(KERN_INFO, shost, MYIOC_s_FMT
            "Integrated RAID detects new device %d\n", ioc->name, disk);
        scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, 1);
 }
@@ -1120,7 +1120,7 @@ static void mpt_dv_raid(struct _MPT_SCSI_HOST *hd, int disk)
        MPT_ADAPTER *ioc = hd->ioc;
 
        if (!wqw) {
-               shost_printk(MYIOC_s_ERR_FMT, ioc->sh,
+               shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT
                    "Failed to act on RAID event for physical disk %d\n",
                    ioc->name, disk);
                return;