From owner-freebsd-current@FreeBSD.ORG Sat Mar 12 02:22:25 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7016F16A4CF for ; Sat, 12 Mar 2005 02:22:25 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CAF243D1D for ; Sat, 12 Mar 2005 02:22:25 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 0D90A5C9EE; Fri, 11 Mar 2005 18:22:25 -0800 (PST) Date: Sat, 12 Mar 2005 03:22:25 +0100 From: Maxime Henrion To: current@FreeBSD.org Message-ID: <20050312022225.GI31320@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="X+nYw8KZ/oNxZ8JS" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Call for testers: owners of ixgb(4) hardware X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2005 02:22:25 -0000 --X+nYw8KZ/oNxZ8JS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --X+nYw8KZ/oNxZ8JS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ixgb.patch" 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 #include #include -#include -#include #include #if __FreeBSD_version >= 502000 #include @@ -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 #include #include -#include -#include #include #if __FreeBSD_version >= 502000 #include --X+nYw8KZ/oNxZ8JS--