Lines Matching defs:sglq
807 * __lpfc_clear_active_sglq - Remove the active sglq for this XRI.
811 * This function clears the sglq pointer from the array of acive
812 * sglq's. The xritag that is passed in is used to index into the
816 * Returns sglq ponter = success, NULL = Failure.
821 struct lpfc_sglq *sglq;
823 sglq = phba->sli4_hba.lpfc_sglq_active_list[xritag];
825 return sglq;
829 * __lpfc_get_active_sglq - Get the active sglq for this XRI.
833 * This function returns the sglq pointer from the array of acive
834 * sglq's. The xritag that is passed in is used to index into the
838 * Returns sglq ponter = success, NULL = Failure.
843 struct lpfc_sglq *sglq;
845 sglq = phba->sli4_hba.lpfc_sglq_active_list[xritag];
846 return sglq;
1123 * gets a new driver sglq object from the sglq list. If the list is not empty
1124 * then it is successful, it returns pointer to the newly allocated sglq
1131 struct lpfc_sglq *sglq = NULL;
1161 list_remove_head(lpfc_els_sgl_list, sglq, struct lpfc_sglq, list);
1162 start_sglq = sglq;
1164 if (!sglq)
1167 test_bit(sglq->sli4_lxritag,
1172 list_add_tail(&sglq->list, lpfc_els_sgl_list);
1173 sglq = NULL;
1174 list_remove_head(lpfc_els_sgl_list, sglq,
1176 if (sglq == start_sglq) {
1177 list_add_tail(&sglq->list, lpfc_els_sgl_list);
1178 sglq = NULL;
1183 sglq->ndlp = ndlp;
1185 phba->sli4_hba.lpfc_sglq_active_list[sglq->sli4_lxritag] = sglq;
1186 sglq->state = SGL_ALLOCATED;
1189 return sglq;
1198 * gets a new driver sglq object from the sglq list. If the
1200 * allocated sglq object else it returns NULL.
1206 struct lpfc_sglq *sglq = NULL;
1212 list_remove_head(lpfc_nvmet_sgl_list, sglq, struct lpfc_sglq, list);
1213 if (!sglq)
1215 phba->sli4_hba.lpfc_sglq_active_list[sglq->sli4_lxritag] = sglq;
1216 sglq->state = SGL_ALLOCATED;
1217 return sglq;
1252 * active array of sglq. The get of the sglq pointer also clears
1254 * this IO was aborted then the sglq entry it put on the
1256 * IO has good status or fails for any other reason then the sglq
1263 struct lpfc_sglq *sglq;
1269 sglq = NULL;
1271 sglq = __lpfc_clear_active_sglq(phba, iocbq->sli4_lxritag);
1274 if (sglq) {
1278 sglq->state = SGL_FREED;
1279 sglq->ndlp = NULL;
1280 list_add_tail(&sglq->list,
1289 (sglq->state != SGL_XRI_ABORTED)) {
1292 list_add(&sglq->list,
1299 sglq->state = SGL_FREED;
1300 sglq->ndlp = NULL;
1301 list_add_tail(&sglq->list,
9399 * @sglq: Pointer to the scatter gather queue object.
9414 struct lpfc_sglq *sglq)
9427 if (!piocbq || !sglq)
9430 sgl = (struct sli4_sge *)sglq->sgl;
9433 return sglq->sli4_xritag;
9500 return sglq->sli4_xritag;
10122 struct lpfc_sglq *sglq;
10147 sglq = NULL;
10158 sglq = __lpfc_sli_get_els_sglq(phba, piocb);
10159 if (!sglq) {
10172 sglq = NULL;
10176 * sglq is on the active list
10178 sglq = __lpfc_get_active_sglq(phba, piocb->sli4_lxritag);
10179 if (!sglq)
10183 if (sglq) {
10184 piocb->sli4_lxritag = sglq->sli4_lxritag;
10185 piocb->sli4_xritag = sglq->sli4_xritag;
10186 if (NO_XRI == lpfc_sli4_bpl2sgl(phba, piocb, sglq))
20024 struct lpfc_sglq *sglq;
20066 sglq = __lpfc_sli_get_els_sglq(phba, piocbq);
20067 if (!sglq) {
20077 piocbq->sli4_lxritag = sglq->sli4_lxritag;
20078 piocbq->sli4_xritag = sglq->sli4_xritag;
20079 if (NO_XRI == lpfc_sli4_bpl2sgl(phba, piocbq, sglq))
20112 * @sglq: Pointer to the scatter gather queue object.
20127 struct lpfc_sglq *sglq)
20141 if (!pwqeq || !sglq)
20144 sgl = (struct sli4_sge *)sglq->sgl;
20150 return sglq->sli4_xritag;
20230 return sglq->sli4_xritag;
20246 struct lpfc_sglq *sglq;
20256 sglq = __lpfc_sli_get_els_sglq(phba, pwqe);
20257 if (!sglq) {
20261 pwqe->sli4_lxritag = sglq->sli4_lxritag;
20262 pwqe->sli4_xritag = sglq->sli4_xritag;
20263 if (lpfc_wqe_bpl2sgl(phba, pwqe, sglq) == NO_XRI) {
20311 sglq = ctxp->ctxbuf->sglq;
20313 pwqe->sli4_lxritag = sglq->sli4_lxritag;
20314 pwqe->sli4_xritag = sglq->sli4_xritag;