MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ccp_hw_detach_queue

Function ccp_hw_detach_queue

freebsd/crypto/ccp/ccp_hardware.c:317–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317static void
318ccp_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
339static int
340ccp_map_pci_bar(device_t dev)

Callers 2

ccp_hw_attachFunction · 0.85
ccp_hw_detachFunction · 0.85

Calls 5

device_get_softcFunction · 0.85
freeFunction · 0.50
bus_dmamap_unloadFunction · 0.50
bus_dmamem_freeFunction · 0.50
bus_dma_tag_destroyFunction · 0.50

Tested by

no test coverage detected