| 134 | } |
| 135 | |
| 136 | static void |
| 137 | ccp_initialize_queues(struct ccp_softc *sc) |
| 138 | { |
| 139 | struct ccp_queue *qp; |
| 140 | size_t i; |
| 141 | |
| 142 | for (i = 0; i < nitems(sc->queues); i++) { |
| 143 | qp = &sc->queues[i]; |
| 144 | |
| 145 | qp->cq_softc = sc; |
| 146 | qp->cq_qindex = i; |
| 147 | mtx_init(&qp->cq_lock, "ccp queue", NULL, MTX_DEF); |
| 148 | /* XXX - arbitrarily chosen sizes */ |
| 149 | qp->cq_sg_crp = sglist_alloc(32, M_WAITOK); |
| 150 | /* Two more SGEs than sg_crp to accommodate ipad. */ |
| 151 | qp->cq_sg_ulptx = sglist_alloc(34, M_WAITOK); |
| 152 | qp->cq_sg_dst = sglist_alloc(2, M_WAITOK); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | static void |
| 157 | ccp_free_queues(struct ccp_softc *sc) |
no test coverage detected