Lines Matching defs:ha

101 static void qlt_24xx_atio_pkt(struct scsi_qla_host *ha,
103 static void qlt_response_pkt(struct scsi_qla_host *ha, struct rsp_que *rsp,
685 struct qla_hw_data *ha = NULL;
690 ha = fcport->vha->hw;
693 ha->tgt.tgt_ops->shutdown_sess(fcport);
694 ha->tgt.tgt_ops->put_sess(fcport);
705 struct qla_hw_data *ha = vha->hw;
713 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
715 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
720 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
725 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
731 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
734 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
742 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
754 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id,
766 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
768 ha->tgt.tgt_ops->put_sess(sess);
952 struct qla_hw_data *ha = vha->hw;
955 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
996 ELS_PRLI) && ha->flags.rida_fmt2) {
1014 if (ha->flags.edif_enabled &&
1017 if (!ha->flags.host_shutting_down) {
1037 ha->tgt.tgt_ops->free_session(sess);
1081 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
1140 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
1177 /* ha->tgt.sess_lock supposed to be held on entry */
1214 struct qla_hw_data *ha = vha->hw;
1225 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
1227 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
1229 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
1230 sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id);
1231 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
1333 struct qla_hw_data *ha = vha->hw;
1339 gid_list = dma_alloc_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
1344 vha->vp_idx, qla2x00_gid_list_size(ha));
1368 gid = (void *)gid + ha->gid_list_info_size;
1372 dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
1386 struct qla_hw_data *ha = vha->hw;
1415 if (ha->tgt.tgt_ops->check_initiator_node_acl(vha,
1434 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
1439 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
1503 struct qla_hw_data *ha = tgt->ha;
1510 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
1515 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
1524 struct qla_hw_data *ha = tgt->ha;
1527 mutex_lock(&ha->optrom_mutex);
1534 mutex_unlock(&ha->optrom_mutex);
1566 if (!ha->flags.host_shutting_down &&
1572 mutex_unlock(&ha->optrom_mutex);
1596 mutex_lock(&tgt->ha->optrom_mutex);
1601 mutex_unlock(&tgt->ha->optrom_mutex);
1625 struct qla_hw_data *ha = vha->hw;
1655 if (ha->tgt.tgt_ops &&
1656 ha->tgt.tgt_ops->remove_target &&
1658 ha->tgt.tgt_ops->remove_target(vha);
1668 /* ha->hardware_lock supposed to be held on entry */
1701 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
1709 struct qla_hw_data *ha = vha->hw;
1713 if (!ha->flags.fw_started)
1716 ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha);
1771 struct qla_hw_data *ha = vha->hw;
1781 "Sending task mgmt ABTS response (ha=%p, status=%x)\n",
1782 ha, mcmd->fc_tm_rsp);
1854 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
1861 struct qla_hw_data *ha = vha->hw;
1867 "Sending task mgmt ABTS response (ha=%p, atio=%p, status=%x\n",
1868 ha, abts, status);
1927 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
2061 struct qla_hw_data *ha = mcmd->vha->hw;
2075 rc = ha->tgt.tgt_ops->handle_tmr(mcmd, mcmd->unpacked_lun,
2110 /* ha->hardware_lock supposed to be held on entry */
2114 struct qla_hw_data *ha = vha->hw;
2134 mcmd->reset_count = ha->base_qpair->chip_reset;
2145 abort_cmd = ha->tgt.tgt_ops->find_cmd_by_tag(sess,
2167 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
2172 struct qla_hw_data *ha = vha->hw;
2183 qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED,
2192 qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED,
2205 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
2206 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
2211 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
2213 qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED,
2217 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
2221 qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED,
2231 qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED,
2238 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
2243 struct scsi_qla_host *ha = mcmd->vha;
2248 ql_dbg(ql_dbg_tgt, ha, 0xe008,
2249 "Sending task mgmt CTIO7 (ha=%p, atio=%p, resp_code=%x\n",
2250 ha, atio, resp_code);
2255 ql_dbg(ql_dbg_tgt, ha, 0xe04c,
2257 "request packet\n", ha->vp_idx, __func__);
2266 ctio->vp_index = ha->vp_idx;
2284 qla2x00_start_iocbs(ha, qpair->req);
2294 * ha->hardware_lock supposed to be held on entry. Might drop it, then
2365 struct qla_hw_data *ha = vha->hw;
2385 ha->tgt.tgt_ops->free_mcmd(mcmd);
2423 ha->tgt.tgt_ops->free_mcmd(mcmd);
2492 struct qla_hw_data *ha;
2510 ha = vha->hw;
2512 qla2x00_clean_dsd_pool(ha, cmd->ctx);
2514 dma_pool_free(ha->dl_dma_pool, cmd->ctx, cmd->ctx->crc_ctx_dma);
2542 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
2557 /* ha->hardware_lock supposed to be held on entry */
2593 /* ha->hardware_lock supposed to be held on entry */
2647 * ha->hardware_lock supposed to be held on entry. We have already made sure
2687 * ha->hardware_lock supposed to be held on entry. We have already made sure
2775 * Called without ha->hardware_lock held
2964 struct qla_hw_data *ha = vha->hw;
2976 if (IS_PI_UNINIT_CAPABLE(ha)) {
2984 t32 = ha->tgt.tgt_ops->get_dif_tags(cmd, pfw_prot_opts);
3007 !(ha->tgt.tgt_ops->chk_dif_tags(t32))) {
3024 !(ha->tgt.tgt_ops->chk_dif_tags(t32))) {
3052 struct qla_hw_data *ha;
3064 ha = vha->hw;
3104 else if (IS_PI_UNINIT_CAPABLE(ha)) {
3177 dma_pool_zalloc(ha->dl_dma_pool, GFP_ATOMIC, &crc_ctx_dma);
3226 if (qla24xx_walk_and_build_sglist_no_difb(ha, NULL, cur_dsd,
3229 } else if (qla24xx_walk_and_build_sglist(ha, NULL, cur_dsd,
3238 if (qla24xx_walk_and_build_prot_sglist(ha, NULL, cur_dsd,
3602 struct qla_hw_data *ha = vha->hw;
3607 "Sending TERM ELS CTIO (ha=%p)\n", ha);
3667 struct qla_hw_data *ha = vha->hw;
3672 ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha);
3871 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
3904 /* ha->hardware_lock supposed to be held on entry */
3957 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
3962 struct qla_hw_data *ha = vha->hw;
4097 ha->tgt.tgt_ops->handle_data(cmd);
4116 ha->tgt.tgt_ops->free_cmd(cmd);
4157 struct qla_hw_data *ha = vha->hw;
4195 ret = ha->tgt.tgt_ops->handle_cmd(vha, cmd, cdb, data_length,
4202 ha->tgt.tgt_ops->put_sess(sess);
4219 ha->tgt.tgt_ops->put_sess(sess);
4238 struct qla_hw_data *ha = vha->hw;
4245 ha->tgt.num_act_qpairs);
4247 spin_lock_irqsave(&ha->tgt.atio_lock, flags);
4252 ha->base_qpair->lun_cnt = 0;
4253 for (key = 0; key < ha->max_qpairs; key++)
4254 if (ha->queue_pair_map[key])
4255 ha->queue_pair_map[key]->lun_cnt = 0;
4257 spin_unlock_irqrestore(&ha->tgt.atio_lock, flags);
4373 /* ha->hardware_lock supposed to be held on entry */
4377 struct qla_hw_data *ha = vha->hw;
4394 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, atio->u.isp24.fcp_hdr.s_id);
4422 ha->tgt.tgt_ops->put_sess(sess);
4436 } else if (ha->msix_count) {
4449 /* ha->hardware_lock supposed to be held on entry */
4454 struct qla_hw_data *ha = vha->hw;
4476 mcmd->reset_count = ha->base_qpair->chip_reset;
4510 /* ha->hardware_lock supposed to be held on entry */
4514 struct qla_hw_data *ha = vha->hw;
4522 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
4523 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha,
4525 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
4536 /* ha->hardware_lock supposed to be held on entry */
4541 struct qla_hw_data *ha = vha->hw;
4561 mcmd->reset_count = ha->base_qpair->chip_reset;
4563 mcmd->qpair = ha->base_qpair;
4565 rc = ha->tgt.tgt_ops->handle_tmr(mcmd, unpacked_lun, mcmd->tmr_func,
4578 /* ha->hardware_lock supposed to be held on entry */
4582 struct qla_hw_data *ha = vha->hw;
4587 loop_id = GET_TARGET_ID(ha, (struct atio_from_isp *)iocb);
4589 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
4590 sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id);
4591 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
4623 * ha->hardware_lock supposed to be held on entry (to protect tgt->sess_list)
4947 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
4953 struct qla_hw_data *ha = vha->hw;
4962 lockdep_assert_held(&ha->hardware_lock);
4989 if (N2N_TOPO(ha)) {
5024 spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags);
5027 spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, flags);
5061 spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags);
5074 spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock,
5100 spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock,
5136 spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, flags);
5141 if (ha->current_topology != ISP_CFG_F) {
5177 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
5179 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
5215 qlt_send_notify_ack(ha->base_qpair,
5250 * ha->hardware_lock supposed to be held on entry.
5256 struct qla_hw_data *ha = vha->hw;
5261 lockdep_assert_held(&ha->hardware_lock);
5287 qlt_send_notify_ack(ha->base_qpair,
5350 GET_TARGET_ID(ha, (struct atio_from_isp *)iocb),
5380 qlt_send_notify_ack(ha->base_qpair, iocb, add_flags, 0, 0, 0,
5385 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
5393 struct qla_hw_data *ha = vha->hw;
5402 spin_lock_irqsave(&ha->tgt.sess_lock, flags);
5404 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
5466 struct qla_hw_data *ha = vha->hw;
5493 sess = ha->tgt.tgt_ops->find_sess_by_s_id
5498 cmd = ha->tgt.tgt_ops->get_cmd(sess);
5520 cmd->reset_count = ha->base_qpair->chip_reset;
5522 cmd->qpair = ha->base_qpair;
5546 struct qla_hw_data *ha = vha->hw;
5552 if (list_empty(&ha->tgt.q_full_list))
5559 if (list_empty(&ha->tgt.q_full_list)) {
5633 struct qla_hw_data *ha = vha->hw;
5636 if (ha->tgt.num_pend_cmds < Q_FULL_THRESH_HOLD(ha))
5640 spin_lock_irqsave(&ha->hardware_lock, flags);
5643 spin_unlock_irqrestore(&ha->hardware_lock, flags);
5648 /* ha->hardware_lock supposed to be held on entry */
5653 struct qla_hw_data *ha = vha->hw;
5660 "ATIO pkt, but no tgt (ha %p)", ha);
5679 spin_lock_irqsave(&ha->hardware_lock, flags);
5680 qlt_send_busy(ha->base_qpair, atio, qla_sam_status);
5682 spin_unlock_irqrestore(&ha->hardware_lock,
5688 rc = qlt_chk_qfull_thresh_hold(vha, ha->base_qpair,
5700 spin_lock_irqsave(&ha->hardware_lock, flags);
5709 qlt_send_term_exchange(ha->base_qpair, NULL,
5716 qlt_send_busy(ha->base_qpair, atio,
5723 qlt_send_busy(ha->base_qpair, atio,
5728 spin_unlock_irqrestore(&ha->hardware_lock,
5746 spin_lock_irqsave(&ha->hardware_lock, flags);
5749 spin_unlock_irqrestore(&ha->hardware_lock, flags);
5771 struct qla_hw_data *ha = vha->hw;
5792 if (qpair == ha->base_qpair)
5793 ha->isp_ops->fw_dump(vha);
5817 struct qla_hw_data *ha = vha->hw;
5839 ha->tgt.tgt_ops->free_mcmd(mcmd);
5850 ha->tgt.tgt_ops->free_mcmd(mcmd);
5853 ha->tgt.tgt_ops->free_mcmd(mcmd);
5857 /* ha->hardware_lock supposed to be held on entry */
5866 "qla_target(%d): Response pkt %x received, but no tgt (ha %p)\n",
6012 * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
6017 struct qla_hw_data *ha = vha->hw;
6025 IS_QLA2100(ha))
6053 qlt_send_notify_ack(ha->base_qpair,
6274 struct qla_hw_data *ha = vha->hw;
6280 spin_lock_irqsave(&ha->tgt.sess_lock, flags2);
6287 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
6289 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
6294 spin_lock_irqsave(&ha->tgt.sess_lock, flags2);
6313 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
6315 ha->tgt.tgt_ops->put_sess(sess);
6322 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
6325 spin_lock_irqsave(&ha->hardware_lock, flags);
6326 qlt_24xx_send_abts_resp(ha->base_qpair, &prm->abts,
6328 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6370 int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
6379 if (!IS_TGT_MODE_CAPABLE(ha)) {
6386 "Registering target for host %ld(%p).\n", base_vha->host_no, ha);
6397 tgt->qphints = kcalloc(ha->max_qpairs + 1,
6418 h->qpair = ha->base_qpair;
6420 h->cpuid = ha->base_qpair->cpuid;
6421 list_add_tail(&h->hint_elem, &ha->base_qpair->hints_list);
6423 for (i = 0; i < ha->max_qpairs; i++) {
6426 struct qla_qpair *qpair = ha->queue_pair_map[i];
6439 tgt->ha = ha;
6459 if (ha->tgt.tgt_ops && ha->tgt.tgt_ops->add_target)
6460 ha->tgt.tgt_ops->add_target(base_vha);
6466 int qlt_remove_target(struct qla_hw_data *ha, struct scsi_qla_host *vha)
6480 vha->host_no, ha);
6486 void qla_remove_hostmap(struct qla_hw_data *ha)
6491 btree_for_each_safe32(&ha->host_map, key, node)
6492 btree_remove32(&ha->host_map, key);
6494 btree_destroy32(&ha->host_map);
6521 struct qla_hw_data *ha;
6530 ha = vha->hw;
6542 spin_lock_irqsave(&ha->hardware_lock, flags);
6546 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6552 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6555 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6589 struct qla_hw_data *ha = vha->hw;
6595 ha->tgt.tgt_ops = NULL;
6649 struct qla_hw_data *ha = vha->hw;
6652 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
6664 if (ha->tgt.num_act_qpairs > ha->max_qpairs)
6665 ha->tgt.num_act_qpairs = ha->max_qpairs;
6666 spin_lock_irqsave(&ha->hardware_lock, flags);
6669 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6671 mutex_lock(&ha->optrom_mutex);
6683 mutex_unlock(&ha->optrom_mutex);
6694 struct qla_hw_data *ha = vha->hw;
6706 spin_lock_irqsave(&ha->hardware_lock, flags);
6708 spin_unlock_irqrestore(&ha->hardware_lock, flags);
6728 qlt_vport_create(struct scsi_qla_host *vha, struct qla_hw_data *ha)
6746 ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX;
6748 qlt_add_target(ha, vha);
6770 * @ha: HA context
6780 struct qla_hw_data *ha = vha->hw;
6782 struct atio_from_isp *pkt = (struct atio_from_isp *)ha->tgt.atio_ring;
6787 for (cnt = 0; cnt < ha->tgt.atio_q_length; cnt++) {
6796 * @ha: SCSI driver HA context
6801 struct qla_hw_data *ha = vha->hw;
6805 if (!ha->flags.fw_started)
6808 while ((ha->tgt.atio_ring_ptr->signature != ATIO_PROCESSED) ||
6809 fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr)) {
6810 pkt = (struct atio_from_isp *)ha->tgt.atio_ring_ptr;
6813 if (unlikely(fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr))) {
6826 qlt_send_term_exchange(ha->base_qpair, NULL, pkt,
6834 ha->tgt.atio_ring_index++;
6835 if (ha->tgt.atio_ring_index == ha->tgt.atio_q_length) {
6836 ha->tgt.atio_ring_index = 0;
6837 ha->tgt.atio_ring_ptr = ha->tgt.atio_ring;
6839 ha->tgt.atio_ring_ptr++;
6842 pkt = (struct atio_from_isp *)ha->tgt.atio_ring_ptr;
6848 wrt_reg_dword(ISP_ATIO_Q_OUT(vha), ha->tgt.atio_ring_index);
6854 struct qla_hw_data *ha = vha->hw;
6855 struct qla_msix_entry *msix = &ha->msix_entries[2];
6856 struct init_cb_24xx *icb = (struct init_cb_24xx *)ha->init_cb;
6865 if (ha->flags.msix_enabled) {
6866 if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
6875 if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
6887 struct qla_hw_data *ha = vha->hw;
6894 if (!ha->tgt.saved_set) {
6896 ha->tgt.saved_exchange_count = nv->exchange_count;
6897 ha->tgt.saved_firmware_options_1 =
6899 ha->tgt.saved_firmware_options_2 =
6901 ha->tgt.saved_firmware_options_3 =
6903 ha->tgt.saved_set = 1;
6941 if (IS_QLA25XX(ha)) {
6949 if (ha->tgt.saved_set) {
6950 nv->exchange_count = ha->tgt.saved_exchange_count;
6952 ha->tgt.saved_firmware_options_1;
6954 ha->tgt.saved_firmware_options_2;
6956 ha->tgt.saved_firmware_options_3;
6961 if (ha->base_qpair->enable_class_2) {
6979 struct qla_hw_data *ha = vha->hw;
6984 if (ha->tgt.node_name_set) {
6985 memcpy(icb->node_name, ha->tgt.tgt_node_name, WWN_SIZE);
6993 struct qla_hw_data *ha = vha->hw;
7000 if (!ha->tgt.saved_set) {
7002 ha->tgt.saved_exchange_count = nv->exchange_count;
7003 ha->tgt.saved_firmware_options_1 =
7005 ha->tgt.saved_firmware_options_2 =
7007 ha->tgt.saved_firmware_options_3 =
7009 ha->tgt.saved_set = 1;
7052 if (ha->tgt.saved_set) {
7053 nv->exchange_count = ha->tgt.saved_exchange_count;
7055 ha->tgt.saved_firmware_options_1;
7057 ha->tgt.saved_firmware_options_2;
7059 ha->tgt.saved_firmware_options_3;
7064 if (ha->base_qpair->enable_class_2) {
7082 struct qla_hw_data *ha = vha->hw;
7087 if (ha->tgt.node_name_set) {
7088 memcpy(icb->node_name, ha->tgt.tgt_node_name, WWN_SIZE);
7094 qlt_83xx_iospace_config(struct qla_hw_data *ha)
7099 ha->msix_count += 1; /* For ATIO Q */
7117 qlt_probe_one_stage1(struct scsi_qla_host *base_vha, struct qla_hw_data *ha)
7123 if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
7124 ISP_ATIO_Q_IN(base_vha) = &ha->mqiobase->isp25mq.atio_q_in;
7125 ISP_ATIO_Q_OUT(base_vha) = &ha->mqiobase->isp25mq.atio_q_out;
7127 ISP_ATIO_Q_IN(base_vha) = &ha->iobase->isp24.atio_q_in;
7128 ISP_ATIO_Q_OUT(base_vha) = &ha->iobase->isp24.atio_q_out;
7147 struct qla_hw_data *ha;
7151 ha = rsp->hw;
7152 vha = pci_get_drvdata(ha->pdev);
7154 spin_lock_irqsave(&ha->tgt.atio_lock, flags);
7158 spin_unlock_irqrestore(&ha->tgt.atio_lock, flags);
7169 struct qla_hw_data *ha = vha->hw;
7173 (op->chip_reset != ha->base_qpair->chip_reset))
7176 spin_lock_irqsave(&ha->tgt.atio_lock, flags);
7178 spin_unlock_irqrestore(&ha->tgt.atio_lock, flags);
7180 spin_lock_irqsave(&ha->hardware_lock, flags);
7182 spin_unlock_irqrestore(&ha->hardware_lock, flags);
7213 qlt_mem_alloc(struct qla_hw_data *ha)
7218 ha->tgt.atio_ring = dma_alloc_coherent(&ha->pdev->dev,
7219 (ha->tgt.atio_q_length + 1) * sizeof(struct atio_from_isp),
7220 &ha->tgt.atio_dma, GFP_KERNEL);
7221 if (!ha->tgt.atio_ring) {
7228 qlt_mem_free(struct qla_hw_data *ha)
7233 if (ha->tgt.atio_ring) {
7234 dma_free_coherent(&ha->pdev->dev, (ha->tgt.atio_q_length + 1) *
7235 sizeof(struct atio_from_isp), ha->tgt.atio_ring,
7236 ha->tgt.atio_dma);
7238 ha->tgt.atio_ring = NULL;
7239 ha->tgt.atio_dma = 0;