aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.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/mptscsih.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/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c140
1 files changed, 72 insertions, 68 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index f00c1003a765..8081fe70b190 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -192,7 +192,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex)
192 int chain_idx; 192 int chain_idx;
193 193
194 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer called\n", 194 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer called\n",
195 ioc->name)); 195 ioc->name));
196 spin_lock_irqsave(&ioc->FreeQlock, flags); 196 spin_lock_irqsave(&ioc->FreeQlock, flags);
197 if (!list_empty(&ioc->FreeChainQ)) { 197 if (!list_empty(&ioc->FreeChainQ)) {
198 int offset; 198 int offset;
@@ -203,13 +203,14 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex)
203 offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer; 203 offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer;
204 chain_idx = offset / ioc->req_sz; 204 chain_idx = offset / ioc->req_sz;
205 rc = SUCCESS; 205 rc = SUCCESS;
206 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer chainBuf=%p ChainBuffer=%p offset=%d chain_idx=%d\n", 206 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT
207 ioc->name, chainBuf, ioc->ChainBuffer, offset, chain_idx)); 207 "getFreeChainBuffer chainBuf=%p ChainBuffer=%p offset=%d chain_idx=%d\n",
208 ioc->name, chainBuf, ioc->ChainBuffer, offset, chain_idx));
208 } else { 209 } else {
209 rc = FAILED; 210 rc = FAILED;
210 chain_idx = MPT_HOST_NO_CHAIN; 211 chain_idx = MPT_HOST_NO_CHAIN;
211 dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer failed\n", 212 dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "getFreeChainBuffer failed\n",
212 ioc->name)); 213 ioc->name));
213 } 214 }
214 spin_unlock_irqrestore(&ioc->FreeQlock, flags); 215 spin_unlock_irqrestore(&ioc->FreeQlock, flags);
215 216
@@ -419,8 +420,8 @@ nextSGEset:
419 * out the Address and Flags fields. 420 * out the Address and Flags fields.
420 */ 421 */
421 chainSge = (char *) psge; 422 chainSge = (char *) psge;
422 dsgprintk(ioc, printk(KERN_DEBUG " Current buff @ %p (index 0x%x)", 423 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT " Current buff @ %p (index 0x%x)",
423 psge, req_idx)); 424 ioc->name, psge, req_idx));
424 425
425 /* Start the SGE for the next buffer 426 /* Start the SGE for the next buffer
426 */ 427 */
@@ -428,8 +429,8 @@ nextSGEset:
428 sgeOffset = 0; 429 sgeOffset = 0;
429 sg_done = 0; 430 sg_done = 0;
430 431
431 dsgprintk(ioc, printk(KERN_DEBUG " Chain buff @ %p (index 0x%x)\n", 432 dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT " Chain buff @ %p (index 0x%x)\n",
432 psge, chain_idx)); 433 ioc->name, psge, chain_idx));
433 434
434 /* Start the SGE for the next buffer 435 /* Start the SGE for the next buffer
435 */ 436 */
@@ -588,18 +589,17 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pSc
588 } 589 }
589 590
590 scsi_print_command(sc); 591 scsi_print_command(sc);
591 printk(KERN_DEBUG "\tfw_channel = %d, fw_id = %d\n", 592 printk(MYIOC_s_DEBUG_FMT "\tfw_channel = %d, fw_id = %d\n",
592 pScsiReply->Bus, pScsiReply->TargetID); 593 ioc->name, pScsiReply->Bus, pScsiReply->TargetID);
593 printk(KERN_DEBUG "\trequest_len = %d, underflow = %d, resid = %d\n", 594 printk(MYIOC_s_DEBUG_FMT "\trequest_len = %d, underflow = %d, "
594 scsi_bufflen(sc), sc->underflow, scsi_get_resid(sc)); 595 "resid = %d\n", ioc->name, scsi_bufflen(sc), sc->underflow,
595 printk(KERN_DEBUG "\ttag = %d, transfer_count = %d, sc->result = %08X\n", 596 scsi_get_resid(sc));
596 le16_to_cpu(pScsiReply->TaskTag), 597 printk(MYIOC_s_DEBUG_FMT "\ttag = %d, transfer_count = %d, "
598 "sc->result = %08X\n", ioc->name, le16_to_cpu(pScsiReply->TaskTag),
597 le32_to_cpu(pScsiReply->TransferCount), sc->result); 599 le32_to_cpu(pScsiReply->TransferCount), sc->result);
598 600 printk(MYIOC_s_DEBUG_FMT "\tiocstatus = %s (0x%04x), "
599 printk(KERN_DEBUG "\tiocstatus = %s (0x%04x), "
600 "scsi_status = %s (0x%02x), scsi_state = (0x%02x)\n", 601 "scsi_status = %s (0x%02x), scsi_state = (0x%02x)\n",
601 desc, ioc_status, 602 ioc->name, desc, ioc_status, desc1, pScsiReply->SCSIStatus,
602 desc1, pScsiReply->SCSIStatus,
603 pScsiReply->SCSIState); 603 pScsiReply->SCSIState);
604 604
605 if (pScsiReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_VALID) { 605 if (pScsiReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_VALID) {
@@ -607,9 +607,8 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pSc
607 asc = sc->sense_buffer[12]; 607 asc = sc->sense_buffer[12];
608 ascq = sc->sense_buffer[13]; 608 ascq = sc->sense_buffer[13];
609 609
610 printk(KERN_DEBUG "\t[sense_key,asc,ascq]: " 610 printk(MYIOC_s_DEBUG_FMT "\t[sense_key,asc,ascq]: "
611 "[0x%02x,0x%02x,0x%02x]\n", 611 "[0x%02x,0x%02x,0x%02x]\n", ioc->name, skey, asc, ascq);
612 skey, asc, ascq);
613 } 612 }
614 613
615 /* 614 /*
@@ -617,8 +616,8 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pSc
617 */ 616 */
618 if (pScsiReply->SCSIState & MPI_SCSI_STATE_RESPONSE_INFO_VALID && 617 if (pScsiReply->SCSIState & MPI_SCSI_STATE_RESPONSE_INFO_VALID &&
619 pScsiReply->ResponseInfo) 618 pScsiReply->ResponseInfo)
620 printk(KERN_DEBUG "response_info = %08xh\n", 619 printk(MYIOC_s_DEBUG_FMT "response_info = %08xh\n",
621 le32_to_cpu(pScsiReply->ResponseInfo)); 620 ioc->name, le32_to_cpu(pScsiReply->ResponseInfo));
622} 621}
623#endif 622#endif
624 623
@@ -738,8 +737,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
738 */ 737 */
739 if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID && 738 if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID &&
740 pScsiReply->ResponseInfo) { 739 pScsiReply->ResponseInfo) {
741 printk(KERN_NOTICE "[%d:%d:%d:%d] " 740 printk(MYIOC_s_NOTE_FMT "[%d:%d:%d:%d] "
742 "FCP_ResponseInfo=%08xh\n", 741 "FCP_ResponseInfo=%08xh\n", ioc->name,
743 sc->device->host->host_no, sc->device->channel, 742 sc->device->host->host_no, sc->device->channel,
744 sc->device->id, sc->device->lun, 743 sc->device->id, sc->device->lun,
745 le32_to_cpu(pScsiReply->ResponseInfo)); 744 le32_to_cpu(pScsiReply->ResponseInfo));
@@ -824,9 +823,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
824 sc->result=DID_SOFT_ERROR << 16; 823 sc->result=DID_SOFT_ERROR << 16;
825 else /* Sufficient data transfer occurred */ 824 else /* Sufficient data transfer occurred */
826 sc->result = (DID_OK << 16) | scsi_status; 825 sc->result = (DID_OK << 16) | scsi_status;
827 dreplyprintk(ioc, printk(KERN_DEBUG 826 dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
828 "RESIDUAL_MISMATCH: result=%x on channel=%d id=%d\n", 827 "RESIDUAL_MISMATCH: result=%x on channel=%d id=%d\n",
829 sc->result, sc->device->channel, sc->device->id)); 828 ioc->name, sc->result, sc->device->channel, sc->device->id));
830 break; 829 break;
831 830
832 case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */ 831 case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */
@@ -858,9 +857,11 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
858 } 857 }
859 858
860 859
861 dreplyprintk(ioc, printk(KERN_DEBUG " sc->underflow={report ERR if < %02xh bytes xfer'd}\n", 860 dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
862 sc->underflow)); 861 " sc->underflow={report ERR if < %02xh bytes xfer'd}\n",
863 dreplyprintk(ioc, printk(KERN_DEBUG " ActBytesXferd=%02xh\n", xfer_cnt)); 862 ioc->name, sc->underflow));
863 dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
864 " ActBytesXferd=%02xh\n", ioc->name, xfer_cnt));
864 865
865 /* Report Queue Full 866 /* Report Queue Full
866 */ 867 */
@@ -974,7 +975,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
974 int ii; 975 int ii;
975 int max = ioc->req_depth; 976 int max = ioc->req_depth;
976 977
977 dprintk(ioc, printk(KERN_DEBUG MYNAM ": flush_ScsiLookup called\n")); 978 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": flush_ScsiLookup called\n", ioc->name));
978 for (ii= 0; ii < max; ii++) { 979 for (ii= 0; ii < max; ii++) {
979 if ((SCpnt = hd->ScsiLookup[ii]) != NULL) { 980 if ((SCpnt = hd->ScsiLookup[ii]) != NULL) {
980 981
@@ -986,8 +987,8 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
986 hd->ScsiLookup[ii] = NULL; 987 hd->ScsiLookup[ii] = NULL;
987 988
988 mf = MPT_INDEX_2_MFPTR(ioc, ii); 989 mf = MPT_INDEX_2_MFPTR(ioc, ii);
989 dmfprintk(ioc, printk(KERN_DEBUG MYNAM ": flush: ScsiDone (mf=%p,sc=%p)\n", 990 dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": flush: ScsiDone (mf=%p,sc=%p)\n",
990 mf, SCpnt)); 991 ioc->name, mf, SCpnt));
991 992
992 /* Free Chain buffers */ 993 /* Free Chain buffers */
993 mptscsih_freeChainBuffers(ioc, ii); 994 mptscsih_freeChainBuffers(ioc, ii);
@@ -1036,8 +1037,8 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
1036 struct scsi_cmnd *sc; 1037 struct scsi_cmnd *sc;
1037 struct scsi_lun lun; 1038 struct scsi_lun lun;
1038 1039
1039 dsprintk(hd->ioc, printk(KERN_DEBUG MYNAM ": search_running channel %d id %d lun %d max %d\n", 1040 dsprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT ": search_running channel %d id %d lun %d max %d\n",
1040 vdevice->vtarget->channel, vdevice->vtarget->id, vdevice->lun, max)); 1041 hd->ioc->name, vdevice->vtarget->channel, vdevice->vtarget->id, vdevice->lun, max));
1041 1042
1042 for (ii=0; ii < max; ii++) { 1043 for (ii=0; ii < max; ii++) {
1043 if ((sc = hd->ScsiLookup[ii]) != NULL) { 1044 if ((sc = hd->ScsiLookup[ii]) != NULL) {
@@ -1069,8 +1070,8 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
1069 scsi_dma_unmap(sc); 1070 scsi_dma_unmap(sc);
1070 sc->host_scribble = NULL; 1071 sc->host_scribble = NULL;
1071 sc->result = DID_NO_CONNECT << 16; 1072 sc->result = DID_NO_CONNECT << 16;
1072 sdev_printk(KERN_INFO, sc->device, "completing cmds: fw_channel %d," 1073 sdev_printk(MYIOC_s_INFO_FMT, sc->device, "completing cmds: fw_channel %d,"
1073 "fw_id %d, sc=%p, mf = %p, idx=%x\n", vdevice->vtarget->channel, 1074 "fw_id %d, sc=%p, mf = %p, idx=%x\n", hd->ioc->name, vdevice->vtarget->channel,
1074 vdevice->vtarget->id, sc, mf, ii); 1075 vdevice->vtarget->id, sc, mf, ii);
1075 sc->scsi_done(sc); 1076 sc->scsi_done(sc);
1076 } 1077 }
@@ -1475,7 +1476,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1475 mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf); 1476 mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf);
1476 dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", 1477 dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n",
1477 ioc->name, SCpnt, mf, my_idx)); 1478 ioc->name, SCpnt, mf, my_idx));
1478 DBG_DUMP_REQUEST_FRAME(ioc, (u32 *)mf) 1479 DBG_DUMP_REQUEST_FRAME(ioc, (u32 *)mf);
1479 return 0; 1480 return 0;
1480 1481
1481 fail: 1482 fail:
@@ -1590,18 +1591,18 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int c
1590 */ 1591 */
1591 if (mptscsih_tm_pending_wait(hd) == FAILED) { 1592 if (mptscsih_tm_pending_wait(hd) == FAILED) {
1592 if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) { 1593 if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
1593 dtmprintk(ioc, printk(KERN_DEBUG MYNAM ": %s: TMHandler abort: " 1594 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler abort: "
1594 "Timed out waiting for last TM (%d) to complete! \n", 1595 "Timed out waiting for last TM (%d) to complete! \n",
1595 ioc->name, hd->tmPending)); 1596 ioc->name, hd->tmPending));
1596 return FAILED; 1597 return FAILED;
1597 } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) { 1598 } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
1598 dtmprintk(ioc, printk(KERN_DEBUG MYNAM ": %s: TMHandler target " 1599 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler target "
1599 "reset: Timed out waiting for last TM (%d) " 1600 "reset: Timed out waiting for last TM (%d) "
1600 "to complete! \n", ioc->name, 1601 "to complete! \n", ioc->name,
1601 hd->tmPending)); 1602 hd->tmPending));
1602 return FAILED; 1603 return FAILED;
1603 } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) { 1604 } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
1604 dtmprintk(ioc, printk(KERN_DEBUG MYNAM ": %s: TMHandler bus reset: " 1605 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler bus reset: "
1605 "Timed out waiting for last TM (%d) to complete! \n", 1606 "Timed out waiting for last TM (%d) to complete! \n",
1606 ioc->name, hd->tmPending)); 1607 ioc->name, hd->tmPending));
1607 return FAILED; 1608 return FAILED;
@@ -1618,10 +1619,10 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int c
1618 printk(MYIOC_s_WARN_FMT 1619 printk(MYIOC_s_WARN_FMT
1619 "TM Handler for type=%x: IOC Not operational (0x%x)!\n", 1620 "TM Handler for type=%x: IOC Not operational (0x%x)!\n",
1620 ioc->name, type, ioc_raw_state); 1621 ioc->name, type, ioc_raw_state);
1621 printk(KERN_WARNING " Issuing HardReset!!\n"); 1622 printk(MYIOC_s_WARN_FMT " Issuing HardReset!!\n", ioc->name);
1622 if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0) 1623 if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0)
1623 printk((KERN_WARNING "TMHandler: HardReset " 1624 printk(MYIOC_s_WARN_FMT "TMHandler: HardReset "
1624 "FAILED!!\n")); 1625 "FAILED!!\n", ioc->name);
1625 return FAILED; 1626 return FAILED;
1626 } 1627 }
1627 1628
@@ -1806,8 +1807,8 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1806 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) { 1807 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) {
1807 SCpnt->result = DID_RESET << 16; 1808 SCpnt->result = DID_RESET << 16;
1808 SCpnt->scsi_done(SCpnt); 1809 SCpnt->scsi_done(SCpnt);
1809 printk(KERN_DEBUG MYNAM ": mptscsih_abort: Can't locate " 1810 printk(KERN_ERR MYNAM ": task abort: "
1810 "host! (sc=%p)\n", SCpnt); 1811 "can't locate host! (sc=%p)\n", SCpnt);
1811 return FAILED; 1812 return FAILED;
1812 } 1813 }
1813 1814
@@ -1818,8 +1819,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1818 1819
1819 vdevice = SCpnt->device->hostdata; 1820 vdevice = SCpnt->device->hostdata;
1820 if (!vdevice || !vdevice->vtarget) { 1821 if (!vdevice || !vdevice->vtarget) {
1821 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "task abort: device has been " 1822 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1822 "deleted (sc=%p)\n", ioc->name, SCpnt)); 1823 "task abort: device has been deleted (sc=%p)\n",
1824 ioc->name, SCpnt));
1823 SCpnt->result = DID_NO_CONNECT << 16; 1825 SCpnt->result = DID_NO_CONNECT << 16;
1824 SCpnt->scsi_done(SCpnt); 1826 SCpnt->scsi_done(SCpnt);
1825 retval = 0; 1827 retval = 0;
@@ -1829,8 +1831,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1829 /* Task aborts are not supported for hidden raid components. 1831 /* Task aborts are not supported for hidden raid components.
1830 */ 1832 */
1831 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) { 1833 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
1832 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "task abort: hidden raid " 1834 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1833 "component (sc=%p)\n", ioc->name, SCpnt)); 1835 "task abort: hidden raid component (sc=%p)\n",
1836 ioc->name, SCpnt));
1834 SCpnt->result = DID_RESET << 16; 1837 SCpnt->result = DID_RESET << 16;
1835 retval = FAILED; 1838 retval = FAILED;
1836 goto out; 1839 goto out;
@@ -1843,7 +1846,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1843 * Do OS callback. 1846 * Do OS callback.
1844 */ 1847 */
1845 SCpnt->result = DID_RESET << 16; 1848 SCpnt->result = DID_RESET << 16;
1846 dtmprintk(ioc, printk(KERN_DEBUG MYNAM ": %s: mptscsih_abort: " 1849 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "task abort: "
1847 "Command not in the active list! (sc=%p)\n", ioc->name, 1850 "Command not in the active list! (sc=%p)\n", ioc->name,
1848 SCpnt)); 1851 SCpnt));
1849 retval = 0; 1852 retval = 0;
@@ -1908,8 +1911,8 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
1908 /* If we can't locate our host adapter structure, return FAILED status. 1911 /* If we can't locate our host adapter structure, return FAILED status.
1909 */ 1912 */
1910 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 1913 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
1911 printk(KERN_DEBUG MYNAM ": mptscsih_dev_reset: Can't " 1914 printk(KERN_ERR MYNAM ": target reset: "
1912 "locate host! (sc=%p)\n", SCpnt); 1915 "Can't locate host! (sc=%p)\n", SCpnt);
1913 return FAILED; 1916 return FAILED;
1914 } 1917 }
1915 1918
@@ -1971,8 +1974,8 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1971 /* If we can't locate our host adapter structure, return FAILED status. 1974 /* If we can't locate our host adapter structure, return FAILED status.
1972 */ 1975 */
1973 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 1976 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
1974 printk(KERN_DEBUG MYNAM ": mptscsih_bus_reset: Can't " 1977 printk(KERN_ERR MYNAM ": bus reset: "
1975 "locate host! (sc=%p)\n", SCpnt ); 1978 "Can't locate host! (sc=%p)\n", SCpnt);
1976 return FAILED; 1979 return FAILED;
1977 } 1980 }
1978 1981
@@ -2015,8 +2018,8 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
2015 2018
2016 /* If we can't locate the host to reset, then we failed. */ 2019 /* If we can't locate the host to reset, then we failed. */
2017 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 2020 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
2018 printk( KERN_DEBUG MYNAM ": mptscsih_host_reset: Can't " 2021 printk(KERN_ERR MYNAM ": host reset: "
2019 "locate host! (sc=%p)\n", SCpnt); 2022 "Can't locate host! (sc=%p)\n", SCpnt);
2020 return FAILED; 2023 return FAILED;
2021 } 2024 }
2022 2025
@@ -2229,7 +2232,7 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m
2229 if (iocstatus == MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED || 2232 if (iocstatus == MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED ||
2230 hd->cmdPtr) 2233 hd->cmdPtr)
2231 if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) 2234 if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0)
2232 printk((KERN_WARNING " Firmware Reload FAILED!!\n")); 2235 printk(MYIOC_s_WARN_FMT " Firmware Reload FAILED!!\n", ioc->name);
2233 break; 2236 break;
2234 2237
2235 case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET: 2238 case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET:
@@ -2576,10 +2579,10 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
2576 unsigned long flags; 2579 unsigned long flags;
2577 int ii; 2580 int ii;
2578 2581
2579 dtmprintk(ioc, printk(KERN_DEBUG MYNAM 2582 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
2580 ": IOC %s_reset routed to SCSI host driver!\n", 2583 ": IOC %s_reset routed to SCSI host driver!\n",
2581 reset_phase==MPT_IOC_SETUP_RESET ? "setup" : ( 2584 ioc->name, reset_phase==MPT_IOC_SETUP_RESET ? "setup" : (
2582 reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post"))); 2585 reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post")));
2583 2586
2584 /* If a FW reload request arrives after base installed but 2587 /* If a FW reload request arrives after base installed but
2585 * before all scsi hosts have been attached, then an alt_ioc 2588 * before all scsi hosts have been attached, then an alt_ioc
@@ -2719,7 +2722,8 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
2719 case MPI_EVENT_STATE_CHANGE: /* 02 */ 2722 case MPI_EVENT_STATE_CHANGE: /* 02 */
2720 case MPI_EVENT_EVENT_CHANGE: /* 0A */ 2723 case MPI_EVENT_EVENT_CHANGE: /* 0A */
2721 default: 2724 default:
2722 dprintk(ioc, printk(KERN_DEBUG MYNAM ": Ignoring event (=%02Xh)\n", event)); 2725 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": Ignoring event (=%02Xh)\n",
2726 ioc->name, event));
2723 break; 2727 break;
2724 } 2728 }
2725 2729
@@ -2852,8 +2856,8 @@ mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
2852 SCSI_STD_SENSE_BYTES); 2856 SCSI_STD_SENSE_BYTES);
2853 memcpy(hd->pLocal->sense, sense_data, sz); 2857 memcpy(hd->pLocal->sense, sense_data, sz);
2854 2858
2855 ddvprintk(ioc, printk(KERN_DEBUG " Check Condition, sense ptr %p\n", 2859 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT " Check Condition, sense ptr %p\n",
2856 sense_data)); 2860 ioc->name, sense_data));
2857 } else if (pReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_FAILED) { 2861 } else if (pReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_FAILED) {
2858 if (pReq->CDB[0] == INQUIRY) 2862 if (pReq->CDB[0] == INQUIRY)
2859 completionCode = MPT_SCANDV_ISSUE_SENSE; 2863 completionCode = MPT_SCANDV_ISSUE_SENSE;
@@ -3085,8 +3089,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io)
3085 /* Get and Populate a free Frame 3089 /* Get and Populate a free Frame
3086 */ 3090 */
3087 if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) { 3091 if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) {
3088 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "No msg frames!\n", 3092 dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT "No msg frames!\n",
3089 hd->ioc->name)); 3093 hd->ioc->name));
3090 return -EBUSY; 3094 return -EBUSY;
3091 } 3095 }
3092 3096