John Baldwin 068d8643ad Fix various NIC drivers to properly cleanup static DMA resources.
In particular, don't check the value of the bus_dma map against NULL
to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded.
Instead, assume that bus_dmamap_load() succeeeded (and thus that
bus_dmamap_unload() should be called) if the bus address for a resource
is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus
that bus_dmamem_free() should be called) if the virtual address for a
resource is not NULL.

In many cases these bugs could result in leaks when a driver was detached.

Reviewed by:	yongari
MFC after:	2 weeks
2014-06-11 14:53:58 +00:00
..
2014-03-08 06:06:50 +00:00
2014-02-09 20:55:49 +00:00
2014-02-09 20:56:39 +00:00
2014-02-09 20:58:03 +00:00
2014-02-28 03:00:25 +00:00
2014-02-28 03:00:28 +00:00
2014-02-09 21:01:53 +00:00
2014-03-08 06:06:50 +00:00
2014-03-08 05:03:56 +00:00
2014-02-13 15:47:41 +00:00
2014-06-06 16:37:42 +00:00
2014-02-09 21:02:46 +00:00