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;
266 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
267 dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
268 "writeIOCPage4 : no msg frames!\n",ioc->name));
290 IOCPage4Ptr = ioc->spi_data.pIocPg4;
291 dataDma = ioc->spi_data.IocPg4_dma;
303 ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
305 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
307 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel));
309 mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
343 if ((sdev->type == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) {
379 MPT_ADAPTER *ioc = hd->ioc;
381 if (!ioc->raid_data.pIocPg2)
384 if (!ioc->raid_data.pIocPg2->NumActiveVolumes)
386 for (i=0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) {
387 if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == id) {
402 MPT_ADAPTER *ioc;
407 ioc = hd->ioc;
412 vtarget->ioc_id = ioc->id;
420 if (mptscsih_is_phys_disk(ioc, 0, starget->id) == 0)
426 vtarget->id = mptscsih_raid_id_to_num(ioc, 0,
433 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
434 "RAID Volume @ channel=%d id=%d\n", ioc->name, starget->channel,
438 if (ioc->spi_data.nvram &&
439 ioc->spi_data.nvram[starget->id] != MPT_HOST_NVRAM_INVALID) {
440 u32 nvram = ioc->spi_data.nvram[starget->id];
444 spi_min_period(starget) = ioc->spi_data.minSyncFactor;
445 spi_max_width(starget) = ioc->spi_data.maxBusWidth;
447 spi_max_offset(starget) = ioc->spi_data.maxSyncOffset;
473 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x"
475 hd->ioc->name, starget->id, ii,
498 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x"
500 hd->ioc->name, starget->id, ii,
518 struct _MPT_ADAPTER *ioc = hd->ioc;
531 size = ioc->spi_data.sdp0length * 4;
533 if (ioc->spi_data.sdp0length & 1)
538 spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL);
541 "dma_alloc_coherent for parameters failed\n", ioc->name);
547 hdr.PageVersion = ioc->spi_data.sdp0version;
548 hdr.PageLength = ioc->spi_data.sdp0length;
561 if (mpt_config(ioc, &cfg)) {
562 starget_printk(KERN_ERR, starget, MYIOC_s_FMT "mpt_config failed\n", ioc->name);
571 dma_free_coherent(&ioc->pcidev->dev, size, spi_dev_pg0, spi_dev_pg0_dma);
620 MPT_ADAPTER *ioc = hd->ioc;
626 mutex_lock(&ioc->internal_cmds.mutex);
630 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
631 dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT
632 "%s: no msg frames!\n", ioc->name, __func__));
651 ioc->add_sge((char *)&pReq->ActionDataSGE,
654 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n",
655 ioc->name, pReq->Action, channel, id));
657 INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
658 mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
659 timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ);
660 if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
662 dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: TIMED OUT!\n",
663 ioc->name, __func__));
664 if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET)
668 ioc->name, __func__);
669 mpt_HardResetHandler(ioc, CAN_SLEEP);
670 mpt_free_msg_frame(ioc, mf);
675 ret = ioc->internal_cmds.completion_code;
678 CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
679 mutex_unlock(&ioc->internal_cmds.mutex);
687 MPT_ADAPTER *ioc = hd->ioc;
698 "Integrated RAID quiesce failed\n", ioc->name);
709 "Integrated RAID resume failed\n", ioc->name);
722 MPT_ADAPTER *ioc = hd->ioc;
725 mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0)
731 ioc->name, sizeof(VirtDevice));
762 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x"
763 " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
781 MPT_ADAPTER *ioc = hd->ioc;
790 mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) {
797 ddvprintk(ioc, scsi_print_command(SCpnt));
854 struct _MPT_ADAPTER *ioc = hd->ioc;
871 size = ioc->spi_data.sdp1length * 4;
873 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL);
876 "dma_alloc_coherent for parameters failed\n", ioc->name);
882 hdr.PageVersion = ioc->spi_data.sdp1version;
883 hdr.PageLength = ioc->spi_data.sdp1length;
911 "IDP:ON\n", ioc->name);
922 if (mpt_config(ioc, &cfg)) {
924 "mpt_config failed\n", ioc->name);
930 dma_free_coherent(&ioc->pcidev->dev, size, pg1, pg1_dma);
1068 hd->ioc->spi_data.noQas)
1115 MPT_ADAPTER *ioc = hd->ioc;
1116 struct Scsi_Host *shost = ioc->sh;
1123 mpt_findImVolumes(ioc);
1124 pg3 = ioc->raid_data.pIocPg3;
1142 "Integrated RAID requests DV of new device\n", ioc->name);
1146 "Integrated RAID detects new device %d\n", ioc->name, disk);
1147 scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, SCSI_SCAN_RESCAN);
1154 MPT_ADAPTER *ioc = hd->ioc;
1157 shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT
1159 ioc->name, disk);
1170 mptspi_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
1173 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1175 if (ioc->bus_type != SPI)
1187 return mptscsih_event_process(ioc, pEvReply);
1265 MPT_ADAPTER *ioc = hd->ioc;
1270 shost_for_each_device(sdev, ioc->sh) {
1281 shost_for_each_device(sdev, ioc->sh)
1304 mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1308 rc = mptscsih_ioc_reset(ioc, reset_phase);
1309 if ((ioc->bus_type != SPI) || (!rc))
1313 * if we get an ioc fault on bringup, ioc->sh will be NULL */
1315 ioc->sh) {
1316 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1331 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1332 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1356 MPT_ADAPTER *ioc;
1368 ioc = pci_get_drvdata(pdev);
1369 ioc->DoneCtx = mptspiDoneCtx;
1370 ioc->TaskCtx = mptspiTaskCtx;
1371 ioc->InternalCtx = mptspiInternalCtx;
1375 if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {
1378 ioc->name);
1383 if (!ioc->active) {
1385 ioc->name);
1393 for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) {
1394 if (ioc->pfacts[ii].ProtocolFlags &
1401 "Skipping ioc=%p because SCSI Initiator mode is NOT enabled!\n",
1402 ioc->name, ioc);
1411 ioc->name);
1421 spin_lock_irqsave(&ioc->FreeQlock, flags);
1425 ioc->sh = sh;
1444 sh->max_id = ioc->devices_per_bus;
1450 if (ioc->ir_firmware)
1454 sh->this_id = ioc->pfacts[0].PortSCSIID;
1458 sh->unique_id = ioc->id;
1469 scale = ioc->req_sz/ioc->SGE_size;
1470 if (ioc->sg_addr_size == sizeof(u64)) {
1472 (ioc->facts.MaxChainDepth-1) + scale +
1473 (ioc->req_sz - 60) / ioc->SGE_size;
1476 (ioc->facts.MaxChainDepth-1) + scale +
1477 (ioc->req_sz - 64) / ioc->SGE_size;
1482 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1484 ioc->name, numSGE, sh->sg_tablesize));
1488 spin_unlock_irqrestore(&ioc->FreeQlock, flags);
1491 hd->ioc = ioc;
1496 ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_KERNEL);
1497 if (!ioc->ScsiLookup) {
1501 spin_lock_init(&ioc->scsi_lookup_lock);
1503 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
1504 ioc->name, ioc->ScsiLookup));
1506 ioc->spi_data.Saf_Te = mpt_saf_te;
1507 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1509 ioc->name,
1511 ioc->spi_data.noQas = 0;
1518 if (ioc->spi_data.sdp0length != 0)
1521 error = scsi_add_host (sh, &ioc->pcidev->dev);
1523 dprintk(ioc, printk(MYIOC_s_ERR_FMT
1524 "scsi_add_host failed\n", ioc->name));
1531 if (ioc->spi_data.bus_reset)
1547 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1549 scsi_remove_host(ioc->sh);