Lines Matching refs:ioc
110 MPT_ADAPTER *ioc = hd->ioc; in mptspi_setTargetNegoParms() local
111 SpiCfgData *pspi_data = &ioc->spi_data; in mptspi_setTargetNegoParms()
142 ddvprintk(ioc, in mptspi_setTargetNegoParms()
144 "byte56=%02x on id=%d!\n", ioc->name, in mptspi_setTargetNegoParms()
232 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_setTargetNegoParms()
233 "Disabling QAS due to noQas=%02x on id=%d!\n", ioc->name, noQas, id)); in mptspi_setTargetNegoParms()
251 MPT_ADAPTER *ioc = hd->ioc; in mptspi_writeIOCPage4() local
263 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { in mptspi_writeIOCPage4()
264 dfailprintk(ioc, printk(MYIOC_s_WARN_FMT in mptspi_writeIOCPage4()
265 "writeIOCPage4 : no msg frames!\n",ioc->name)); in mptspi_writeIOCPage4()
275 frameOffset = ioc->req_sz - sizeof(IOCPage4_t); in mptspi_writeIOCPage4()
290 IOCPage4Ptr = ioc->spi_data.pIocPg4; in mptspi_writeIOCPage4()
291 dataDma = ioc->spi_data.IocPg4_dma; in mptspi_writeIOCPage4()
305 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_writeIOCPage4()
307 ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, channel)); in mptspi_writeIOCPage4()
309 mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); in mptspi_writeIOCPage4()
343 if ((sdev->type == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) { in mptspi_initTarget()
379 MPT_ADAPTER *ioc = hd->ioc; in mptspi_is_raid() local
381 if (!ioc->raid_data.pIocPg2) in mptspi_is_raid()
384 if (!ioc->raid_data.pIocPg2->NumActiveVolumes) in mptspi_is_raid()
386 for (i=0; i < ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { in mptspi_is_raid()
387 if (ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID == id) { in mptspi_is_raid()
402 MPT_ADAPTER *ioc; in mptspi_target_alloc() local
407 ioc = hd->ioc; in mptspi_target_alloc()
412 vtarget->ioc_id = ioc->id; in mptspi_target_alloc()
420 if (mptscsih_is_phys_disk(ioc, 0, starget->id) == 0) in mptspi_target_alloc()
426 vtarget->id = mptscsih_raid_id_to_num(ioc, 0, in mptspi_target_alloc()
433 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_target_alloc()
434 "RAID Volume @ channel=%d id=%d\n", ioc->name, starget->channel, in mptspi_target_alloc()
438 if (ioc->spi_data.nvram && in mptspi_target_alloc()
439 ioc->spi_data.nvram[starget->id] != MPT_HOST_NVRAM_INVALID) { in mptspi_target_alloc()
440 u32 nvram = ioc->spi_data.nvram[starget->id]; in mptspi_target_alloc()
444 spi_min_period(starget) = ioc->spi_data.minSyncFactor; in mptspi_target_alloc()
445 spi_max_width(starget) = ioc->spi_data.maxBusWidth; in mptspi_target_alloc()
447 spi_max_offset(starget) = ioc->spi_data.maxSyncOffset; in mptspi_target_alloc()
474 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x" in mptspi_print_write_nego()
476 hd->ioc->name, starget->id, ii, in mptspi_print_write_nego()
499 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x" in mptspi_print_read_nego()
501 hd->ioc->name, starget->id, ii, in mptspi_print_read_nego()
519 struct _MPT_ADAPTER *ioc = hd->ioc; in mptspi_read_spi_device_pg0() local
532 size = ioc->spi_data.sdp0length * 4; in mptspi_read_spi_device_pg0()
539 spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL); in mptspi_read_spi_device_pg0()
542 "dma_alloc_coherent for parameters failed\n", ioc->name); in mptspi_read_spi_device_pg0()
548 hdr.PageVersion = ioc->spi_data.sdp0version; in mptspi_read_spi_device_pg0()
549 hdr.PageLength = ioc->spi_data.sdp0length; in mptspi_read_spi_device_pg0()
561 if (mpt_config(ioc, &cfg)) { in mptspi_read_spi_device_pg0()
562 starget_printk(KERN_ERR, starget, MYIOC_s_FMT "mpt_config failed\n", ioc->name); in mptspi_read_spi_device_pg0()
571 dma_free_coherent(&ioc->pcidev->dev, size, spi_dev_pg0, spi_dev_pg0_dma); in mptspi_read_spi_device_pg0()
622 MPT_ADAPTER *ioc = hd->ioc; in mptscsih_quiesce_raid() local
626 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { in mptscsih_quiesce_raid()
627 ddvprintk(ioc, printk(MYIOC_s_WARN_FMT "_do_raid: no msg frames!\n", in mptscsih_quiesce_raid()
628 ioc->name)); in mptscsih_quiesce_raid()
649 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n", in mptscsih_quiesce_raid()
650 ioc->name, pReq->Action, channel, id)); in mptscsih_quiesce_raid()
662 mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); in mptscsih_quiesce_raid()
675 MPT_ADAPTER *ioc = hd->ioc; in mptspi_dv_device() local
686 "Integrated RAID quiesce failed\n", ioc->name); in mptspi_dv_device()
697 "Integrated RAID resume failed\n", ioc->name); in mptspi_dv_device()
710 MPT_ADAPTER *ioc = hd->ioc; in mptspi_slave_alloc() local
713 mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0) in mptspi_slave_alloc()
719 ioc->name, sizeof(VirtDevice)); in mptspi_slave_alloc()
750 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x" in mptspi_slave_configure()
751 " max_offset=0x%02x max_width=%d\n", hd->ioc->name, in mptspi_slave_configure()
769 MPT_ADAPTER *ioc = hd->ioc; in mptspi_qcmd() local
778 mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) { in mptspi_qcmd()
785 ddvprintk(ioc, scsi_print_command(SCpnt)); in mptspi_qcmd()
843 struct _MPT_ADAPTER *ioc = hd->ioc; in mptspi_write_spi_device_pg1() local
856 size = ioc->spi_data.sdp1length * 4; in mptspi_write_spi_device_pg1()
858 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL); in mptspi_write_spi_device_pg1()
861 "dma_alloc_coherent for parameters failed\n", ioc->name); in mptspi_write_spi_device_pg1()
867 hdr.PageVersion = ioc->spi_data.sdp1version; in mptspi_write_spi_device_pg1()
868 hdr.PageLength = ioc->spi_data.sdp1length; in mptspi_write_spi_device_pg1()
889 if (mpt_config(ioc, &cfg)) { in mptspi_write_spi_device_pg1()
891 "mpt_config failed\n", ioc->name); in mptspi_write_spi_device_pg1()
897 dma_free_coherent(&ioc->pcidev->dev, size, pg1, pg1_dma); in mptspi_write_spi_device_pg1()
1035 hd->ioc->spi_data.noQas) in MPTSPI_SIMPLE_TRANSPORT_PARM()
1082 MPT_ADAPTER *ioc = hd->ioc; in mpt_work_wrapper() local
1083 struct Scsi_Host *shost = ioc->sh; in mpt_work_wrapper()
1090 mpt_findImVolumes(ioc); in mpt_work_wrapper()
1091 pg3 = ioc->raid_data.pIocPg3; in mpt_work_wrapper()
1109 "Integrated RAID requests DV of new device\n", ioc->name); in mpt_work_wrapper()
1113 "Integrated RAID detects new device %d\n", ioc->name, disk); in mpt_work_wrapper()
1114 scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, 1); in mpt_work_wrapper()
1121 MPT_ADAPTER *ioc = hd->ioc; in mpt_dv_raid() local
1124 shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT in mpt_dv_raid()
1126 ioc->name, disk); in mpt_dv_raid()
1137 mptspi_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) in mptspi_event_process() argument
1140 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_event_process()
1151 return mptscsih_event_process(ioc, pEvReply); in mptspi_event_process()
1229 MPT_ADAPTER *ioc = hd->ioc; in mptspi_dv_renegotiate_work() local
1234 shost_for_each_device(sdev, ioc->sh) { in mptspi_dv_renegotiate_work()
1245 shost_for_each_device(sdev, ioc->sh) in mptspi_dv_renegotiate_work()
1268 mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) in mptspi_ioc_reset() argument
1272 rc = mptscsih_ioc_reset(ioc, reset_phase); in mptspi_ioc_reset()
1277 ioc->sh) { in mptspi_ioc_reset()
1278 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_ioc_reset()
1293 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); in mptspi_resume() local
1294 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_resume()
1318 MPT_ADAPTER *ioc; in mptspi_probe() local
1330 ioc = pci_get_drvdata(pdev); in mptspi_probe()
1331 ioc->DoneCtx = mptspiDoneCtx; in mptspi_probe()
1332 ioc->TaskCtx = mptspiTaskCtx; in mptspi_probe()
1333 ioc->InternalCtx = mptspiInternalCtx; in mptspi_probe()
1337 if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { in mptspi_probe()
1340 ioc->name); in mptspi_probe()
1345 if (!ioc->active) { in mptspi_probe()
1347 ioc->name); in mptspi_probe()
1355 for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { in mptspi_probe()
1356 if (ioc->pfacts[ii].ProtocolFlags & in mptspi_probe()
1364 ioc->name, ioc); in mptspi_probe()
1373 ioc->name); in mptspi_probe()
1378 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptspi_probe()
1382 ioc->sh = sh; in mptspi_probe()
1401 sh->max_id = ioc->devices_per_bus; in mptspi_probe()
1407 if (ioc->ir_firmware) in mptspi_probe()
1411 sh->this_id = ioc->pfacts[0].PortSCSIID; in mptspi_probe()
1415 sh->unique_id = ioc->id; in mptspi_probe()
1426 scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); in mptspi_probe()
1429 (ioc->facts.MaxChainDepth-1) + scale + in mptspi_probe()
1430 (ioc->req_sz - 60) / (sizeof(dma_addr_t) + in mptspi_probe()
1434 (ioc->facts.MaxChainDepth-1) + scale + in mptspi_probe()
1435 (ioc->req_sz - 64) / (sizeof(dma_addr_t) + in mptspi_probe()
1441 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_probe()
1443 ioc->name, numSGE, sh->sg_tablesize)); in mptspi_probe()
1447 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptspi_probe()
1450 hd->ioc = ioc; in mptspi_probe()
1455 ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC); in mptspi_probe()
1456 if (!ioc->ScsiLookup) { in mptspi_probe()
1460 spin_lock_init(&ioc->scsi_lookup_lock); in mptspi_probe()
1462 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n", in mptspi_probe()
1463 ioc->name, ioc->ScsiLookup)); in mptspi_probe()
1487 ioc->spi_data.Saf_Te = mpt_saf_te; in mptspi_probe()
1490 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_probe()
1492 ioc->name, in mptspi_probe()
1494 ioc->spi_data.noQas = 0; in mptspi_probe()
1503 if (ioc->spi_data.sdp0length != 0) in mptspi_probe()
1506 error = scsi_add_host (sh, &ioc->pcidev->dev); in mptspi_probe()
1508 dprintk(ioc, printk(MYIOC_s_ERR_FMT in mptspi_probe()
1509 "scsi_add_host failed\n", ioc->name)); in mptspi_probe()
1516 if (ioc->spi_data.bus_reset) in mptspi_probe()