- Propagate error code from various bus_dma functions in bfe_dma_alloc.
commit6458d25d3a659f8c9e42e21b8d06ed2bb7ba66a4
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 10 Aug 2005 13:31:03 +0000 (10 13:31 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 10 Aug 2005 13:31:03 +0000 (10 13:31 +0000)
tree8f2a08fe597aa8bcc1cbe7c83fd0d0c51c0d5eba
parenta56ea7c0f611cd4d7e432c21f55e71a147037c2c
- Propagate error code from various bus_dma functions in bfe_dma_alloc.
- Correctly destroy dmamaps for partially initialised descriptor rings
in bfe_dma_alloc, if one of the dmamap creations failed.
- Centralise error handling of bfe_attach in bfe_detach.
- Move call to bfe_chip_reset in bfe_detach into the device_is_attached
section.
- Move bus_teardown_intr() and bus_release_resource() from
bfe_release_resources to bfe_detach; rename the former to bfe_dma_free
to reflect remaining code.
- Call bus_dmamem_free only if the pointer is not NULL, set it to NULL
after it has been destroyed.
- Do not destroy dmamaps in bfe_stop, do it in bfe_detach.
- Correct DMA sync directions in bfe_list_newbuf.

Based-on: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
sys/dev/netif/bfe/if_bfe.c