aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r--drivers/message/fusion/mptspi.c53
1 files changed, 21 insertions, 32 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 947fe2901800..8c98420640a5 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -138,7 +138,9 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
138 else { 138 else {
139 factor = MPT_ULTRA320; 139 factor = MPT_ULTRA320;
140 if (scsi_device_qas(sdev)) { 140 if (scsi_device_qas(sdev)) {
141 ddvprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id)); 141 ddvprintk(hd->ioc,
142 printk(KERN_DEBUG "Enabling QAS due to "
143 "byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id));
142 noQas = 0; 144 noQas = 0;
143 } 145 }
144 if (sdev->type == TYPE_TAPE && 146 if (sdev->type == TYPE_TAPE &&
@@ -225,7 +227,8 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
225 /* Disable QAS in a mixed configuration case 227 /* Disable QAS in a mixed configuration case
226 */ 228 */
227 229
228 ddvprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); 230 ddvprintk(hd->ioc, printk(KERN_DEBUG
231 "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id));
229 } 232 }
230} 233}
231 234
@@ -256,8 +259,8 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id)
256 /* Get a MF for this command. 259 /* Get a MF for this command.
257 */ 260 */
258 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { 261 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
259 dfailprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n", 262 dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
260 ioc->name)); 263 "writeIOCPage4 : no msg frames!\n",ioc->name));
261 return -EAGAIN; 264 return -EAGAIN;
262 } 265 }
263 266
@@ -297,7 +300,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id)
297 300
298 mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); 301 mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
299 302
300 ddvprintk((MYIOC_s_INFO_FMT 303 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
301 "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", 304 "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
302 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel)); 305 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel));
303 306
@@ -422,7 +425,7 @@ static int mptspi_target_alloc(struct scsi_target *starget)
422 if (starget->channel == 0 && 425 if (starget->channel == 0 &&
423 mptspi_is_raid(hd, starget->id)) { 426 mptspi_is_raid(hd, starget->id)) {
424 vtarget->raidVolume = 1; 427 vtarget->raidVolume = 1;
425 ddvprintk((KERN_INFO 428 ddvprintk(hd->ioc, printk(KERN_DEBUG
426 "RAID Volume @ channel=%d id=%d\n", starget->channel, 429 "RAID Volume @ channel=%d id=%d\n", starget->channel,
427 starget->id)); 430 starget->id));
428 } 431 }
@@ -462,7 +465,7 @@ mptspi_target_destroy(struct scsi_target *starget)
462static void 465static void
463mptspi_print_write_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii) 466mptspi_print_write_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
464{ 467{
465 ddvprintk((MYIOC_s_INFO_FMT "id=%d Requested = 0x%08x" 468 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x"
466 " ( %s factor = 0x%02x @ offset = 0x%02x %s%s%s%s%s%s%s%s)\n", 469 " ( %s factor = 0x%02x @ offset = 0x%02x %s%s%s%s%s%s%s%s)\n",
467 hd->ioc->name, starget->id, ii, 470 hd->ioc->name, starget->id, ii,
468 ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "", 471 ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
@@ -487,7 +490,7 @@ mptspi_print_write_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget,
487static void 490static void
488mptspi_print_read_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii) 491mptspi_print_read_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
489{ 492{
490 ddvprintk((MYIOC_s_INFO_FMT "id=%d Read = 0x%08x" 493 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x"
491 " ( %s factor = 0x%02x @ offset = 0x%02x %s%s%s%s%s%s%s%s)\n", 494 " ( %s factor = 0x%02x @ offset = 0x%02x %s%s%s%s%s%s%s%s)\n",
492 hd->ioc->name, starget->id, ii, 495 hd->ioc->name, starget->id, ii,
493 ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "", 496 ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
@@ -613,7 +616,7 @@ mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id)
613 /* Get and Populate a free Frame 616 /* Get and Populate a free Frame
614 */ 617 */
615 if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) { 618 if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) {
616 ddvprintk((MYIOC_s_WARN_FMT "_do_raid: no msg frames!\n", 619 ddvprintk(hd->ioc, printk(MYIOC_s_WARN_FMT "_do_raid: no msg frames!\n",
617 hd->ioc->name)); 620 hd->ioc->name));
618 return -EAGAIN; 621 return -EAGAIN;
619 } 622 }
@@ -635,7 +638,7 @@ mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id)
635 mpt_add_sge((char *)&pReq->ActionDataSGE, 638 mpt_add_sge((char *)&pReq->ActionDataSGE,
636 MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); 639 MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
637 640
638 ddvprintk((MYIOC_s_INFO_FMT "RAID Volume action=%x channel=%d id=%d\n", 641 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n",
639 hd->ioc->name, pReq->Action, channel, id)); 642 hd->ioc->name, pReq->Action, channel, id));
640 643
641 hd->pLocal = NULL; 644 hd->pLocal = NULL;
@@ -735,7 +738,7 @@ static int mptspi_slave_configure(struct scsi_device *sdev)
735 if (ret) 738 if (ret)
736 return ret; 739 return ret;
737 740
738 ddvprintk((MYIOC_s_INFO_FMT "id=%d min_period=0x%02x" 741 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x"
739 " max_offset=0x%02x max_width=%d\n", hd->ioc->name, 742 " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
740 sdev->id, spi_min_period(scsi_target(sdev)), 743 sdev->id, spi_min_period(scsi_target(sdev)),
741 spi_max_offset(scsi_target(sdev)), 744 spi_max_offset(scsi_target(sdev)),
@@ -768,10 +771,8 @@ mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
768 return 0; 771 return 0;
769 } 772 }
770 773
771#ifdef MPT_DEBUG_DV
772 if (spi_dv_pending(scsi_target(SCpnt->device))) 774 if (spi_dv_pending(scsi_target(SCpnt->device)))
773 scsi_print_command(SCpnt); 775 ddvprintk(hd->ioc, scsi_print_command(SCpnt));
774#endif
775 776
776 return mptscsih_qcmd(SCpnt,done); 777 return mptscsih_qcmd(SCpnt,done);
777} 778}
@@ -1415,7 +1416,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1415 1416
1416 if (numSGE < sh->sg_tablesize) { 1417 if (numSGE < sh->sg_tablesize) {
1417 /* Reset this value */ 1418 /* Reset this value */
1418 dprintk((MYIOC_s_INFO_FMT 1419 dprintk(ioc, printk(MYIOC_s_INFO_FMT
1419 "Resetting sg_tablesize to %d from %d\n", 1420 "Resetting sg_tablesize to %d from %d\n",
1420 ioc->name, numSGE, sh->sg_tablesize)); 1421 ioc->name, numSGE, sh->sg_tablesize));
1421 sh->sg_tablesize = numSGE; 1422 sh->sg_tablesize = numSGE;
@@ -1435,7 +1436,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1435 goto out_mptspi_probe; 1436 goto out_mptspi_probe;
1436 } 1437 }
1437 1438
1438 dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p\n", 1439 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
1439 ioc->name, hd->ScsiLookup)); 1440 ioc->name, hd->ScsiLookup));
1440 1441
1441 /* Clear the TM flags 1442 /* Clear the TM flags
@@ -1463,7 +1464,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1463 ioc->spi_data.Saf_Te = mpt_saf_te; 1464 ioc->spi_data.Saf_Te = mpt_saf_te;
1464 1465
1465 hd->negoNvram = MPT_SCSICFG_USE_NVRAM; 1466 hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
1466 ddvprintk((MYIOC_s_INFO_FMT 1467 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1467 "saf_te %x\n", 1468 "saf_te %x\n",
1468 ioc->name, 1469 ioc->name,
1469 mpt_saf_te)); 1470 mpt_saf_te));
@@ -1481,7 +1482,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1481 1482
1482 error = scsi_add_host (sh, &ioc->pcidev->dev); 1483 error = scsi_add_host (sh, &ioc->pcidev->dev);
1483 if(error) { 1484 if(error) {
1484 dprintk((KERN_ERR MYNAM 1485 dprintk(ioc, printk(KERN_ERR MYNAM
1485 "scsi_add_host failed\n")); 1486 "scsi_add_host failed\n"));
1486 goto out_mptspi_probe; 1487 goto out_mptspi_probe;
1487 } 1488 }
@@ -1536,15 +1537,8 @@ mptspi_init(void)
1536 mptspiTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSPI_DRIVER); 1537 mptspiTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSPI_DRIVER);
1537 mptspiInternalCtx = mpt_register(mptscsih_scandv_complete, MPTSPI_DRIVER); 1538 mptspiInternalCtx = mpt_register(mptscsih_scandv_complete, MPTSPI_DRIVER);
1538 1539
1539 if (mpt_event_register(mptspiDoneCtx, mptspi_event_process) == 0) { 1540 mpt_event_register(mptspiDoneCtx, mptspi_event_process);
1540 devtverboseprintk((KERN_INFO MYNAM 1541 mpt_reset_register(mptspiDoneCtx, mptspi_ioc_reset);
1541 ": Registered for IOC event notifications\n"));
1542 }
1543
1544 if (mpt_reset_register(mptspiDoneCtx, mptspi_ioc_reset) == 0) {
1545 dprintk((KERN_INFO MYNAM
1546 ": Registered for IOC reset notifications\n"));
1547 }
1548 1542
1549 error = pci_register_driver(&mptspi_driver); 1543 error = pci_register_driver(&mptspi_driver);
1550 if (error) 1544 if (error)
@@ -1564,12 +1558,7 @@ mptspi_exit(void)
1564 pci_unregister_driver(&mptspi_driver); 1558 pci_unregister_driver(&mptspi_driver);
1565 1559
1566 mpt_reset_deregister(mptspiDoneCtx); 1560 mpt_reset_deregister(mptspiDoneCtx);
1567 dprintk((KERN_INFO MYNAM
1568 ": Deregistered for IOC reset notifications\n"));
1569
1570 mpt_event_deregister(mptspiDoneCtx); 1561 mpt_event_deregister(mptspiDoneCtx);
1571 dprintk((KERN_INFO MYNAM
1572 ": Deregistered for IOC event notifications\n"));
1573 1562
1574 mpt_deregister(mptspiInternalCtx); 1563 mpt_deregister(mptspiInternalCtx);
1575 mpt_deregister(mptspiTaskCtx); 1564 mpt_deregister(mptspiTaskCtx);