From owner-freebsd-stable@FreeBSD.ORG Sun Jan 29 23:01:21 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B163416A420; Sun, 29 Jan 2006 23:01:21 +0000 (GMT) (envelope-from mbsd@pacbell.net) Received: from ylpvm12.prodigy.net (ylpvm12-ext.prodigy.net [207.115.57.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45D3E43D45; Sun, 29 Jan 2006 23:01:21 +0000 (GMT) (envelope-from mbsd@pacbell.net) Received: from pimout5-ext.prodigy.net (pimout5-int.prodigy.net [207.115.4.21]) by ylpvm12.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id k0TN1HeY015066; Sun, 29 Jan 2006 18:01:17 -0500 X-ORBL: [71.139.51.5] Received: from spirou.home (ppp-71-139-51-5.dsl.snfc21.pacbell.net [71.139.51.5]) by pimout5-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id k0TN1Ipe011104; Sun, 29 Jan 2006 18:01:19 -0500 Date: Sun, 29 Jan 2006 15:01:19 -0800 (PST) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= X-X-Sender: mikko@spirou.home To: lyubich_freebsd In-Reply-To: <20060129221813.3F71043D75@mx1.FreeBSD.org> Message-ID: <20060129145021.P834@spirou.home> References: <20060129221813.3F71043D75@mx1.FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: 'Bill Paul' , freebsd-stable@FreeBSD.ORG Subject: RE: Broadcomm BCM4401-B0 and memory upgrade issue. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2006 23:01:21 -0000 Hi, The chip is indeed unable to do DMA > 1G, as seen in the linux driver from Broadcom: [...] v3.0.11 (Aug 03, 2005) ====================== Fixes: ------------- 1. Problem: (CQ #13593) 4401 hangs when dealing with memory addresses above 1G. Cause : Hardware DMA limitation. Change : Modify the code to ensure memory addresses are below the 1G ceiling. Impact : None. [...] See , under BCM4401 drivers. $.02, /Mikko On Sun, 29 Jan 2006, lyubich_freebsd wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I applied the suggested changes. > I got the following message when I load the if_bfe driver. > > vm_page_alloc_config: alignment must be a power of 2 > > After that the kernel panics and system reboots. > > I think, if I can specified the allignment correctly, it should work. > Tell me, how to do this, and I will try it again. > > Regards, > LM > >> >> static int >> bfe_dma_alloc(device_t dev) >> { >> struct bfe_softc *sc; >> int error, i; >> >> sc = device_get_softc(dev); >> >> /* parent tag */ >> error = bus_dma_tag_create(NULL, /* parent */ >> PAGE_SIZE, 0, /* >> alignment, boundary */ >> BUS_SPACE_MAXADDR, /* lowaddr */ >> BUS_SPACE_MAXADDR_32BIT, /* highaddr */ >> NULL, NULL, /* filter, >> filterarg */ >> MAXBSIZE, /* maxsize */ >> BUS_SPACE_UNRESTRICTED, /* num of >> segments */ >> BUS_SPACE_MAXSIZE_32BIT, /* max >> segment size */ >> BUS_DMA_ALLOCNOW, /* flags */ >> NULL, NULL, /* >> lockfunc, lockarg */ >> &sc->bfe_parent_tag); >> >> - Change it to look like this: >> >> static int >> bfe_dma_alloc(device_t dev) >> { >> struct bfe_softc *sc; >> int error, i; >> >> sc = device_get_softc(dev); >> >> /* parent tag */ >> error = bus_dma_tag_create(NULL, /* parent */ >> PAGE_SIZE, 0, /* >> alignment, boundary */ >> /* change this -> */ 0x3E7FFFFF /*BUS_SPACE_MAXADDR*/, >> /* lowaddr */ >> BUS_SPACE_MAXADDR_32BIT, /* highaddr */ >> NULL, NULL, /* filter, >> filterarg */ >> MAXBSIZE, /* maxsize */ >> BUS_SPACE_UNRESTRICTED, /* num of >> segments */ >> BUS_SPACE_MAXSIZE_32BIT, /* max >> segment size */ >> BUS_DMA_ALLOCNOW, /* flags */ >> NULL, NULL, /* >> lockfunc, lockarg */ >> &sc->bfe_parent_tag); >> >> - Save if_bfe.c >> - Recompile if_bfe.ko and/or your kernel, test it, and report >> back what >> happens. >> >> Wait, let me say that last part again: REPORT BACK WHAT >> HAPPENS! I hate it when I send people things to test and they >> vanish into a black hole, never to be heard from again. >> >> I suspect this chipset has a DMA limitation that prevents it >> from performing DMA to/from any addresses outside the first >> 1GB of RAM. >> Curiously, I ran into this with a Linksys wireless NIC with >> the NDISulator, which is based on a Broadcom chipset too >> (802.11b only). >> > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (MingW32) > > iD8DBQFD3T87KOV0oHioLCARAvxGAKCn4FieqHpPBD7+6vOm+taaLjfZlgCgk2WR > 5H7hLglq++SV8eaiujVL6cE= > =L2Ut > -----END PGP SIGNATURE----- > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >