• Home
  • Raw
  • Download

Lines Matching refs:base_vha

861 	struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);  in qla2xxx_queuecommand()  local
865 if (unlikely(test_bit(UNLOADING, &base_vha->dpc_flags)) || in qla2xxx_queuecommand()
923 atomic_read(&base_vha->loop_state) == LOOP_DEAD) { in qla2xxx_queuecommand()
927 atomic_read(&base_vha->loop_state)); in qla2xxx_queuecommand()
987 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla2xxx_mqueuecommand() local
1014 atomic_read(&base_vha->loop_state) == LOOP_DEAD) { in qla2xxx_mqueuecommand()
1018 atomic_read(&base_vha->loop_state)); in qla2xxx_mqueuecommand()
1128 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_wait_for_hba_online() local
1131 while (((test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) || in qla2x00_wait_for_hba_online()
1132 test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || in qla2x00_wait_for_hba_online()
1133 test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || in qla2x00_wait_for_hba_online()
1138 if (base_vha->flags.online) in qla2x00_wait_for_hba_online()
1214 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_wait_for_hba_ready() local
1220 if (test_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_wait_for_hba_ready()
1232 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_wait_for_chip_reset() local
1235 while (((test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) || in qla2x00_wait_for_chip_reset()
1236 test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || in qla2x00_wait_for_chip_reset()
1237 test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || in qla2x00_wait_for_chip_reset()
1242 if (!test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) && in qla2x00_wait_for_chip_reset()
1661 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2xxx_eh_host_reset() local
1683 if (vha != base_vha) { in qla2xxx_eh_host_reset()
1698 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla2xxx_eh_host_reset()
1699 if (ha->isp_ops->abort_isp(base_vha)) { in qla2xxx_eh_host_reset()
1700 clear_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla2xxx_eh_host_reset()
1702 set_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags); in qla2xxx_eh_host_reset()
1710 clear_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla2xxx_eh_host_reset()
2847 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla_heartbeat_work_fn() local
2849 if (!ha->flags.mbox_busy && base_vha->flags.init_done) in qla_heartbeat_work_fn()
2850 qla_no_op_mb(base_vha); in qla_heartbeat_work_fn()
2858 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_iocb_work_fn() local
2862 if (test_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_iocb_work_fn()
2883 scsi_qla_host_t *base_vha = NULL; in qla2x00_probe_one() local
3228 base_vha = qla2x00_create_host(sht, ha); in qla2x00_probe_one()
3229 if (!base_vha) { in qla2x00_probe_one()
3234 pci_set_drvdata(pdev, base_vha); in qla2x00_probe_one()
3235 set_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags); in qla2x00_probe_one()
3237 host = base_vha->host; in qla2x00_probe_one()
3238 base_vha->req = req; in qla2x00_probe_one()
3240 base_vha->mgmt_svr_loop_id = in qla2x00_probe_one()
3241 qla2x00_reserve_mgmt_server_loop_id(base_vha); in qla2x00_probe_one()
3243 base_vha->mgmt_svr_loop_id = MANAGEMENT_SERVER + in qla2x00_probe_one()
3244 base_vha->vp_idx; in qla2x00_probe_one()
3247 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3271 ql_log(ql_log_warn, base_vha, 0x302d, in qla2x00_probe_one()
3290 ql_dbg(ql_dbg_init, base_vha, 0x0033, in qla2x00_probe_one()
3298 INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn); in qla2x00_probe_one()
3309 ql_log(ql_log_fatal, base_vha, 0x003d, in qla2x00_probe_one()
3320 ql_dbg(ql_dbg_init, base_vha, 0x0192, in qla2x00_probe_one()
3325 ql_dbg(ql_dbg_init, base_vha, 0x0194, in qla2x00_probe_one()
3329 ql_dbg(ql_dbg_init, base_vha, 0x0193, in qla2x00_probe_one()
3334 qlt_probe_one_stage1(base_vha, ha); in qla2x00_probe_one()
3375 ql_dbg(ql_dbg_multiq, base_vha, 0xc009, in qla2x00_probe_one()
3378 ql_dbg(ql_dbg_multiq, base_vha, 0xc00a, in qla2x00_probe_one()
3383 ql_dbg(ql_dbg_init, base_vha, 0x003e, in qla2x00_probe_one()
3386 ql_dbg(ql_dbg_init, base_vha, 0x003f, in qla2x00_probe_one()
3396 if (ha->isp_ops->initialize_adapter(base_vha)) { in qla2x00_probe_one()
3397 ql_log(ql_log_fatal, base_vha, 0x00d6, in qla2x00_probe_one()
3399 base_vha->device_flags); in qla2x00_probe_one()
3406 ql_log(ql_log_fatal, base_vha, 0x00d7, in qla2x00_probe_one()
3410 qla8044_wr_direct(base_vha, in qla2x00_probe_one()
3414 ql_log(ql_log_fatal, base_vha, 0x0150, in qla2x00_probe_one()
3427 ql_dbg(ql_dbg_init, base_vha, 0x0032, in qla2x00_probe_one()
3429 host->can_queue, base_vha->req, in qla2x00_probe_one()
3430 base_vha->mgmt_svr_loop_id, host->sg_tablesize); in qla2x00_probe_one()
3443 qla2xxx_create_qpair(base_vha, 5, 0, startit); in qla2x00_probe_one()
3445 qla_init_iocb_limit(base_vha); in qla2x00_probe_one()
3454 "%s_dpc", base_vha->host_str); in qla2x00_probe_one()
3456 ql_log(ql_log_fatal, base_vha, 0x00ed, in qla2x00_probe_one()
3462 ql_dbg(ql_dbg_init, base_vha, 0x00ee, in qla2x00_probe_one()
3471 qla2xxx_wake_dpc(base_vha); in qla2x00_probe_one()
3476 sprintf(wq_name, "qla2xxx_%lu_dpc_lp_wq", base_vha->host_no); in qla2x00_probe_one()
3480 sprintf(wq_name, "qla2xxx_%lu_dpc_hp_wq", base_vha->host_no); in qla2x00_probe_one()
3490 list_add_tail(&base_vha->list, &ha->vp_list); in qla2x00_probe_one()
3491 base_vha->host->irq = ha->pdev->irq; in qla2x00_probe_one()
3494 qla2x00_start_timer(base_vha, WATCH_INTERVAL); in qla2x00_probe_one()
3495 ql_dbg(ql_dbg_init, base_vha, 0x00ef, in qla2x00_probe_one()
3498 ql_dbg(ql_dbg_init, base_vha, 0x00f0, in qla2x00_probe_one()
3506 base_vha->flags.difdix_supported = 1; in qla2x00_probe_one()
3507 ql_dbg(ql_dbg_init, base_vha, 0x00f1, in qla2x00_probe_one()
3531 base_vha->flags.difdix_supported = 0; in qla2x00_probe_one()
3537 ret = qlafx00_fx_disc(base_vha, in qla2x00_probe_one()
3538 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3547 base_vha->flags.init_done = 1; in qla2x00_probe_one()
3548 base_vha->flags.online = 1; in qla2x00_probe_one()
3551 ql_dbg(ql_dbg_init, base_vha, 0x00f2, in qla2x00_probe_one()
3554 if (qla_ini_mode_enabled(base_vha) || in qla2x00_probe_one()
3555 qla_dual_mode_enabled(base_vha)) in qla2x00_probe_one()
3558 ql_dbg(ql_dbg_init, base_vha, 0x0122, in qla2x00_probe_one()
3561 qla2x00_alloc_sysfs_attr(base_vha); in qla2x00_probe_one()
3564 ret = qlafx00_fx_disc(base_vha, in qla2x00_probe_one()
3565 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3568 ret = qlafx00_fx_disc(base_vha, in qla2x00_probe_one()
3569 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
3572 qla2x00_init_host_attr(base_vha); in qla2x00_probe_one()
3574 qla2x00_dfs_setup(base_vha); in qla2x00_probe_one()
3576 ql_log(ql_log_info, base_vha, 0x00fb, in qla2x00_probe_one()
3578 ql_log(ql_log_info, base_vha, 0x00fc, in qla2x00_probe_one()
3580 pdev->device, ha->isp_ops->pci_info_str(base_vha, pci_info, in qla2x00_probe_one()
3583 base_vha->host_no, in qla2x00_probe_one()
3584 ha->isp_ops->fw_version_str(base_vha, fw_str, sizeof(fw_str))); in qla2x00_probe_one()
3586 qlt_add_target(ha, base_vha); in qla2x00_probe_one()
3588 clear_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags); in qla2x00_probe_one()
3590 if (test_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_probe_one()
3596 qla_enode_stop(base_vha); in qla2x00_probe_one()
3597 qla_edb_stop(base_vha); in qla2x00_probe_one()
3598 vfree(base_vha->scan.l); in qla2x00_probe_one()
3599 if (base_vha->gnl.l) { in qla2x00_probe_one()
3600 dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size, in qla2x00_probe_one()
3601 base_vha->gnl.l, base_vha->gnl.ldma); in qla2x00_probe_one()
3602 base_vha->gnl.l = NULL; in qla2x00_probe_one()
3605 if (base_vha->timer_active) in qla2x00_probe_one()
3606 qla2x00_stop_timer(base_vha); in qla2x00_probe_one()
3607 base_vha->flags.online = 0; in qla2x00_probe_one()
3615 qla2x00_free_device(base_vha); in qla2x00_probe_one()
3616 scsi_host_put(base_vha->host); in qla2x00_probe_one()
3652 static void __qla_set_remove_flag(scsi_qla_host_t *base_vha) in __qla_set_remove_flag() argument
3658 if (!base_vha) in __qla_set_remove_flag()
3661 ha = base_vha->hw; in __qla_set_remove_flag()
3671 set_bit(PFLG_DRIVER_REMOVING, &base_vha->pci_flags); in __qla_set_remove_flag()
3744 qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha) in qla2x00_delete_all_vps() argument
3753 BUG_ON(base_vha->list.next == &ha->vp_list); in qla2x00_delete_all_vps()
3755 vha = list_first_entry(&base_vha->list, scsi_qla_host_t, list); in qla2x00_delete_all_vps()
3843 scsi_qla_host_t *base_vha; in qla2x00_remove_one() local
3846 base_vha = pci_get_drvdata(pdev); in qla2x00_remove_one()
3847 ha = base_vha->hw; in qla2x00_remove_one()
3848 ql_log(ql_log_info, base_vha, 0xb079, in qla2x00_remove_one()
3850 __qla_set_remove_flag(base_vha); in qla2x00_remove_one()
3859 dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size, in qla2x00_remove_one()
3860 base_vha->gnl.l, base_vha->gnl.ldma); in qla2x00_remove_one()
3861 base_vha->gnl.l = NULL; in qla2x00_remove_one()
3862 scsi_host_put(base_vha->host); in qla2x00_remove_one()
3867 qla2x00_wait_for_hba_ready(base_vha); in qla2x00_remove_one()
3873 if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_remove_one()
3879 qla2x00_abort_isp_cleanup(base_vha); in qla2x00_remove_one()
3882 ql_dbg(ql_dbg_p3p, base_vha, 0xb07e, in qla2x00_remove_one()
3884 if (qla83xx_clear_drv_presence(base_vha) != QLA_SUCCESS) in qla2x00_remove_one()
3885 ql_dbg(ql_dbg_p3p, base_vha, 0xb079, in qla2x00_remove_one()
3889 qla2x00_try_to_stop_firmware(base_vha); in qla2x00_remove_one()
3892 qla2x00_wait_for_sess_deletion(base_vha); in qla2x00_remove_one()
3894 qla_nvme_delete(base_vha); in qla2x00_remove_one()
3897 base_vha->gnl.size, base_vha->gnl.l, base_vha->gnl.ldma); in qla2x00_remove_one()
3899 base_vha->gnl.l = NULL; in qla2x00_remove_one()
3900 qla_enode_stop(base_vha); in qla2x00_remove_one()
3901 qla_edb_stop(base_vha); in qla2x00_remove_one()
3903 vfree(base_vha->scan.l); in qla2x00_remove_one()
3906 qlafx00_driver_shutdown(base_vha, 20); in qla2x00_remove_one()
3908 qla2x00_delete_all_vps(ha, base_vha); in qla2x00_remove_one()
3910 qla2x00_dfs_remove(base_vha); in qla2x00_remove_one()
3912 qla84xx_put_chip(base_vha); in qla2x00_remove_one()
3915 if (base_vha->timer_active) in qla2x00_remove_one()
3916 qla2x00_stop_timer(base_vha); in qla2x00_remove_one()
3918 base_vha->flags.online = 0; in qla2x00_remove_one()
3930 qlt_remove_target(ha, base_vha); in qla2x00_remove_one()
3932 qla2x00_free_sysfs_attr(base_vha, true); in qla2x00_remove_one()
3934 fc_remove_host(base_vha->host); in qla2x00_remove_one()
3936 scsi_remove_host(base_vha->host); in qla2x00_remove_one()
3938 qla2x00_free_device(base_vha); in qla2x00_remove_one()
3942 scsi_host_put(base_vha->host); in qla2x00_remove_one()
5649 qla83xx_schedule_work(scsi_qla_host_t *base_vha, int work_code) in qla83xx_schedule_work() argument
5651 struct qla_hw_data *ha = base_vha->hw; in qla83xx_schedule_work()
5664 ql_dbg(ql_dbg_p3p, base_vha, 0xb05e, in qla83xx_schedule_work()
5677 ql_log(ql_log_warn, base_vha, 0xb05f, in qla83xx_schedule_work()
5690 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla83xx_nic_core_unrecoverable_work() local
5693 qla83xx_idc_lock(base_vha, 0); in qla83xx_nic_core_unrecoverable_work()
5694 qla83xx_rd_reg(base_vha, QLA83XX_IDC_DEV_STATE, &dev_state); in qla83xx_nic_core_unrecoverable_work()
5695 qla83xx_reset_ownership(base_vha); in qla83xx_nic_core_unrecoverable_work()
5698 qla83xx_wr_reg(base_vha, QLA83XX_IDC_DEV_STATE, in qla83xx_nic_core_unrecoverable_work()
5700 ql_log(ql_log_info, base_vha, 0xb060, "HW State: FAILED.\n"); in qla83xx_nic_core_unrecoverable_work()
5701 qla83xx_schedule_work(base_vha, QLA83XX_IDC_STATE_HANDLER); in qla83xx_nic_core_unrecoverable_work()
5703 qla83xx_idc_unlock(base_vha, 0); in qla83xx_nic_core_unrecoverable_work()
5712 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla83xx_idc_state_handler_work() local
5715 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler_work()
5716 qla83xx_rd_reg(base_vha, QLA83XX_IDC_DEV_STATE, &dev_state); in qla83xx_idc_state_handler_work()
5719 qla83xx_idc_state_handler(base_vha); in qla83xx_idc_state_handler_work()
5720 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler_work()
5724 qla83xx_check_nic_core_fw_alive(scsi_qla_host_t *base_vha) in qla83xx_check_nic_core_fw_alive() argument
5732 ql_dbg(ql_dbg_p3p, base_vha, 0xb07c, in qla83xx_check_nic_core_fw_alive()
5738 qla83xx_idc_lock(base_vha, 0); in qla83xx_check_nic_core_fw_alive()
5739 qla83xx_rd_reg(base_vha, QLA83XX_FW_HEARTBEAT, in qla83xx_check_nic_core_fw_alive()
5741 qla83xx_idc_unlock(base_vha, 0); in qla83xx_check_nic_core_fw_alive()
5743 qla83xx_idc_lock(base_vha, 0); in qla83xx_check_nic_core_fw_alive()
5744 qla83xx_rd_reg(base_vha, QLA83XX_FW_HEARTBEAT, in qla83xx_check_nic_core_fw_alive()
5746 qla83xx_idc_unlock(base_vha, 0); in qla83xx_check_nic_core_fw_alive()
5758 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla83xx_nic_core_reset_work() local
5762 if (qla2xxx_mctp_dump(base_vha) != QLA_SUCCESS) in qla83xx_nic_core_reset_work()
5763 ql_log(ql_log_warn, base_vha, 0xb081, in qla83xx_nic_core_reset_work()
5769 if (qla83xx_check_nic_core_fw_alive(base_vha) == QLA_SUCCESS) { in qla83xx_nic_core_reset_work()
5770 qla83xx_idc_lock(base_vha, 0); in qla83xx_nic_core_reset_work()
5771 qla83xx_rd_reg(base_vha, QLA83XX_IDC_DEV_STATE, in qla83xx_nic_core_reset_work()
5773 qla83xx_idc_unlock(base_vha, 0); in qla83xx_nic_core_reset_work()
5775 ql_dbg(ql_dbg_p3p, base_vha, 0xb07a, in qla83xx_nic_core_reset_work()
5782 if (qla83xx_nic_core_reset(base_vha)) { in qla83xx_nic_core_reset_work()
5784 ql_dbg(ql_dbg_p3p, base_vha, 0xb061, in qla83xx_nic_core_reset_work()
5797 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla83xx_service_idc_aen() local
5800 qla83xx_idc_lock(base_vha, 0); in qla83xx_service_idc_aen()
5801 qla83xx_rd_reg(base_vha, QLA83XX_IDC_DEV_STATE, &dev_state); in qla83xx_service_idc_aen()
5802 qla83xx_rd_reg(base_vha, QLA83XX_IDC_CONTROL, &idc_control); in qla83xx_service_idc_aen()
5803 qla83xx_idc_unlock(base_vha, 0); in qla83xx_service_idc_aen()
5806 ql_dbg(ql_dbg_p3p, base_vha, 0xb062, in qla83xx_service_idc_aen()
5808 qla83xx_schedule_work(base_vha, QLA83XX_NIC_CORE_RESET); in qla83xx_service_idc_aen()
5809 } else if (qla83xx_check_nic_core_fw_alive(base_vha) == in qla83xx_service_idc_aen()
5811 ql_dbg(ql_dbg_p3p, base_vha, 0xb07b, in qla83xx_service_idc_aen()
5813 qla83xx_schedule_work(base_vha, QLA83XX_NIC_CORE_RESET); in qla83xx_service_idc_aen()
5817 qla83xx_schedule_work(base_vha, QLA83XX_IDC_STATE_HANDLER); in qla83xx_service_idc_aen()
5827 qla83xx_force_lock_recovery(scsi_qla_host_t *base_vha) in qla83xx_force_lock_recovery() argument
5833 struct qla_hw_data *ha = base_vha->hw; in qla83xx_force_lock_recovery()
5835 ql_dbg(ql_dbg_p3p, base_vha, 0xb086, in qla83xx_force_lock_recovery()
5838 rval = qla83xx_rd_reg(base_vha, QLA83XX_IDC_LOCK_RECOVERY, &data); in qla83xx_force_lock_recovery()
5846 rval = qla83xx_wr_reg(base_vha, QLA83XX_IDC_LOCK_RECOVERY, in qla83xx_force_lock_recovery()
5853 rval = qla83xx_rd_reg(base_vha, QLA83XX_IDC_LOCK_RECOVERY, in qla83xx_force_lock_recovery()
5861 rval = qla83xx_wr_reg(base_vha, in qla83xx_force_lock_recovery()
5867 rval = qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_UNLOCK, in qla83xx_force_lock_recovery()
5872 rval = qla83xx_wr_reg(base_vha, QLA83XX_DRIVER_LOCKID, in qla83xx_force_lock_recovery()
5877 rval = qla83xx_wr_reg(base_vha, in qla83xx_force_lock_recovery()
5889 qla83xx_idc_lock_recovery(scsi_qla_host_t *base_vha) in qla83xx_idc_lock_recovery() argument
5897 rval = qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCKID, &o_drv_lockid); in qla83xx_idc_lock_recovery()
5903 if (qla83xx_force_lock_recovery(base_vha) == QLA_SUCCESS) in qla83xx_idc_lock_recovery()
5909 rval = qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCKID, &n_drv_lockid); in qla83xx_idc_lock_recovery()
5927 qla83xx_idc_lock(scsi_qla_host_t *base_vha, uint16_t requester_id) in qla83xx_idc_lock() argument
5931 struct qla_hw_data *ha = base_vha->hw; in qla83xx_idc_lock()
5937 if (qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCK, &data) in qla83xx_idc_lock()
5941 qla83xx_wr_reg(base_vha, QLA83XX_DRIVER_LOCKID, in qla83xx_idc_lock()
5944 qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCKID, in qla83xx_idc_lock()
5946 ql_dbg(ql_dbg_p3p, base_vha, 0xb063, in qla83xx_idc_lock()
5951 if (qla83xx_idc_lock_recovery(base_vha) in qla83xx_idc_lock()
5956 ql_log(ql_log_warn, base_vha, 0xb075, in qla83xx_idc_lock()
6455 qla83xx_idc_unlock(scsi_qla_host_t *base_vha, uint16_t requester_id) in qla83xx_idc_unlock() argument
6462 struct qla_hw_data *ha = base_vha->hw; in qla83xx_idc_unlock()
6471 if (qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCKID, &data) in qla83xx_idc_unlock()
6474 qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_UNLOCK, &data); in qla83xx_idc_unlock()
6476 qla83xx_wr_reg(base_vha, QLA83XX_DRIVER_LOCKID, 0xff); in qla83xx_idc_unlock()
6483 ql_dbg(ql_dbg_p3p, base_vha, 0xb064, in qla83xx_idc_unlock()
6491 ql_dbg(ql_dbg_p3p, base_vha, 0xb065, in qla83xx_idc_unlock()
6502 if (qla83xx_access_control(base_vha, options, 0, 0, NULL)) { in qla83xx_idc_unlock()
6507 ql_dbg(ql_dbg_p3p, base_vha, 0xb066, in qla83xx_idc_unlock()
6649 qla83xx_idc_state_handler(scsi_qla_host_t *base_vha) in qla83xx_idc_state_handler() argument
6651 struct qla_hw_data *ha = base_vha->hw; in qla83xx_idc_state_handler()
6662 ql_log(ql_log_warn, base_vha, 0xb06e, in qla83xx_idc_state_handler()
6667 qla83xx_wr_reg(base_vha, QLA83XX_IDC_DEV_STATE, in qla83xx_idc_state_handler()
6669 ql_log(ql_log_info, base_vha, 0xb06f, in qla83xx_idc_state_handler()
6673 qla83xx_rd_reg(base_vha, QLA83XX_IDC_DEV_STATE, &dev_state); in qla83xx_idc_state_handler()
6677 qla83xx_idc_audit(base_vha, in qla83xx_idc_state_handler()
6680 ql_dbg(ql_dbg_p3p, base_vha, 0xb070, in qla83xx_idc_state_handler()
6686 rval = qla83xx_device_bootstrap(base_vha); in qla83xx_idc_state_handler()
6689 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6691 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6696 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6698 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6702 qla83xx_need_reset_handler(base_vha); in qla83xx_idc_state_handler()
6705 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6707 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6715 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6717 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6724 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6726 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6732 qla83xx_idc_audit(base_vha, in qla83xx_idc_state_handler()
6735 __qla83xx_clear_drv_presence(base_vha); in qla83xx_idc_state_handler()
6736 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6737 qla8xxx_dev_failed_handler(base_vha); in qla83xx_idc_state_handler()
6739 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6742 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6744 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6747 ql_log(ql_log_warn, base_vha, 0xb071, in qla83xx_idc_state_handler()
6749 qla83xx_idc_unlock(base_vha, 0); in qla83xx_idc_state_handler()
6750 qla8xxx_dev_failed_handler(base_vha); in qla83xx_idc_state_handler()
6752 qla83xx_idc_lock(base_vha, 0); in qla83xx_idc_state_handler()
6767 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_disable_board_on_pci_error() local
6769 ql_log(ql_log_warn, base_vha, 0x015b, in qla2x00_disable_board_on_pci_error()
6773 ql_log(ql_log_info, base_vha, 0xfffc, in qla2x00_disable_board_on_pci_error()
6775 base_vha->pci_flags); in qla2x00_disable_board_on_pci_error()
6783 if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_disable_board_on_pci_error()
6786 qla2x00_wait_for_sess_deletion(base_vha); in qla2x00_disable_board_on_pci_error()
6788 qla2x00_delete_all_vps(ha, base_vha); in qla2x00_disable_board_on_pci_error()
6790 qla2x00_abort_all_cmds(base_vha, DID_NO_CONNECT << 16); in qla2x00_disable_board_on_pci_error()
6792 qla2x00_dfs_remove(base_vha); in qla2x00_disable_board_on_pci_error()
6794 qla84xx_put_chip(base_vha); in qla2x00_disable_board_on_pci_error()
6796 if (base_vha->timer_active) in qla2x00_disable_board_on_pci_error()
6797 qla2x00_stop_timer(base_vha); in qla2x00_disable_board_on_pci_error()
6799 base_vha->flags.online = 0; in qla2x00_disable_board_on_pci_error()
6807 qla2x00_free_sysfs_attr(base_vha, false); in qla2x00_disable_board_on_pci_error()
6809 fc_remove_host(base_vha->host); in qla2x00_disable_board_on_pci_error()
6811 scsi_remove_host(base_vha->host); in qla2x00_disable_board_on_pci_error()
6813 base_vha->flags.init_done = 0; in qla2x00_disable_board_on_pci_error()
6814 qla25xx_delete_queues(base_vha); in qla2x00_disable_board_on_pci_error()
6815 qla2x00_free_fcports(base_vha); in qla2x00_disable_board_on_pci_error()
6816 qla2x00_free_irqs(base_vha); in qla2x00_disable_board_on_pci_error()
6818 qla82xx_md_free(base_vha); in qla2x00_disable_board_on_pci_error()
6848 scsi_qla_host_t *base_vha; in qla2x00_do_dpc() local
6854 base_vha = pci_get_drvdata(ha->pdev); in qla2x00_do_dpc()
6860 ql_dbg(ql_dbg_dpc, base_vha, 0x4000, in qla2x00_do_dpc()
6865 if (test_and_clear_bit(DO_EEH_RECOVERY, &base_vha->dpc_flags)) in qla2x00_do_dpc()
6866 qla_pci_set_eeh_busy(base_vha); in qla2x00_do_dpc()
6868 if (!base_vha->flags.init_done || ha->flags.mbox_busy) in qla2x00_do_dpc()
6872 ql_dbg(ql_dbg_dpc, base_vha, 0x4003, in qla2x00_do_dpc()
6879 ql_dbg(ql_dbg_dpc + ql_dbg_verbose, base_vha, 0x4001, in qla2x00_do_dpc()
6881 base_vha->dpc_flags); in qla2x00_do_dpc()
6883 if (test_bit(UNLOADING, &base_vha->dpc_flags)) in qla2x00_do_dpc()
6889 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6891 qla8044_wr_direct(base_vha, in qla2x00_do_dpc()
6895 ql_log(ql_log_info, base_vha, 0x4004, in qla2x00_do_dpc()
6897 qla8044_device_state_handler(base_vha); in qla2x00_do_dpc()
6903 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6908 ql_log(ql_log_info, base_vha, 0x0151, in qla2x00_do_dpc()
6910 qla82xx_device_state_handler(base_vha); in qla2x00_do_dpc()
6916 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6918 ql_dbg(ql_dbg_dpc, base_vha, 0x4005, in qla2x00_do_dpc()
6921 &base_vha->dpc_flags))) { in qla2x00_do_dpc()
6922 if (qla82xx_fcoe_ctx_reset(base_vha)) { in qla2x00_do_dpc()
6927 &base_vha->dpc_flags); in qla2x00_do_dpc()
6930 &base_vha->dpc_flags); in qla2x00_do_dpc()
6933 ql_dbg(ql_dbg_dpc, base_vha, 0x4006, in qla2x00_do_dpc()
6938 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6939 ql_dbg(ql_dbg_dpc, base_vha, 0x4020, in qla2x00_do_dpc()
6941 if (qlafx00_reset_initialize(base_vha)) { in qla2x00_do_dpc()
6944 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6946 &base_vha->dpc_flags); in qla2x00_do_dpc()
6947 ql_dbg(ql_dbg_dpc, base_vha, in qla2x00_do_dpc()
6955 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6956 ql_dbg(ql_dbg_dpc, base_vha, 0x4022, in qla2x00_do_dpc()
6958 if (qlafx00_rescan_isp(base_vha)) { in qla2x00_do_dpc()
6960 &base_vha->dpc_flags)) in qla2x00_do_dpc()
6962 &base_vha->dpc_flags); in qla2x00_do_dpc()
6963 ql_dbg(ql_dbg_dpc, base_vha, 0x401e, in qla2x00_do_dpc()
6966 ql_dbg(ql_dbg_dpc, base_vha, 0x401f, in qla2x00_do_dpc()
6970 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6971 ql_dbg(ql_dbg_dpc, base_vha, 0x4023, in qla2x00_do_dpc()
6973 qlafx00_fx_disc(base_vha, in qla2x00_do_dpc()
6974 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
6980 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6991 (ISP_ABORT_NEEDED, &base_vha->dpc_flags) && in qla2x00_do_dpc()
6992 !test_bit(UNLOADING, &base_vha->dpc_flags)) { in qla2x00_do_dpc()
6995 switch (base_vha->qlini_mode) { in qla2x00_do_dpc()
6999 if (!qla_tgt_mode_enabled(base_vha) && in qla2x00_do_dpc()
7004 if (!qla_dual_mode_enabled(base_vha) && in qla2x00_do_dpc()
7013 &base_vha->dpc_flags))) { in qla2x00_do_dpc()
7014 base_vha->flags.online = 1; in qla2x00_do_dpc()
7015 ql_dbg(ql_dbg_dpc, base_vha, 0x4007, in qla2x00_do_dpc()
7017 if (ha->isp_ops->abort_isp(base_vha)) { in qla2x00_do_dpc()
7020 &base_vha->dpc_flags); in qla2x00_do_dpc()
7023 &base_vha->dpc_flags); in qla2x00_do_dpc()
7024 ql_dbg(ql_dbg_dpc, base_vha, 0x4008, in qla2x00_do_dpc()
7029 if (test_bit(PROCESS_PUREX_IOCB, &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7030 if (atomic_read(&base_vha->loop_state) == LOOP_READY) { in qla2x00_do_dpc()
7032 (&base_vha->purex_list); in qla2x00_do_dpc()
7034 &base_vha->dpc_flags); in qla2x00_do_dpc()
7039 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7040 qla2x00_update_fcports(base_vha); in qla2x00_do_dpc()
7046 if (test_bit(ISP_QUIESCE_NEEDED, &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7047 ql_dbg(ql_dbg_dpc, base_vha, 0x4009, in qla2x00_do_dpc()
7051 qla82xx_device_state_handler(base_vha); in qla2x00_do_dpc()
7053 qla8044_device_state_handler(base_vha); in qla2x00_do_dpc()
7055 &base_vha->dpc_flags); in qla2x00_do_dpc()
7057 qla2x00_perform_loop_resync(base_vha); in qla2x00_do_dpc()
7061 base_vha); in qla2x00_do_dpc()
7066 base_vha); in qla2x00_do_dpc()
7072 &base_vha->dpc_flags); in qla2x00_do_dpc()
7073 qla2x00_quiesce_io(base_vha); in qla2x00_do_dpc()
7075 ql_dbg(ql_dbg_dpc, base_vha, 0x400a, in qla2x00_do_dpc()
7080 &base_vha->dpc_flags) && in qla2x00_do_dpc()
7081 (!(test_and_set_bit(RESET_ACTIVE, &base_vha->dpc_flags)))) { in qla2x00_do_dpc()
7083 ql_dbg(ql_dbg_dpc, base_vha, 0x400b, in qla2x00_do_dpc()
7085 qla2x00_rst_aen(base_vha); in qla2x00_do_dpc()
7086 clear_bit(RESET_ACTIVE, &base_vha->dpc_flags); in qla2x00_do_dpc()
7087 ql_dbg(ql_dbg_dpc, base_vha, 0x400c, in qla2x00_do_dpc()
7092 if (test_bit(RELOGIN_NEEDED, &base_vha->dpc_flags) && in qla2x00_do_dpc()
7093 !test_bit(LOOP_RESYNC_NEEDED, &base_vha->dpc_flags) && in qla2x00_do_dpc()
7094 atomic_read(&base_vha->loop_state) != LOOP_DOWN) { in qla2x00_do_dpc()
7096 if (!base_vha->relogin_jif || in qla2x00_do_dpc()
7097 time_after_eq(jiffies, base_vha->relogin_jif)) { in qla2x00_do_dpc()
7098 base_vha->relogin_jif = jiffies + HZ; in qla2x00_do_dpc()
7099 clear_bit(RELOGIN_NEEDED, &base_vha->dpc_flags); in qla2x00_do_dpc()
7101 ql_dbg(ql_dbg_disc, base_vha, 0x400d, in qla2x00_do_dpc()
7103 qla24xx_post_relogin_work(base_vha); in qla2x00_do_dpc()
7107 if (!qla2x00_reset_active(base_vha) && in qla2x00_do_dpc()
7109 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7113 ql_dbg(ql_dbg_dpc, base_vha, 0x400f, in qla2x00_do_dpc()
7117 &base_vha->dpc_flags))) { in qla2x00_do_dpc()
7119 qla2x00_loop_resync(base_vha); in qla2x00_do_dpc()
7122 &base_vha->dpc_flags); in qla2x00_do_dpc()
7125 ql_dbg(ql_dbg_dpc, base_vha, 0x4010, in qla2x00_do_dpc()
7132 if (test_bit(NPIV_CONFIG_NEEDED, &base_vha->dpc_flags) && in qla2x00_do_dpc()
7133 atomic_read(&base_vha->loop_state) == LOOP_READY) { in qla2x00_do_dpc()
7134 clear_bit(NPIV_CONFIG_NEEDED, &base_vha->dpc_flags); in qla2x00_do_dpc()
7135 qla2xxx_flash_npiv_conf(base_vha); in qla2x00_do_dpc()
7143 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7145 ha->isp_ops->beacon_blink(base_vha); in qla2x00_do_dpc()
7150 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7158 list_for_each_entry(qpair, &base_vha->qp_list, in qla2x00_do_dpc()
7165 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7171 ql_log(ql_log_info, base_vha, 0xffffff, in qla2x00_do_dpc()
7174 if (qla27xx_set_zio_threshold(base_vha, threshold)) { in qla2x00_do_dpc()
7175 ql_log(ql_log_info, base_vha, 0xffffff, in qla2x00_do_dpc()
7182 qla2x00_do_dpc_all_vps(base_vha); in qla2x00_do_dpc()
7185 &base_vha->dpc_flags)) { in qla2x00_do_dpc()
7186 qla2x00_lip_reset(base_vha); in qla2x00_do_dpc()
7195 ql_dbg(ql_dbg_dpc, base_vha, 0x4011, in qla2x00_do_dpc()
7204 qla2x00_abort_all_cmds(base_vha, DID_NO_CONNECT << 16); in qla2x00_do_dpc()
7689 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla_pci_error_cleanup() local
7714 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem) in qla_pci_error_cleanup()
7800 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); in qla2xxx_pci_mmio_enabled() local
7801 struct qla_hw_data *ha = base_vha->hw; in qla2xxx_pci_mmio_enabled()
7805 ql_log(ql_log_warn, base_vha, 0x9000, in qla2xxx_pci_mmio_enabled()
7814 ql_log(ql_log_info, base_vha, 0x803f, in qla2xxx_pci_mmio_enabled()
7836 ql_log(ql_log_info, base_vha, 0x9003, in qla2xxx_pci_mmio_enabled()
7838 qla2xxx_dump_fw(base_vha); in qla2xxx_pci_mmio_enabled()
7842 ql_dbg(ql_dbg_aer, base_vha, 0x600d, in qla2xxx_pci_mmio_enabled()
7851 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); in qla2xxx_pci_slot_reset() local
7852 struct qla_hw_data *ha = base_vha->hw; in qla2xxx_pci_slot_reset()
7856 ql_log(ql_log_warn, base_vha, 0x9004, in qla2xxx_pci_slot_reset()
7879 ql_log(ql_log_warn, base_vha, 0x9005, in qla2xxx_pci_slot_reset()
7885 if (ha->isp_ops->pci_config(base_vha)) in qla2xxx_pci_slot_reset()
7889 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem) in qla2xxx_pci_slot_reset()
7894 base_vha->flags.online = 1; in qla2xxx_pci_slot_reset()
7895 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla2xxx_pci_slot_reset()
7896 ha->isp_ops->abort_isp(base_vha); in qla2xxx_pci_slot_reset()
7897 clear_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla2xxx_pci_slot_reset()
7901 qla_pci_error_cleanup(base_vha); in qla2xxx_pci_slot_reset()
7902 ql_log(ql_log_warn, base_vha, 0x9005, in qla2xxx_pci_slot_reset()
7909 ql_dbg(ql_dbg_aer, base_vha, 0x900e, in qla2xxx_pci_slot_reset()
7918 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); in qla2xxx_pci_resume() local
7919 struct qla_hw_data *ha = base_vha->hw; in qla2xxx_pci_resume()
7922 ql_log(ql_log_warn, base_vha, 0x900f, in qla2xxx_pci_resume()
7926 ret = qla2x00_wait_for_hba_online(base_vha); in qla2xxx_pci_resume()
7928 ql_log(ql_log_fatal, base_vha, 0x9002, in qla2xxx_pci_resume()
7932 ql_dbg(ql_dbg_aer, base_vha, 0x600d, in qla2xxx_pci_resume()
7939 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla_pci_set_eeh_busy() local
7946 spin_lock_irqsave(&base_vha->work_lock, flags); in qla_pci_set_eeh_busy()
7954 spin_unlock_irqrestore(&base_vha->work_lock, flags); in qla_pci_set_eeh_busy()
7957 qla_pci_error_cleanup(base_vha); in qla_pci_set_eeh_busy()
7967 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla_schedule_eeh_work() local
7972 set_bit(DO_EEH_RECOVERY, &base_vha->dpc_flags); in qla_schedule_eeh_work()
7973 qla2xxx_wake_dpc(base_vha); in qla_schedule_eeh_work()
7979 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); in qla_pci_reset_prepare() local
7980 struct qla_hw_data *ha = base_vha->hw; in qla_pci_reset_prepare()
7983 ql_log(ql_log_warn, base_vha, 0xffff, in qla_pci_reset_prepare()
7994 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem) in qla_pci_reset_prepare()
7998 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla_pci_reset_prepare()
7999 qla2x00_abort_isp_cleanup(base_vha); in qla_pci_reset_prepare()
8000 qla2x00_abort_all_cmds(base_vha, DID_RESET << 16); in qla_pci_reset_prepare()
8006 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); in qla_pci_reset_done() local
8007 struct qla_hw_data *ha = base_vha->hw; in qla_pci_reset_done()
8010 ql_log(ql_log_warn, base_vha, 0xffff, in qla_pci_reset_done()
8018 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem) in qla_pci_reset_done()
8022 base_vha->flags.online = 1; in qla_pci_reset_done()
8023 ha->isp_ops->abort_isp(base_vha); in qla_pci_reset_done()
8024 clear_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); in qla_pci_reset_done()