Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
Show First 20 Lines • Show All 545 Lines • ▼ Show 20 Lines | send_iscsi_flowc_wr(struct adapter *sc, struct toepcb *toep, int maxlen) | ||||
struct wrqe *wr; | struct wrqe *wr; | ||||
struct fw_flowc_wr *flowc; | struct fw_flowc_wr *flowc; | ||||
const u_int nparams = 1; | const u_int nparams = 1; | ||||
u_int flowclen; | u_int flowclen; | ||||
struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; | struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; | ||||
flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); | flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); | ||||
wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); | wr = alloc_wrqe(roundup2(flowclen, 16), &toep->ofld_txq->wrq); | ||||
if (wr == NULL) { | if (wr == NULL) { | ||||
/* XXX */ | /* XXX */ | ||||
panic("%s: allocation failure.", __func__); | panic("%s: allocation failure.", __func__); | ||||
} | } | ||||
flowc = wrtod(wr); | flowc = wrtod(wr); | ||||
memset(flowc, 0, wr->wr_len); | memset(flowc, 0, wr->wr_len); | ||||
flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | | flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | | ||||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | no_ddp: | ||||
MPASS((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR); | MPASS((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR); | ||||
rc = t4_alloc_page_pods_for_buf(pr, (vm_offset_t)csio->data_ptr, | rc = t4_alloc_page_pods_for_buf(pr, (vm_offset_t)csio->data_ptr, | ||||
csio->dxfer_len, prsv); | csio->dxfer_len, prsv); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
uma_zfree(prsv_zone, prsv); | uma_zfree(prsv_zone, prsv); | ||||
goto no_ddp; | goto no_ddp; | ||||
} | } | ||||
rc = t4_write_page_pods_for_buf(sc, toep->ofld_txq, toep->tid, prsv, | rc = t4_write_page_pods_for_buf(sc, &toep->ofld_txq->wrq, toep->tid, | ||||
(vm_offset_t)csio->data_ptr, csio->dxfer_len); | prsv, (vm_offset_t)csio->data_ptr, csio->dxfer_len); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
t4_free_page_pods(prsv); | t4_free_page_pods(prsv); | ||||
uma_zfree(prsv_zone, prsv); | uma_zfree(prsv_zone, prsv); | ||||
goto no_ddp; | goto no_ddp; | ||||
} | } | ||||
*ittp = htobe32(prsv->prsv_tag); | *ittp = htobe32(prsv->prsv_tag); | ||||
*arg = prsv; | *arg = prsv; | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | no_ddp: | ||||
} | } | ||||
rc = t4_alloc_page_pods_for_buf(pr, buf, xferlen, prsv); | rc = t4_alloc_page_pods_for_buf(pr, buf, xferlen, prsv); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
uma_zfree(prsv_zone, prsv); | uma_zfree(prsv_zone, prsv); | ||||
goto no_ddp; | goto no_ddp; | ||||
} | } | ||||
rc = t4_write_page_pods_for_buf(sc, toep->ofld_txq, toep->tid, | rc = t4_write_page_pods_for_buf(sc, &toep->ofld_txq->wrq, | ||||
prsv, buf, xferlen); | toep->tid, prsv, buf, xferlen); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
t4_free_page_pods(prsv); | t4_free_page_pods(prsv); | ||||
uma_zfree(prsv_zone, prsv); | uma_zfree(prsv_zone, prsv); | ||||
goto no_ddp; | goto no_ddp; | ||||
} | } | ||||
*tttp = htobe32(prsv->prsv_tag); | *tttp = htobe32(prsv->prsv_tag); | ||||
io_to_ppod_reservation(io) = prsv; | io_to_ppod_reservation(io) = prsv; | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |