Lines Matching +full:hw +full:- +full:timeout +full:- +full:ms
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2013-2016 Qlogic Corporation
36 #define QL8_SEMLOCK_TIMEOUT 1000/* QLA8020 Semaphore Lock Timeout 10ms */
57 count--; in qla_sem_lock()
60 return(-1); in qla_sem_lock()
83 return(((NUM_TX_DESCRIPTORS * 4) - 1)); in qla_get_ifq_snd_maxlen()
92 if (ha->pci_func == 0) in qla_get_optics()
107 if ((ha->hw.module_type == 0x4) || in qla_get_optics()
108 (ha->hw.module_type == 0x5) || in qla_get_optics()
109 (ha->hw.module_type == 0x6)) in qla_get_optics()
122 return (ha->hw.mac_addr); in qla_get_mac_addr()
131 rcv_desc = (q80_recv_desc_t *)ha->hw.dma_buf.rds_ring[r_idx].dma_b; in qla_set_hw_rcv_desc()
135 rcv_desc->handle = (uint16_t)handle; in qla_set_hw_rcv_desc()
136 rcv_desc->buf_size = buf_size; in qla_set_hw_rcv_desc()
137 rcv_desc->buf_addr = paddr; in qla_set_hw_rcv_desc()
147 for (i = 0; i < ha->hw.num_rds_rings; i++) in qla_init_hw_rcv_descriptors()
148 bzero((void *)ha->hw.dma_buf.rds_ring[i].dma_b, in qla_init_hw_rcv_descriptors()
162 int ret = -1; in qla_lock()
165 mtx_lock(&ha->hw_lock); in qla_lock()
167 if (ha->qla_detach_active || ha->offline) { in qla_lock()
168 mtx_unlock(&ha->hw_lock); in qla_lock()
172 if (!ha->hw_lock_held) { in qla_lock()
173 ha->hw_lock_held = 1; in qla_lock()
174 ha->qla_lock = str; in qla_lock()
176 mtx_unlock(&ha->hw_lock); in qla_lock()
179 mtx_unlock(&ha->hw_lock); in qla_lock()
181 if (--timeout_ms == 0) { in qla_lock()
182 ha->hw_lock_failed++; in qla_lock()
192 // if (!ha->enable_error_recovery) in qla_lock()
193 // device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, in qla_lock()
202 mtx_lock(&ha->hw_lock); in qla_unlock()
203 ha->hw_lock_held = 0; in qla_unlock()
204 ha->qla_unlock = str; in qla_unlock()
205 mtx_unlock(&ha->hw_lock); in qla_unlock()
207 // if (!ha->enable_error_recovery) in qla_unlock()
208 // device_printf(ha->pci_dev, "%s: %s\n", __func__, str); in qla_unlock()