Lines Matching refs:ioc

111 	MPT_ADAPTER *ioc = hd->ioc;
112 SpiCfgData *pspi_data = &ioc->spi_data;
143 ddvprintk(ioc,
145 "byte56=%02x on id=%d!\n", ioc->name,
237 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
238 "Disabling QAS due to noQas=%02x on id=%d!\n", ioc->name, noQas, id));
256 MPT_ADAPTER *ioc = hd->ioc;
268 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
269 dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
270 "writeIOCPage4 : no msg frames!\n",ioc->name));
280 frameOffset = ioc->req_sz - sizeof(IOCPage4_t);
295 IOCPage4Ptr = ioc->spi_data.pIocPg4;
296 dataDma = ioc->spi_data.IocPg4_dma;
308 ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
310 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
312 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel));
314 mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
348 if ((sdev->type == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) {
384 MPT_ADAPTER *ioc = hd->ioc;
386 if (!ioc->raid_data.pIocPg2)
389 if (!ioc->raid_data.pIocPg2->NumActiveVolumes)
391 for (i=0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) {
392 if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == id) {
407 MPT_ADAPTER *ioc;
412 ioc = hd->ioc;
417 vtarget->ioc_id = ioc->id;
425 if (mptscsih_is_phys_disk(ioc, 0, starget->id) == 0)
431 vtarget->id = mptscsih_raid_id_to_num(ioc, 0,
438 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
439 "RAID Volume @ channel=%d id=%d\n", ioc->name, starget->channel,
443 if (ioc->spi_data.nvram &&
444 ioc->spi_data.nvram[starget->id] != MPT_HOST_NVRAM_INVALID) {
445 u32 nvram = ioc->spi_data.nvram[starget->id];
449 spi_min_period(starget) = ioc->spi_data.minSyncFactor;
450 spi_max_width(starget) = ioc->spi_data.maxBusWidth;
452 spi_max_offset(starget) = ioc->spi_data.maxSyncOffset;
479 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x"
481 hd->ioc->name, starget->id, ii,
504 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x"
506 hd->ioc->name, starget->id, ii,
524 struct _MPT_ADAPTER *ioc = hd->ioc;
537 size = ioc->spi_data.sdp0length * 4;
539 if (ioc->spi_data.sdp0length & 1)
544 spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL);
547 "dma_alloc_coherent for parameters failed\n", ioc->name);
553 hdr.PageVersion = ioc->spi_data.sdp0version;
554 hdr.PageLength = ioc->spi_data.sdp0length;
567 if (mpt_config(ioc, &cfg)) {
568 starget_printk(KERN_ERR, starget, MYIOC_s_FMT "mpt_config failed\n", ioc->name);
577 dma_free_coherent(&ioc->pcidev->dev, size, spi_dev_pg0, spi_dev_pg0_dma);
626 MPT_ADAPTER *ioc = hd->ioc;
632 mutex_lock(&ioc->internal_cmds.mutex);
636 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
637 dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT
638 "%s: no msg frames!\n", ioc->name, __func__));
657 ioc->add_sge((char *)&pReq->ActionDataSGE,
660 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n",
661 ioc->name, pReq->Action, channel, id));
663 INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
664 mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
665 timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ);
666 if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
668 dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: TIMED OUT!\n",
669 ioc->name, __func__));
670 if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET)
674 ioc->name, __func__);
675 mpt_HardResetHandler(ioc, CAN_SLEEP);
676 mpt_free_msg_frame(ioc, mf);
681 ret = ioc->internal_cmds.completion_code;
684 CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
685 mutex_unlock(&ioc->internal_cmds.mutex);
693 MPT_ADAPTER *ioc = hd->ioc;
704 "Integrated RAID quiesce failed\n", ioc->name);
715 "Integrated RAID resume failed\n", ioc->name);
728 MPT_ADAPTER *ioc = hd->ioc;
731 mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0)
737 ioc->name, sizeof(VirtDevice));
768 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x"
769 " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
787 MPT_ADAPTER *ioc = hd->ioc;
796 mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) {
803 ddvprintk(ioc, scsi_print_command(SCpnt));
863 struct _MPT_ADAPTER *ioc = hd->ioc;
880 size = ioc->spi_data.sdp1length * 4;
882 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL);
885 "dma_alloc_coherent for parameters failed\n", ioc->name);
891 hdr.PageVersion = ioc->spi_data.sdp1version;
892 hdr.PageLength = ioc->spi_data.sdp1length;
920 "IDP:ON\n", ioc->name);
931 if (mpt_config(ioc, &cfg)) {
933 "mpt_config failed\n", ioc->name);
939 dma_free_coherent(&ioc->pcidev->dev, size, pg1, pg1_dma);
1077 hd->ioc->spi_data.noQas)
1124 MPT_ADAPTER *ioc = hd->ioc;
1125 struct Scsi_Host *shost = ioc->sh;
1132 mpt_findImVolumes(ioc);
1133 pg3 = ioc->raid_data.pIocPg3;
1151 "Integrated RAID requests DV of new device\n", ioc->name);
1155 "Integrated RAID detects new device %d\n", ioc->name, disk);
1156 scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, 1);
1163 MPT_ADAPTER *ioc = hd->ioc;
1166 shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT
1168 ioc->name, disk);
1179 mptspi_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
1182 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1184 if (ioc->bus_type != SPI)
1196 return mptscsih_event_process(ioc, pEvReply);
1274 MPT_ADAPTER *ioc = hd->ioc;
1279 shost_for_each_device(sdev, ioc->sh) {
1290 shost_for_each_device(sdev, ioc->sh)
1313 mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1317 rc = mptscsih_ioc_reset(ioc, reset_phase);
1318 if ((ioc->bus_type != SPI) || (!rc))
1322 * if we get an ioc fault on bringup, ioc->sh will be NULL */
1324 ioc->sh) {
1325 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1340 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1341 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1365 MPT_ADAPTER *ioc;
1377 ioc = pci_get_drvdata(pdev);
1378 ioc->DoneCtx = mptspiDoneCtx;
1379 ioc->TaskCtx = mptspiTaskCtx;
1380 ioc->InternalCtx = mptspiInternalCtx;
1384 if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {
1387 ioc->name);
1392 if (!ioc->active) {
1394 ioc->name);
1402 for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) {
1403 if (ioc->pfacts[ii].ProtocolFlags &
1410 "Skipping ioc=%p because SCSI Initiator mode is NOT enabled!\n",
1411 ioc->name, ioc);
1420 ioc->name);
1425 spin_lock_irqsave(&ioc->FreeQlock, flags);
1429 ioc->sh = sh;
1448 sh->max_id = ioc->devices_per_bus;
1454 if (ioc->ir_firmware)
1458 sh->this_id = ioc->pfacts[0].PortSCSIID;
1462 sh->unique_id = ioc->id;
1473 scale = ioc->req_sz/ioc->SGE_size;
1474 if (ioc->sg_addr_size == sizeof(u64)) {
1476 (ioc->facts.MaxChainDepth-1) + scale +
1477 (ioc->req_sz - 60) / ioc->SGE_size;
1480 (ioc->facts.MaxChainDepth-1) + scale +
1481 (ioc->req_sz - 64) / ioc->SGE_size;
1486 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1488 ioc->name, numSGE, sh->sg_tablesize));
1492 spin_unlock_irqrestore(&ioc->FreeQlock, flags);
1495 hd->ioc = ioc;
1500 ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC);
1501 if (!ioc->ScsiLookup) {
1505 spin_lock_init(&ioc->scsi_lookup_lock);
1507 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
1508 ioc->name, ioc->ScsiLookup));
1510 ioc->spi_data.Saf_Te = mpt_saf_te;
1511 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1513 ioc->name,
1515 ioc->spi_data.noQas = 0;
1522 if (ioc->spi_data.sdp0length != 0)
1525 error = scsi_add_host (sh, &ioc->pcidev->dev);
1527 dprintk(ioc, printk(MYIOC_s_ERR_FMT
1528 "scsi_add_host failed\n", ioc->name));
1535 if (ioc->spi_data.bus_reset)