- Propagate error code from various bus_dma functions in bfe_dma_alloc.
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 10 Aug 2005 13:31:03 +0000 (13:31 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 10 Aug 2005 13:31:03 +0000 (13:31 +0000)
commit250ace3da2c3961d7ca1c9886cafa3ac35beb28e
treeec8cbd7f5a34347bb2527e681770ee5e1ea98faa
parentcb633bb481be980802db9017ba9d158fa740c8d1
- 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