Call for testers: owners of ixgb(4) hardware
Maxime Henrion
mux at FreeBSD.org
Fri Mar 11 18:22:25 PST 2005
Hi all,
I've came accross a bad mistake in the ixgb(4) driver that will prevent
it from working on architectures where the DMA address is not the
physical address. This is too bad since the code already uses busdma
(nearly) correctly but does a vtophys() when it already has the right
address to use... Anyways, if people around here have ixgb(4) hardware,
I'd be glad if they could test this patch and tell me if it's still
working correctly. In the even more unlikely case where someone can
also test his card on sparc64 hardware, that would be great.
Thanks,
Maxime
-------------- next part --------------
Index: if_ixgb.c
===================================================================
RCS file: /space2/ncvs/src/sys/dev/ixgb/if_ixgb.c,v
retrieving revision 1.5
diff -u -p -r1.5 if_ixgb.c
--- if_ixgb.c 5 Mar 2005 18:17:35 -0000 1.5
+++ if_ixgb.c 12 Mar 2005 02:10:12 -0000
@@ -1315,7 +1315,6 @@ ixgb_setup_interface(device_t dev, struc
ifp->if_name = "ixgb";
#endif
ifp->if_mtu = ETHERMTU;
- ifp->if_output = ether_output;
ifp->if_baudrate = 1000000000;
ifp->if_init = ixgb_init;
ifp->if_softc = adapter;
@@ -1523,7 +1522,7 @@ static void
ixgb_initialize_transmit_unit(struct adapter * adapter)
{
u_int32_t reg_tctl;
- u_int64_t tdba = vtophys((vm_offset_t) adapter->tx_desc_base);
+ u_int64_t tdba = adapter->txdma.dma_paddr;
/* Setup the Base and Length of the Tx Descriptor Ring */
IXGB_WRITE_REG(&adapter->hw, TDBAL,
@@ -1901,7 +1900,7 @@ ixgb_initialize_receive_unit(struct adap
u_int32_t reg_rxcsum;
u_int32_t reg_rxdctl;
struct ifnet *ifp;
- u_int64_t rdba = vtophys((vm_offset_t) adapter->rx_desc_base);
+ u_int64_t rdba = adapter->rxdma.dma_paddr;
ifp = &adapter->interface_data.ac_if;
Index: if_ixgb.h
===================================================================
RCS file: /space2/ncvs/src/sys/dev/ixgb/if_ixgb.h,v
retrieving revision 1.3
diff -u -p -r1.3 if_ixgb.h
--- if_ixgb.h 6 Jan 2005 01:42:53 -0000 1.3
+++ if_ixgb.h 12 Mar 2005 02:10:07 -0000
@@ -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
Index: if_ixgb_osdep.h
===================================================================
RCS file: /space2/ncvs/src/sys/dev/ixgb/if_ixgb_osdep.h,v
retrieving revision 1.2
diff -u -p -r1.2 if_ixgb_osdep.h
--- if_ixgb_osdep.h 6 Jan 2005 01:42:53 -0000 1.2
+++ if_ixgb_osdep.h 12 Mar 2005 02:10:25 -0000
@@ -48,8 +48,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>
More information about the freebsd-current
mailing list