| 315 | } |
| 316 | |
| 317 | static void |
| 318 | ccp_hw_detach_queue(device_t dev, unsigned queue) |
| 319 | { |
| 320 | struct ccp_softc *sc; |
| 321 | struct ccp_queue *qp; |
| 322 | |
| 323 | sc = device_get_softc(dev); |
| 324 | qp = &sc->queues[queue]; |
| 325 | |
| 326 | /* |
| 327 | * Don't bother allocating a ring for queues the host isn't allowed to |
| 328 | * drive. |
| 329 | */ |
| 330 | if ((sc->valid_queues & (1 << queue)) == 0) |
| 331 | return; |
| 332 | |
| 333 | free(qp->completions_ring, M_CCP); |
| 334 | bus_dmamap_unload(qp->ring_desc_tag, qp->ring_desc_map); |
| 335 | bus_dmamem_free(qp->ring_desc_tag, qp->desc_ring, qp->ring_desc_map); |
| 336 | bus_dma_tag_destroy(qp->ring_desc_tag); |
| 337 | } |
| 338 | |
| 339 | static int |
| 340 | ccp_map_pci_bar(device_t dev) |
no test coverage detected