• Home
  • Raw
  • Download

Lines Matching refs:ioc

111 	MPT_ADAPTER *ioc = hd->ioc;  in mptspi_setTargetNegoParms()  local
112 SpiCfgData *pspi_data = &ioc->spi_data; in mptspi_setTargetNegoParms()
143 ddvprintk(ioc, in mptspi_setTargetNegoParms()
145 "byte56=%02x on id=%d!\n", ioc->name, in mptspi_setTargetNegoParms()
237 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_setTargetNegoParms()
238 "Disabling QAS due to noQas=%02x on id=%d!\n", ioc->name, noQas, id)); in mptspi_setTargetNegoParms()
256 MPT_ADAPTER *ioc = hd->ioc; in mptspi_writeIOCPage4() local
266 if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { in mptspi_writeIOCPage4()
267 dfailprintk(ioc, printk(MYIOC_s_WARN_FMT in mptspi_writeIOCPage4()
268 "writeIOCPage4 : no msg frames!\n",ioc->name)); in mptspi_writeIOCPage4()
290 IOCPage4Ptr = ioc->spi_data.pIocPg4; in mptspi_writeIOCPage4()
291 dataDma = ioc->spi_data.IocPg4_dma; in mptspi_writeIOCPage4()
303 ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); 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()
473 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Requested = 0x%08x" in mptspi_print_write_nego()
475 hd->ioc->name, starget->id, ii, in mptspi_print_write_nego()
498 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d Read = 0x%08x" in mptspi_print_read_nego()
500 hd->ioc->name, starget->id, ii, in mptspi_print_read_nego()
518 struct _MPT_ADAPTER *ioc = hd->ioc; in mptspi_read_spi_device_pg0() local
531 size = ioc->spi_data.sdp0length * 4; in mptspi_read_spi_device_pg0()
538 spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL); in mptspi_read_spi_device_pg0()
541 "dma_alloc_coherent for parameters failed\n", ioc->name); in mptspi_read_spi_device_pg0()
547 hdr.PageVersion = ioc->spi_data.sdp0version; in mptspi_read_spi_device_pg0()
548 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()
620 MPT_ADAPTER *ioc = hd->ioc; in mptscsih_quiesce_raid() local
626 mutex_lock(&ioc->internal_cmds.mutex); in mptscsih_quiesce_raid()
630 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { in mptscsih_quiesce_raid()
631 dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT in mptscsih_quiesce_raid()
632 "%s: no msg frames!\n", ioc->name, __func__)); in mptscsih_quiesce_raid()
651 ioc->add_sge((char *)&pReq->ActionDataSGE, in mptscsih_quiesce_raid()
654 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n", in mptscsih_quiesce_raid()
655 ioc->name, pReq->Action, channel, id)); in mptscsih_quiesce_raid()
657 INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status) in mptscsih_quiesce_raid()
658 mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); in mptscsih_quiesce_raid()
659 timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ); in mptscsih_quiesce_raid()
660 if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { in mptscsih_quiesce_raid()
662 dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: TIMED OUT!\n", in mptscsih_quiesce_raid()
663 ioc->name, __func__)); in mptscsih_quiesce_raid()
664 if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) in mptscsih_quiesce_raid()
668 ioc->name, __func__); in mptscsih_quiesce_raid()
669 mpt_HardResetHandler(ioc, CAN_SLEEP); in mptscsih_quiesce_raid()
670 mpt_free_msg_frame(ioc, mf); in mptscsih_quiesce_raid()
675 ret = ioc->internal_cmds.completion_code; in mptscsih_quiesce_raid()
678 CLEAR_MGMT_STATUS(ioc->internal_cmds.status) in mptscsih_quiesce_raid()
679 mutex_unlock(&ioc->internal_cmds.mutex); in mptscsih_quiesce_raid()
687 MPT_ADAPTER *ioc = hd->ioc; in mptspi_dv_device() local
698 "Integrated RAID quiesce failed\n", ioc->name); in mptspi_dv_device()
709 "Integrated RAID resume failed\n", ioc->name); in mptspi_dv_device()
722 MPT_ADAPTER *ioc = hd->ioc; in mptspi_slave_alloc() local
725 mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0) in mptspi_slave_alloc()
731 ioc->name, sizeof(VirtDevice)); in mptspi_slave_alloc()
762 ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x" in mptspi_slave_configure()
763 " max_offset=0x%02x max_width=%d\n", hd->ioc->name, in mptspi_slave_configure()
781 MPT_ADAPTER *ioc = hd->ioc; in mptspi_qcmd() local
790 mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) { in mptspi_qcmd()
797 ddvprintk(ioc, scsi_print_command(SCpnt)); in mptspi_qcmd()
854 struct _MPT_ADAPTER *ioc = hd->ioc; in mptspi_write_spi_device_pg1() local
871 size = ioc->spi_data.sdp1length * 4; in mptspi_write_spi_device_pg1()
873 pg1 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg1_dma, GFP_KERNEL); in mptspi_write_spi_device_pg1()
876 "dma_alloc_coherent for parameters failed\n", ioc->name); in mptspi_write_spi_device_pg1()
882 hdr.PageVersion = ioc->spi_data.sdp1version; in mptspi_write_spi_device_pg1()
883 hdr.PageLength = ioc->spi_data.sdp1length; in mptspi_write_spi_device_pg1()
911 "IDP:ON\n", ioc->name); in mptspi_write_spi_device_pg1()
922 if (mpt_config(ioc, &cfg)) { in mptspi_write_spi_device_pg1()
924 "mpt_config failed\n", ioc->name); in mptspi_write_spi_device_pg1()
930 dma_free_coherent(&ioc->pcidev->dev, size, pg1, pg1_dma); in mptspi_write_spi_device_pg1()
1068 hd->ioc->spi_data.noQas) in MPTSPI_SIMPLE_TRANSPORT_PARM()
1115 MPT_ADAPTER *ioc = hd->ioc; in mpt_work_wrapper() local
1116 struct Scsi_Host *shost = ioc->sh; in mpt_work_wrapper()
1123 mpt_findImVolumes(ioc); in mpt_work_wrapper()
1124 pg3 = ioc->raid_data.pIocPg3; in mpt_work_wrapper()
1142 "Integrated RAID requests DV of new device\n", ioc->name); in mpt_work_wrapper()
1146 "Integrated RAID detects new device %d\n", ioc->name, disk); in mpt_work_wrapper()
1147 scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, SCSI_SCAN_RESCAN); in mpt_work_wrapper()
1154 MPT_ADAPTER *ioc = hd->ioc; in mpt_dv_raid() local
1157 shost_printk(KERN_ERR, ioc->sh, MYIOC_s_FMT in mpt_dv_raid()
1159 ioc->name, disk); in mpt_dv_raid()
1170 mptspi_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) in mptspi_event_process() argument
1173 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_event_process()
1175 if (ioc->bus_type != SPI) in mptspi_event_process()
1187 return mptscsih_event_process(ioc, pEvReply); in mptspi_event_process()
1265 MPT_ADAPTER *ioc = hd->ioc; in mptspi_dv_renegotiate_work() local
1270 shost_for_each_device(sdev, ioc->sh) { in mptspi_dv_renegotiate_work()
1281 shost_for_each_device(sdev, ioc->sh) in mptspi_dv_renegotiate_work()
1304 mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) in mptspi_ioc_reset() argument
1308 rc = mptscsih_ioc_reset(ioc, reset_phase); in mptspi_ioc_reset()
1309 if ((ioc->bus_type != SPI) || (!rc)) in mptspi_ioc_reset()
1315 ioc->sh) { in mptspi_ioc_reset()
1316 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_ioc_reset()
1331 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); in mptspi_resume() local
1332 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); in mptspi_resume()
1356 MPT_ADAPTER *ioc; in mptspi_probe() local
1368 ioc = pci_get_drvdata(pdev); in mptspi_probe()
1369 ioc->DoneCtx = mptspiDoneCtx; in mptspi_probe()
1370 ioc->TaskCtx = mptspiTaskCtx; in mptspi_probe()
1371 ioc->InternalCtx = mptspiInternalCtx; in mptspi_probe()
1375 if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { in mptspi_probe()
1378 ioc->name); in mptspi_probe()
1383 if (!ioc->active) { in mptspi_probe()
1385 ioc->name); in mptspi_probe()
1393 for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { in mptspi_probe()
1394 if (ioc->pfacts[ii].ProtocolFlags & in mptspi_probe()
1402 ioc->name, ioc); in mptspi_probe()
1411 ioc->name); in mptspi_probe()
1421 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptspi_probe()
1425 ioc->sh = sh; in mptspi_probe()
1444 sh->max_id = ioc->devices_per_bus; in mptspi_probe()
1450 if (ioc->ir_firmware) in mptspi_probe()
1454 sh->this_id = ioc->pfacts[0].PortSCSIID; in mptspi_probe()
1458 sh->unique_id = ioc->id; in mptspi_probe()
1469 scale = ioc->req_sz/ioc->SGE_size; in mptspi_probe()
1470 if (ioc->sg_addr_size == sizeof(u64)) { in mptspi_probe()
1472 (ioc->facts.MaxChainDepth-1) + scale + in mptspi_probe()
1473 (ioc->req_sz - 60) / ioc->SGE_size; in mptspi_probe()
1476 (ioc->facts.MaxChainDepth-1) + scale + in mptspi_probe()
1477 (ioc->req_sz - 64) / ioc->SGE_size; in mptspi_probe()
1482 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_probe()
1484 ioc->name, numSGE, sh->sg_tablesize)); in mptspi_probe()
1488 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptspi_probe()
1491 hd->ioc = ioc; in mptspi_probe()
1496 ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC); in mptspi_probe()
1497 if (!ioc->ScsiLookup) { in mptspi_probe()
1501 spin_lock_init(&ioc->scsi_lookup_lock); in mptspi_probe()
1503 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n", in mptspi_probe()
1504 ioc->name, ioc->ScsiLookup)); in mptspi_probe()
1506 ioc->spi_data.Saf_Te = mpt_saf_te; in mptspi_probe()
1507 ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT in mptspi_probe()
1509 ioc->name, in mptspi_probe()
1511 ioc->spi_data.noQas = 0; in mptspi_probe()
1518 if (ioc->spi_data.sdp0length != 0) in mptspi_probe()
1521 error = scsi_add_host (sh, &ioc->pcidev->dev); in mptspi_probe()
1523 dprintk(ioc, printk(MYIOC_s_ERR_FMT in mptspi_probe()
1524 "scsi_add_host failed\n", ioc->name)); in mptspi_probe()
1531 if (ioc->spi_data.bus_reset) in mptspi_probe()
1547 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); in mptspi_remove() local
1549 scsi_remove_host(ioc->sh); in mptspi_remove()