Lines Matching refs:ioc

159 static int	mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
161 static int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
180 static int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
181 static int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
190 static int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
199 static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id);
446 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_getFreeChainBuffer()
454 chain_idx = offset / hd->ioc->req_sz; in mptscsih_getFreeChainBuffer()
461 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_getFreeChainBuffer()
467 hd->ioc->name, *retIndex, chainBuf)); in mptscsih_getFreeChainBuffer()
508 frm_sz = hd->ioc->req_sz; in mptscsih_AddSGE()
514 if ( (sges_left = pci_map_sg(hd->ioc->pcidev, in mptscsih_AddSGE()
524 buf_dma_addr = pci_map_single(hd->ioc->pcidev, in mptscsih_AddSGE()
534 hd->ioc->name, SCpnt, SCpnt->request_bufflen)); in mptscsih_AddSGE()
630 hd->ioc->name, sg_done)); in mptscsih_AddSGE()
681 chain_dma_off = hd->ioc->req_sz * chain_idx; in mptscsih_AddSGE()
725 mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) in mptscsih_io_done() argument
736 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_io_done()
748 printk(MYIOC_s_ERR_FMT "NULL ScsiCmd ptr!\n", ioc->name); in mptscsih_io_done()
755 ioc->name, mf, mr, sc, req_idx)); in mptscsih_io_done()
762 if (ioc->timeout_cnt > 0) { in mptscsih_io_done()
768 ioc->name, sc, jiffies); in mptscsih_io_done()
776 ioc->timeout_maxcnt = 0; in mptscsih_io_done()
777 ioc->timeout_cnt = 0; in mptscsih_io_done()
806 ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], in mptscsih_io_done()
1041 pci_unmap_sg(ioc->pcidev, (struct scatterlist *) sc->request_buffer, in mptscsih_io_done()
1047 pci_unmap_single(ioc->pcidev, (dma_addr_t)(ulong)my_priv->p1, in mptscsih_io_done()
1089 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in search_taskQ()
1107 Q_ADD_TAIL(&hd->ioc->FreeQ, in search_taskQ()
1111 hd->ioc->mfcnt--; in search_taskQ()
1121 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in search_taskQ()
1148 MPT_ADAPTER *ioc = hd->ioc; in clean_taskQ() local
1153 spin_lock_irqsave(&ioc->FreeQlock, flags); in clean_taskQ()
1164 Q_ADD_TAIL(&ioc->FreeQ, &mf->u.frame.linkage, in clean_taskQ()
1167 hd->ioc->mfcnt--; in clean_taskQ()
1171 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in clean_taskQ()
1191 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in search_taskQ_for_cmd()
1208 Q_ADD_TAIL(&hd->ioc->FreeQ, in search_taskQ_for_cmd()
1212 hd->ioc->mfcnt--; in search_taskQ_for_cmd()
1218 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in search_taskQ_for_cmd()
1312 int max = hd->ioc->req_depth; in mptscsih_reset_timeouts()
1318 (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt)); in mptscsih_reset_timeouts()
1340 int max = hd->ioc->req_depth; in mptscsih_flush_running_cmds()
1367 mf = MPT_INDEX_2_MFPTR(hd->ioc, ii); in mptscsih_flush_running_cmds()
1374 pci_unmap_sg(hd->ioc->pcidev, (struct scatterlist *) SCpnt->request_buffer, in mptscsih_flush_running_cmds()
1380 pci_unmap_single(hd->ioc->pcidev, (dma_addr_t)(ulong)my_priv->p1, in mptscsih_flush_running_cmds()
1391 mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_flush_running_cmds()
1446 sz = hd->ioc->req_depth * sizeof(int); in mptscsih_initChainBuffers()
1453 for (ii = 0; ii < hd->ioc->req_depth; ii++) in mptscsih_initChainBuffers()
1466 scale = hd->ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_initChainBuffers()
1468 num_sge = scale + (hd->ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_initChainBuffers()
1470 num_sge = 1+ scale + (hd->ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_initChainBuffers()
1479 if ((int) hd->ioc->chip_type > (int) FC929) in mptscsih_initChainBuffers()
1498 sz = num_chain * hd->ioc->req_sz; in mptscsih_initChainBuffers()
1502 mem = pci_alloc_consistent(hd->ioc->pcidev, sz, &hd->ChainBufferDMA); in mptscsih_initChainBuffers()
1530 mem += hd->ioc->req_sz; in mptscsih_initChainBuffers()
1565 ioc_str = ((MPT_SCSI_HOST *)sc->host->hostdata)->ioc->name; in mptscsih_report_queue_full()
1594 MPT_ADAPTER *ioc; in mptscsih_detect() local
1637 for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) { in mptscsih_detect()
1641 if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { in mptscsih_detect()
1643 ioc->name); in mptscsih_detect()
1647 if (!ioc->active) { in mptscsih_detect()
1649 ioc->name); in mptscsih_detect()
1657 for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { in mptscsih_detect()
1658 if (ioc->pfacts[ii].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_INITIATOR) in mptscsih_detect()
1664 ioc->name, ioc); in mptscsih_detect()
1675 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_detect()
1690 if ((int)ioc->chip_type > (int)FC929) in mptscsih_detect()
1717 sh->this_id = ioc->pfacts[0].PortSCSIID; in mptscsih_detect()
1727 sh->unique_id = ioc->id; in mptscsih_detect()
1738 scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_detect()
1740 numSGE = (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale + in mptscsih_detect()
1741 (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_detect()
1743 numSGE = 1 + (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale + in mptscsih_detect()
1744 (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); in mptscsih_detect()
1751 ioc->name, numSGE, sh->sg_tablesize)); in mptscsih_detect()
1757 scsi_set_pci_device(sh, ioc->pcidev); in mptscsih_detect()
1759 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_detect()
1762 hd->ioc = ioc; in mptscsih_detect()
1765 if ((int)ioc->chip_type > (int)FC929) in mptscsih_detect()
1769 (ioc->chip_type == FC919 || ioc->chip_type == FC929)) in mptscsih_detect()
1775 sz = hd->ioc->req_depth * sizeof(void *); in mptscsih_detect()
1784 ioc->name, hd->ScsiLookup, sz)); in mptscsih_detect()
1855 ioc->sh = sh; in mptscsih_detect()
1874 hd->ioc->timeout_hard = 0; in mptscsih_detect()
1875 hd->ioc->timeout_delta = 30 * HZ; in mptscsih_detect()
1876 hd->ioc->timeout_maxcnt = 0; in mptscsih_detect()
1877 hd->ioc->timeout_cnt = 0; in mptscsih_detect()
1886 if (hd->ioc->spi_data.maxBusWidth > driver_setup.max_width) in mptscsih_detect()
1887 hd->ioc->spi_data.maxBusWidth = driver_setup.max_width; in mptscsih_detect()
1888 if (hd->ioc->spi_data.minSyncFactor < driver_setup.min_sync_fac) in mptscsih_detect()
1889 hd->ioc->spi_data.minSyncFactor = driver_setup.min_sync_fac; in mptscsih_detect()
1891 if (hd->ioc->spi_data.minSyncFactor == MPT_ASYNC) in mptscsih_detect()
1892 hd->ioc->spi_data.maxSyncOffset = 0; in mptscsih_detect()
1894 hd->ioc->spi_data.Saf_Te = driver_setup.saf_te; in mptscsih_detect()
1903 hd->ioc->spi_data.forceDv = 0; in mptscsih_detect()
1905 hd->ioc->spi_data.dvStatus[ii] = MPT_SCSICFG_NEGOTIATE; in mptscsih_detect()
1909 hd->ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_DV_NOT_DONE; in mptscsih_detect()
1914 hd->ioc->name, driver_setup.dv, in mptscsih_detect()
2029 sz1 = hd->ioc->req_depth * sizeof(void *); in mptscsih_release()
2035 szr2chain = hd->ioc->req_depth * sizeof(int); in mptscsih_release()
2047 sz2 = hd->num_chain * hd->ioc->req_sz; in mptscsih_release()
2050 pci_free_consistent(hd->ioc->pcidev, sz2, in mptscsih_release()
2089 hd->ioc->name, sz1, szchain, sz3, sztarget)); in mptscsih_release()
2094 hd->ioc->sh = NULL; in mptscsih_release()
2132 MPT_ADAPTER *ioc; in mptscsih_halt() local
2141 for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) { in mptscsih_halt()
2144 if (ioc->sh) { in mptscsih_halt()
2145 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_halt()
2178 mpt_print_ioc_summary(h->ioc, info_kbuf, &size, 0, 0); in mptscsih_info()
2227 static int mptscsih_host_info(MPT_ADAPTER *ioc, char *pbuf, off_t offset, int len) in mptscsih_host_info() argument
2236 copy_info(&info, "%s: %s, ", ioc->name, ioc->prod_name); in mptscsih_host_info()
2237 copy_info(&info, "%s%08xh, ", MPT_FW_REV_MAGIC_ID_STRING, ioc->facts.FWVersion.Word); in mptscsih_host_info()
2238 copy_info(&info, "Ports=%d, ", ioc->facts.NumberOfPorts); in mptscsih_host_info()
2239 copy_info(&info, "MaxQ=%d\n", ioc->req_depth); in mptscsih_host_info()
2245 static int mptscsih_user_command(MPT_ADAPTER *ioc, char *pbuf, int len) in mptscsih_user_command() argument
2304 static int mptscsih_user_command(MPT_ADAPTER *ioc, char *buffer, int length) in mptscsih_user_command() argument
2325 ioc->id, btmp, length); in mptscsih_user_command()
2352 ioc->timeout_hard = 1; in mptscsih_user_command()
2356 ioc->timeout_maxcnt = 0; in mptscsih_user_command()
2357 ioc->timeout_delta = delta < 2 ? 2 : delta; in mptscsih_user_command()
2358 ioc->timeout_cnt = 0; in mptscsih_user_command()
2359 ioc->timeout_maxcnt = number < 8 ? number: 8; in mptscsih_user_command()
2384 MPT_ADAPTER *ioc; in mptscsih_proc_info() local
2392 for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) { in mptscsih_proc_info()
2393 if ((ioc->sh) && (ioc->sh->host_no == hostno)) { in mptscsih_proc_info()
2394 hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; in mptscsih_proc_info()
2398 if ((ioc == NULL) || (ioc->sh == NULL) || (hd == NULL)) in mptscsih_proc_info()
2402 size = mptscsih_user_command(ioc, buffer, length); in mptscsih_proc_info()
2407 size = mptscsih_host_info(ioc, buffer, offset, length); in mptscsih_proc_info()
2472 (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt, done)); in mptscsih_qcmd()
2483 (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt)); in mptscsih_qcmd()
2490 if ((mf = mpt_get_msg_frame(ScsiDoneCtx, hd->ioc->id)) == NULL) { in mptscsih_qcmd()
2492 hd->ioc->name)); in mptscsih_qcmd()
2570 pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma in mptscsih_qcmd()
2594 int dvStatus = hd->ioc->spi_data.dvStatus[target]; in mptscsih_qcmd()
2596 if (dvStatus || hd->ioc->spi_data.forceDv) { in mptscsih_qcmd()
2600 (hd->ioc->spi_data.forceDv & MPT_SCSICFG_NEED_DV)) { in mptscsih_qcmd()
2613 hd->ioc->spi_data.forceDv &= ~MPT_SCSICFG_NEED_DV; in mptscsih_qcmd()
2633 if (hd->ioc->timeout_cnt < hd->ioc->timeout_maxcnt) { in mptscsih_qcmd()
2634 foo_to[hd->ioc->timeout_cnt] = SCpnt; in mptscsih_qcmd()
2635 hd->ioc->timeout_cnt++; in mptscsih_qcmd()
2640 hd->ioc->name, SCpnt, mf, jiffies); in mptscsih_qcmd()
2645 mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_qcmd()
2647 hd->ioc->name, SCpnt, mf, my_idx)); in mptscsih_qcmd()
2650 hd->ioc->name, SCpnt, my_idx)); in mptscsih_qcmd()
2673 mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_qcmd()
2682 hd->ioc->name, did_errcode, SCpnt)); in mptscsih_qcmd()
2688 (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt)); in mptscsih_qcmd()
2743 + (chain_idx * hd->ioc->req_sz)); in mptscsih_freeChainBuffers()
2744 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_freeChainBuffers()
2747 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_freeChainBuffers()
2750 hd->ioc->name, chain_idx)); in mptscsih_freeChainBuffers()
2786 MPT_ADAPTER *ioc; in mptscsih_TMHandler() local
2798 ioc = hd->ioc; in mptscsih_TMHandler()
2799 if (ioc == NULL) { in mptscsih_TMHandler()
2803 dtmprintk((MYIOC_s_INFO_FMT "TMHandler Entered!\n", ioc->name)); in mptscsih_TMHandler()
2807 spin_lock_irqsave(&ioc->diagLock, flags); in mptscsih_TMHandler()
2808 if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) { in mptscsih_TMHandler()
2809 spin_unlock_irqrestore(&ioc->diagLock, flags); in mptscsih_TMHandler()
2812 spin_unlock_irqrestore(&ioc->diagLock, flags); in mptscsih_TMHandler()
2830 hd->ioc->name, hd->tmPending)); in mptscsih_TMHandler()
2835 hd->ioc->name, hd->tmPending)); in mptscsih_TMHandler()
2840 hd->ioc->name, hd->tmPending)); in mptscsih_TMHandler()
2847 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_TMHandler()
2849 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_TMHandler()
2855 ioc_raw_state = mpt_GetIocState(hd->ioc, 0); in mptscsih_TMHandler()
2861 hd->ioc->name, ioc_raw_state); in mptscsih_TMHandler()
2874 printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n", hd->ioc->name); in mptscsih_TMHandler()
2876 dtmprintk((MYIOC_s_INFO_FMT "Issue of TaskMgmt Successful!\n", hd->ioc->name)); in mptscsih_TMHandler()
2880 if (hd->ioc->timeout_hard) in mptscsih_TMHandler()
2887 ioc->reload_fw || (ioc->alt_ioc && ioc->alt_ioc->reload_fw))) { in mptscsih_TMHandler()
2889 hd->ioc->name)); in mptscsih_TMHandler()
2890 rc = mpt_HardResetHandler(hd->ioc, sleepFlag); in mptscsih_TMHandler()
2893 dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc)); in mptscsih_TMHandler()
2896 ioc->name, mytaskQ_bh_active, hd->taskQcnt)); in mptscsih_TMHandler()
2930 if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc->id)) == NULL) { in mptscsih_IssueTaskMgmt()
2932 hd->ioc->name)); in mptscsih_IssueTaskMgmt()
2937 hd->ioc->name, mf)); in mptscsih_IssueTaskMgmt()
2963 hd->ioc->name, ctx2abort, type)); in mptscsih_IssueTaskMgmt()
2974 if ((retval = mpt_send_handshake_request(ScsiTaskCtx, hd->ioc->id, in mptscsih_IssueTaskMgmt()
2978 " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, hd->ioc, mf)); in mptscsih_IssueTaskMgmt()
2982 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_IssueTaskMgmt()
3021 hd->ioc->name, SCpnt); in mptscsih_abort()
3037 hd->ioc->name, SCpnt)); in mptscsih_abort()
3046 mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_abort()
3050 hd->ioc->name, SCpnt)); in mptscsih_abort()
3060 mf = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx); in mptscsih_abort()
3072 hd->ioc->name, SCpnt); in mptscsih_abort()
3112 hd->ioc->name, SCpnt); in mptscsih_dev_reset()
3126 hd->ioc->name, SCpnt); in mptscsih_dev_reset()
3159 hd->ioc->name, SCpnt); in mptscsih_bus_reset()
3174 hd->ioc->name, SCpnt); in mptscsih_bus_reset()
3208 hd->ioc->name, SCpnt); in mptscsih_host_reset()
3213 if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0){ in mptscsih_host_reset()
3247 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_tm_pending_wait()
3251 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_tm_pending_wait()
3255 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_tm_pending_wait()
3310 mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_old_abort()
3322 hd->ioc->name, SCpnt, hd->taskQcnt)); in mptscsih_old_abort()
3330 spin_lock_irqsave(&hd->ioc->diagLock, flags); in mptscsih_old_abort()
3331 if (hd->ioc->diagPending) { in mptscsih_old_abort()
3332 spin_unlock_irqrestore(&hd->ioc->diagLock, flags); in mptscsih_old_abort()
3335 spin_unlock_irqrestore(&hd->ioc->diagLock, flags); in mptscsih_old_abort()
3339 if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc->id)) == NULL) { in mptscsih_old_abort()
3345 if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) { in mptscsih_old_abort()
3355 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_old_abort()
3359 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_old_abort()
3365 SCpnt->host_scribble = (u8 *) MPT_INDEX_2_MFPTR (hd->ioc, scpnt_idx); in mptscsih_old_abort()
3379 hd->ioc->name, mytaskQ_bh_active, hd->taskQcnt)); in mptscsih_old_abort()
3441 mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in mptscsih_old_reset()
3459 hd->ioc->name, SCpnt, hd->taskQcnt)); in mptscsih_old_reset()
3467 spin_lock_irqsave(&hd->ioc->diagLock, flags); in mptscsih_old_reset()
3468 if (hd->ioc->diagPending) { in mptscsih_old_reset()
3469 spin_unlock_irqrestore(&hd->ioc->diagLock, flags); in mptscsih_old_reset()
3472 spin_unlock_irqrestore(&hd->ioc->diagLock, flags); in mptscsih_old_reset()
3474 if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc->id)) == NULL) { in mptscsih_old_reset()
3479 if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) { in mptscsih_old_reset()
3489 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_old_reset()
3493 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_old_reset()
3497 hd->ioc->name, mytaskQ_bh_active, hd->taskQcnt)); in mptscsih_old_reset()
3502 SCpnt->host_scribble = (u8 *) MPT_INDEX_2_MFPTR (hd->ioc, scpnt_idx); in mptscsih_old_reset()
3538 MPT_ADAPTER *ioc; in mptscsih_taskmgmt_bh() local
3557 for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) { in mptscsih_taskmgmt_bh()
3558 if (ioc->sh) { in mptscsih_taskmgmt_bh()
3559 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_taskmgmt_bh()
3564 (void *) ioc, (void *) ioc->sh, (void *) hd); in mptscsih_taskmgmt_bh()
3569 if (ioc->timeout_hard == 1) { in mptscsih_taskmgmt_bh()
3577 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3579 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3590 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3601 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3607 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_taskmgmt_bh()
3608 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3610 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3624 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_taskmgmt_bh()
3625 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3627 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3631 scpnt_idx = MFPTR_2_MPT_INDEX(hd->ioc, SCpnt->host_scribble); in mptscsih_taskmgmt_bh()
3635 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_taskmgmt_bh()
3636 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3638 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3666 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_taskmgmt_bh()
3687 mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf); in mptscsih_taskmgmt_bh()
3689 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3691 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_bh()
3724 mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) in mptscsih_taskmgmt_complete() argument
3733 ioc->name, mf, mr)); in mptscsih_taskmgmt_complete()
3734 if (ioc->sh) { in mptscsih_taskmgmt_complete()
3739 hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; in mptscsih_taskmgmt_complete()
3744 ioc->name, hd->taskQcnt)); in mptscsih_taskmgmt_complete()
3747 ioc->name)); in mptscsih_taskmgmt_complete()
3753 ioc->name, mf)); in mptscsih_taskmgmt_complete()
3787 if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) { in mptscsih_taskmgmt_complete()
3822 ioc->name, mf, hd->numTMrequests, hd->taskQcnt)); in mptscsih_taskmgmt_complete()
3825 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_complete()
3827 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_taskmgmt_complete()
3910 …hd->ioc->name, device->id, pTarget->target_id, device->lun, device->queue_depth, pTarget->tflags)); in mptscsih_select_queue_depths()
3914 hd->ioc->name, pTarget->target_id, in mptscsih_select_queue_depths()
3955 sense_data = ((u8 *)hd->ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC)); in copy_sense_data()
3960 if ((hd->ioc->events) && (hd->ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) { in copy_sense_data()
3963 MPT_ADAPTER *ioc = hd->ioc; in copy_sense_data() local
3965 idx = ioc->eventContext % ioc->eventLogSize; in copy_sense_data()
3966 ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE; in copy_sense_data()
3967 ioc->events[idx].eventContext = ioc->eventContext; in copy_sense_data()
3969 ioc->events[idx].data[0] = (pReq->LUN[1] << 24) || in copy_sense_data()
3973 ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12]; in copy_sense_data()
3975 ioc->eventContext++; in copy_sense_data()
3987 hd->ioc->id, in copy_sense_data()
3991 sprintf(devFoo, "%d:%d:%d", hd->ioc->id, sc->target, sc->lun); in copy_sense_data()
4003 hd->ioc->name)); in copy_sense_data()
4017 for (i = 0; i < hd->ioc->req_depth; i++) { in SCPNT_TO_LOOKUP_IDX()
4048 ddvtprintk((MYIOC_s_INFO_FMT ": search_pendingQ ...", hd->ioc->name)); in mptscsih_search_pendingQ()
4049 cmdMfPtr = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx); in mptscsih_search_pendingQ()
4088 ddvtprintk((MYIOC_s_INFO_FMT ": post_pendingQ_commands\n", hd->ioc->name)); in post_pendingQ_commands()
4111 printk(MYIOC_s_WARN_FMT "post_pendingQ_commands: mf %p\n", hd->ioc->name, (void *) mf); in post_pendingQ_commands()
4115 mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf); in post_pendingQ_commands()
4122 hd->ioc->name, sc, req_idx, mf); in post_pendingQ_commands()
4132 mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) in mptscsih_ioc_reset() argument
4146 if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL)) in mptscsih_ioc_reset()
4149 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_ioc_reset()
4152 dtmprintk((MYIOC_s_WARN_FMT "Setup-Diag Reset\n", ioc->name)); in mptscsih_ioc_reset()
4164 dtmprintk((MYIOC_s_WARN_FMT "Pre-Diag Reset\n", ioc->name)); in mptscsih_ioc_reset()
4181 mpt_free_msg_frame(ScsiScanDvCtx, ioc->id, hd->cmdPtr); in mptscsih_ioc_reset()
4189 mpt_free_msg_frame(ScsiTaskCtx, ioc->id, hd->tmPtr); in mptscsih_ioc_reset()
4201 ioc->timeout_hard = 0; in mptscsih_ioc_reset()
4204 dtmprintk((MYIOC_s_WARN_FMT "Pre-Reset complete.\n", ioc->name)); in mptscsih_ioc_reset()
4208 dtmprintk((MYIOC_s_WARN_FMT "Post-Diag Reset\n", ioc->name)); in mptscsih_ioc_reset()
4219 for (ii=0; ii < hd->ioc->req_depth; ii++) in mptscsih_ioc_reset()
4240 spin_lock_irqsave(&ioc->FreeQlock, flags); in mptscsih_ioc_reset()
4242 spin_unlock_irqrestore(&ioc->FreeQlock, flags); in mptscsih_ioc_reset()
4270 pSpi = &ioc->spi_data; in mptscsih_ioc_reset()
4275 dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name)); in mptscsih_ioc_reset()
4283 mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) in mptscsih_event_process() argument
4289 ioc->name, event)); in mptscsih_event_process()
4298 if (ioc->sh) { in mptscsih_event_process()
4299 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_event_process()
4326 if (ioc->sh) in mptscsih_event_process()
4327 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_event_process()
4341 pSpi = &ioc->spi_data; in mptscsih_event_process()
4923 hd->ioc->name, bus_id, target_id, lun, hd)); in mptscsih_initTarget()
4934 hd->ioc->name, (int)sizeof(VirtDevice)); in mptscsih_initTarget()
4943 vdev->ioc_id = hd->ioc->id; in mptscsih_initTarget()
4958 if (hd->ioc->spi_data.isRaid & (1 << target_id)) { in mptscsih_initTarget()
4975 ScsiCfgData *pSpi = &hd->ioc->spi_data; in mptscsih_initTarget()
4996 if ( hd->ioc->spi_data.Saf_Te ) { in mptscsih_initTarget()
5027 ScsiCfgData *pspi_data = &hd->ioc->spi_data; in mptscsih_setTargetNegoParms()
5205 ScsiCfgData *pSpi = &hd->ioc->spi_data; in mptscsih_set_dvflags()
5233 hd->ioc->spi_data.dvStatus[target_id] |= MPT_SCSICFG_BLK_NEGO; in mptscsih_no_negotiate()
5305 MPT_ADAPTER *ioc = hd->ioc; in mptscsih_writeSDP1() local
5323 if (ioc->spi_data.sdp1length == 0) in mptscsih_writeSDP1()
5328 maxid = ioc->sh->max_id - 1; in mptscsih_writeSDP1()
5329 } else if (ioc->sh) { in mptscsih_writeSDP1()
5331 maxid = MIN(id, ioc->sh->max_id - 1); in mptscsih_writeSDP1()
5336 if (id == ioc->pfacts[portnum].PortSCSIID) in mptscsih_writeSDP1()
5342 maxwidth = ioc->spi_data.maxBusWidth; in mptscsih_writeSDP1()
5343 maxoffset = ioc->spi_data.maxSyncOffset; in mptscsih_writeSDP1()
5344 maxfactor = ioc->spi_data.minSyncFactor; in mptscsih_writeSDP1()
5345 if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { in mptscsih_writeSDP1()
5346 nvram = ioc->spi_data.nvram[id]; in mptscsih_writeSDP1()
5357 } else if (maxfactor < ioc->spi_data.minSyncFactor) { in mptscsih_writeSDP1()
5358 maxfactor = ioc->spi_data.minSyncFactor; in mptscsih_writeSDP1()
5366 negoFlags = ioc->spi_data.noQas; in mptscsih_writeSDP1()
5389 if ((hd->ioc->spi_data.dvStatus[id] & MPT_SCSICFG_DV_NOT_DONE) != 0) { in mptscsih_writeSDP1()
5414 if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc->id)) == NULL) { in mptscsih_writeSDP1()
5416 ioc->name)); in mptscsih_writeSDP1()
5421 hd->ioc->name, mf, id, requested, configuration)); in mptscsih_writeSDP1()
5434 frameOffset = ioc->req_sz - sizeof(SCSIDevicePage1_t); in mptscsih_writeSDP1()
5437 dataDma = ioc->req_frames_dma + (req_idx * ioc->req_sz) + frameOffset; in mptscsih_writeSDP1()
5451 pReq->Header.PageVersion = ioc->spi_data.sdp1version; in mptscsih_writeSDP1()
5452 pReq->Header.PageLength = ioc->spi_data.sdp1length; in mptscsih_writeSDP1()
5459 flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | ioc->spi_data.sdp1length * 4; in mptscsih_writeSDP1()
5475 ioc->name, id, (id | (bus<<8)), in mptscsih_writeSDP1()
5478 mpt_put_msg_frame(ScsiDoneCtx, ioc->id, mf); in mptscsih_writeSDP1()
5497 MPT_ADAPTER *ioc = hd->ioc; in mptscsih_writeIOCPage4() local
5509 if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc->id)) == NULL) { in mptscsih_writeIOCPage4()
5511 ioc->name)); in mptscsih_writeIOCPage4()
5516 ioc->name, mf, target_id)); in mptscsih_writeIOCPage4()
5524 frameOffset = ioc->req_sz - sizeof(IOCPage4_t); in mptscsih_writeIOCPage4()
5539 IOCPage4Ptr = ioc->spi_data.pIocPg4; in mptscsih_writeIOCPage4()
5540 dataDma = ioc->spi_data.IocPg4_dma; in mptscsih_writeIOCPage4()
5556 ioc->name, (target_id | (bus<<8)))); in mptscsih_writeIOCPage4()
5558 mpt_put_msg_frame(ScsiDoneCtx, ioc->id, mf); in mptscsih_writeIOCPage4()
5574 "TM request timed out!\n", hd->ioc->name)); in mptscsih_taskmgmt_timeout()
5585 if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) { in mptscsih_taskmgmt_timeout()
5595 hd->ioc->name)); in mptscsih_taskmgmt_timeout()
5629 mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) in mptscsih_scandv_complete() argument
5637 (mf >= MPT_INDEX_2_MFPTR(ioc, ioc->req_depth))) { in mptscsih_scandv_complete()
5640 ioc->name, mf?"BAD":"NULL", (void *) mf); in mptscsih_scandv_complete()
5644 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_scandv_complete()
5652 hd->ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx); in mptscsih_scandv_complete()
5657 hd->ioc->name, mf, mr, req_idx)); in mptscsih_scandv_complete()
5721 sense_data = ((u8 *)hd->ioc->sense_buf_pool + in mptscsih_scandv_complete()
5797 ddvprintk((MYIOC_s_WARN_FMT "Timer Expired! Cmd %p\n", hd->ioc->name, hd->cmdPtr)); in mptscsih_timer_expired()
5812 spin_lock_irqsave(&hd->ioc->FreeQlock, flags); in mptscsih_timer_expired()
5814 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_timer_expired()
5818 spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); in mptscsih_timer_expired()
5821 printk(MYIOC_s_WARN_FMT "TM FAILED!\n", hd->ioc->name); in mptscsih_timer_expired()
5824 ddvtprintk((MYIOC_s_NOTE_FMT "DV Cmd Timeout: NoOp\n", hd->ioc->name)); in mptscsih_timer_expired()
5828 if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) { in mptscsih_timer_expired()
5829 printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", hd->ioc->name); in mptscsih_timer_expired()
5834 printk(MYIOC_s_WARN_FMT "Null cmdPtr!!!!\n", hd->ioc->name); in mptscsih_timer_expired()
5842 ddvprintk((MYIOC_s_WARN_FMT "Timer Expired Complete!\n", hd->ioc->name)); in mptscsih_timer_expired()
5870 hd->ioc->name)); in mptscsih_do_raid()
5876 if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc->id)) == NULL) { in mptscsih_do_raid()
5878 hd->ioc->name)); in mptscsih_do_raid()
5898 hd->ioc->name, action, io->id)); in mptscsih_do_raid()
5910 mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc->id, mf); in mptscsih_do_raid()
5956 hd->ioc->name)); in mptscsih_do_cmd()
6057 if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc->id)) == NULL) { in mptscsih_do_cmd()
6059 hd->ioc->name)); in mptscsih_do_cmd()
6101 hd->ioc->name, cmd)); in mptscsih_do_cmd()
6108 pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma in mptscsih_do_cmd()
6112 hd->ioc->name, cmd, io->bus, io->id, io->lun)); in mptscsih_do_cmd()
6147 mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc->id, mf); in mptscsih_do_cmd()
6164 hd->ioc->name)); in mptscsih_do_cmd()
6184 MPT_ADAPTER *ioc= hd->ioc; in mptscsih_synchronize_cache() local
6195 int hostId = ioc->pfacts[portnum].PortSCSIID; in mptscsih_synchronize_cache()
6201 max_id = ioc->sh->max_id - 1; in mptscsih_synchronize_cache()
6228 if (ioc->spi_data.sdp1length > 0) { in mptscsih_synchronize_cache()
6229 pcfg1Data = (SCSIDevicePage1_t *)pci_alloc_consistent(ioc->pcidev, in mptscsih_synchronize_cache()
6230 ioc->spi_data.sdp1length * 4, &cfg1_dma_addr); in mptscsih_synchronize_cache()
6234 header1.PageVersion = ioc->spi_data.sdp1version; in mptscsih_synchronize_cache()
6235 header1.PageLength = ioc->spi_data.sdp1length; in mptscsih_synchronize_cache()
6260 flags = hd->ioc->spi_data.noQas; in mptscsih_synchronize_cache()
6261 if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { in mptscsih_synchronize_cache()
6262 data = hd->ioc->spi_data.nvram[id]; in mptscsih_synchronize_cache()
6280 mpt_config(hd->ioc, &cfg); in mptscsih_synchronize_cache()
6311 pci_free_consistent(ioc->pcidev, header1.PageLength * 4, pcfg1Data, cfg1_dma_addr); in mptscsih_synchronize_cache()
6333 MPT_ADAPTER *ioc; in mptscsih_domainValidation() local
6355 for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) { in mptscsih_domainValidation()
6368 if ((int)ioc->chip_type <= (int)FC929) in mptscsih_domainValidation()
6372 if (ioc->sh == NULL) in mptscsih_domainValidation()
6375 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; in mptscsih_domainValidation()
6379 if ((ioc->spi_data.forceDv & MPT_SCSICFG_RELOAD_IOC_PG3) != 0) { in mptscsih_domainValidation()
6380 mpt_read_ioc_pg_3(ioc); in mptscsih_domainValidation()
6381 if (ioc->spi_data.pIocPg3) { in mptscsih_domainValidation()
6382 Ioc3PhysDisk_t *pPDisk = ioc->spi_data.pIocPg3->PhysDisk; in mptscsih_domainValidation()
6383 int numPDisk = ioc->spi_data.pIocPg3->NumPhysDisks; in mptscsih_domainValidation()
6386 if (ioc->spi_data.dvStatus[pPDisk->PhysDiskID] & MPT_SCSICFG_DV_NOT_DONE) in mptscsih_domainValidation()
6387 ioc->spi_data.dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV; in mptscsih_domainValidation()
6393 ioc->spi_data.forceDv &= ~MPT_SCSICFG_RELOAD_IOC_PG3; in mptscsih_domainValidation()
6396 maxid = MIN (ioc->sh->max_id, MPT_MAX_SCSI_DEVICES); in mptscsih_domainValidation()
6406 dvStatus = hd->ioc->spi_data.dvStatus[id]; in mptscsih_domainValidation()
6410 hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_PENDING; in mptscsih_domainValidation()
6411 hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV; in mptscsih_domainValidation()
6420 isPhysDisk = mptscsih_is_phys_disk(ioc, id); in mptscsih_domainValidation()
6423 if (hd->ioc->spi_data.isRaid & (1 << ii)) { in mptscsih_domainValidation()
6424 hd->ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_DV_PENDING; in mptscsih_domainValidation()
6432 hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV; in mptscsih_domainValidation()
6433 hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_PENDING; in mptscsih_domainValidation()
6437 hd->ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_PENDING); in mptscsih_domainValidation()
6442 if (hd->ioc->spi_data.isRaid & (1 << ii)) { in mptscsih_domainValidation()
6443 hd->ioc->spi_data.dvStatus[ii] &= ~MPT_SCSICFG_DV_PENDING; in mptscsih_domainValidation()
6453 if (hd->ioc->spi_data.noQas) in mptscsih_domainValidation()
6469 static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id) in mptscsih_is_phys_disk() argument
6471 if (ioc->spi_data.pIocPg3) { in mptscsih_is_phys_disk()
6472 Ioc3PhysDisk_t *pPDisk = ioc->spi_data.pIocPg3->PhysDisk; in mptscsih_is_phys_disk()
6473 int numPDisk = ioc->spi_data.pIocPg3->NumPhysDisks; in mptscsih_is_phys_disk()
6500 if ((hd->ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) != 0) in mptscsih_qas_check()
6506 if ((pTarget->negoFlags & hd->ioc->spi_data.noQas) == 0) { in mptscsih_qas_check()
6507 pTarget->negoFlags |= hd->ioc->spi_data.noQas; in mptscsih_qas_check()
6511 if (mptscsih_is_phys_disk(hd->ioc, ii) == 1) in mptscsih_qas_check()
6543 MPT_ADAPTER *ioc = hd->ioc; in mptscsih_doDv() local
6576 if (ioc->spi_data.sdp1length == 0) in mptscsih_doDv()
6579 if (ioc->spi_data.sdp0length == 0) in mptscsih_doDv()
6585 if (id == ioc->pfacts[0].PortSCSIID) in mptscsih_doDv()
6592 ioc->name, bus, id, &dv)); in mptscsih_doDv()
6634 if (hd->ioc->facts.FWVersion.Word < 0x01000600) in mptscsih_doDv()
6637 if ((hd->ioc->facts.FWVersion.Word >= 0x01010000) && in mptscsih_doDv()
6638 (hd->ioc->facts.FWVersion.Word < 0x01010B00)) in mptscsih_doDv()
6650 header0.PageVersion = ioc->spi_data.sdp0version; in mptscsih_doDv()
6651 header0.PageLength = ioc->spi_data.sdp0length; in mptscsih_doDv()
6657 header1.PageVersion = ioc->spi_data.sdp1version; in mptscsih_doDv()
6658 header1.PageLength = ioc->spi_data.sdp1length; in mptscsih_doDv()
6667 pDvBuf = pci_alloc_consistent(ioc->pcidev, dv_alloc, &dvbuf_dma); in mptscsih_doDv()
6695 ScsiCfgData *pspi_data = &hd->ioc->spi_data; in mptscsih_doDv()
6706 ioc->name, bus, id, lun)); in mptscsih_doDv()
6718 mpt_config(hd->ioc, &cfg); in mptscsih_doDv()
6725 if (ioc->spi_data.pIocPg3) { in mptscsih_doDv()
6728 Ioc3PhysDisk_t *pPDisk = ioc->spi_data.pIocPg3->PhysDisk; in mptscsih_doDv()
6729 int numPDisk = ioc->spi_data.pIocPg3->NumPhysDisks; in mptscsih_doDv()
6740 ddvprintk((MYIOC_s_ERR_FMT "RAID Queisce FAILED!\n", ioc->name)); in mptscsih_doDv()
6753 if ((hd->ioc->spi_data.isRaid & (1 << id)) && !(iocmd.flags & MPT_ICFLAG_PHYS_DISK)) in mptscsih_doDv()
6771 ddvprintk((MYIOC_s_NOTE_FMT "DV: Start Basic test on id=%d\n", ioc->name, id)); in mptscsih_doDv()
6780 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
6789 if ((hd->ioc->facts.FWVersion.Word >= 0x01000600) || in mptscsih_doDv()
6790 ((hd->ioc->facts.FWVersion.Word >= 0x01010000) && in mptscsih_doDv()
6791 (hd->ioc->facts.FWVersion.Word < 0x01010B00)) ) { in mptscsih_doDv()
6875 hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; in mptscsih_doDv()
6886 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
6918 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
6963 ddvprintk((MYIOC_s_NOTE_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id)); in mptscsih_doDv()
6971 if ( ioc->spi_data.PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY ) in mptscsih_doDv()
7008 ioc->name, skey, asc, ascq)); in mptscsih_doDv()
7024 ioc->name)); in mptscsih_doDv()
7078 ioc->name, skey, asc, ascq)); in mptscsih_doDv()
7092 ioc->name)); in mptscsih_doDv()
7123 ddvprintk((MYIOC_s_INFO_FMT "%s Buffer Capacity %d\n", ioc->name, in mptscsih_doDv()
7186 "DV: Reserve Failed: ", ioc->name)); in mptscsih_doDv()
7197 "DV: Reserved Failed.", ioc->name)); in mptscsih_doDv()
7202 ioc->name)); in mptscsih_doDv()
7233 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
7248 "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, in mptscsih_doDv()
7312 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
7330 if (mpt_config(hd->ioc, &cfg) != 0) in mptscsih_doDv()
7344 "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, in mptscsih_doDv()
7368 ioc->name, id); in mptscsih_doDv()
7374 ioc->name, id); in mptscsih_doDv()
7385 hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; in mptscsih_doDv()
7406 ddvprintk((MYIOC_s_ERR_FMT "RAID Enable FAILED!\n", ioc->name)); in mptscsih_doDv()
7412 pci_free_consistent(ioc->pcidev, dv_alloc, pDvBuf, dvbuf_dma); in mptscsih_doDv()
7415 ioc->name)); in mptscsih_doDv()
7444 hd->ioc->name)); in mptscsih_dv_parms()
7455 if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { in mptscsih_dv_parms()
7456 data = hd->ioc->spi_data.nvram[id]; in mptscsih_dv_parms()
7458 if ((offset = hd->ioc->spi_data.maxSyncOffset) == 0) in mptscsih_dv_parms()
7474 negoFlags = hd->ioc->spi_data.noQas; in mptscsih_dv_parms()
7483 width = MIN(width, hd->ioc->spi_data.maxBusWidth); in mptscsih_dv_parms()
7484 offset = MIN(offset, hd->ioc->spi_data.maxSyncOffset); in mptscsih_dv_parms()
7485 factor = MAX(factor, hd->ioc->spi_data.minSyncFactor); in mptscsih_dv_parms()
7501 "Updating with SDP0 Data: ", hd->ioc->name)); in mptscsih_dv_parms()
7520 hd->ioc->name)); in mptscsih_dv_parms()
7543 hd->ioc->name)); in mptscsih_dv_parms()
7566 hd->ioc->name, dv->now.offset, in mptscsih_dv_parms()
7642 "Saving to Target structure: ", hd->ioc->name)); in mptscsih_dv_parms()
7659 if (hd->ioc->spi_data.nvram) { in mptscsih_dv_parms()
7660 data = hd->ioc->spi_data.nvram[id]; in mptscsih_dv_parms()
7673 hd->ioc->spi_data.nvram[id] = data; in mptscsih_dv_parms()