summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgb/if_ixgb.h
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2005-03-27 16:38:08 +0000
committermux <mux@FreeBSD.org>2005-03-27 16:38:08 +0000
commitc8f1495d8b06d33c7dbce0e2fb19365a7334c6ea (patch)
tree72b9aee9e6a612471d606cf8dbc332ba2574390d /sys/dev/ixgb/if_ixgb.h
parenteb0b07ecf6707c82c03e2d91ca054402fd2462b2 (diff)
downloadFreeBSD-src-c8f1495d8b06d33c7dbce0e2fb19365a7334c6ea.zip
FreeBSD-src-c8f1495d8b06d33c7dbce0e2fb19365a7334c6ea.tar.gz
Fix a bunch of bugs I came accross when looking at the ixgb(4) driver,
some of which are rather serious: - Use the device sysctl tree instead of rolling our own. - Don't create a bus_dmamap_t to pass to bus_dmamem_alloc(), it is bus_dmamem_alloc() that creates it itself. The DMA map created by the driver was overwritten and its memory was leaked. - Fix resource handling bugs in the error path of ixgb_dma_alloc(). - Don't use vtophys() to get the base address of the TX and RX rings when busdma already gave us the correct address to use! - Remove now useless includes and the alpha_XXX_dmamap() hack. - Don't initialize if_output to ether_output(), ether_ifattach() does it for us already. - Add proper module dependencies on ether and pci. Unfortunately, I'm not lucky enough to own an ixgb(4) card, nor a machine with a bus where to plug it in and I couldn't find anyone able to test these patches, so they are only build-tested and I won't MFC them for 5.4-RELEASE.
Diffstat (limited to 'sys/dev/ixgb/if_ixgb.h')
-rw-r--r--sys/dev/ixgb/if_ixgb.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/dev/ixgb/if_ixgb.h b/sys/dev/ixgb/if_ixgb.h
index f0be006..2ea7dae 100644
--- a/sys/dev/ixgb/if_ixgb.h
+++ b/sys/dev/ixgb/if_ixgb.h
@@ -66,8 +66,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
-#include <vm/vm.h>
-#include <vm/pmap.h>
#include <machine/clock.h>
#if __FreeBSD_version >= 502000
#include <dev/pci/pcivar.h>
@@ -228,11 +226,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define IXGB_MAX_SCATTER 100
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)(va))
-#endif /* __alpha__ */
-
/*
* ******************************************************************************
* vendor_info_array
OpenPOWER on IntegriCloud