Broadcomm BCM4401-B0 and memory upgrade issue.

Bill Paul wpaul at FreeBSD.ORG
Tue Jan 24 12:54:30 PST 2006



> Hello,

> After the memory upgrade on my Laptop (HP nx5000) FreeBSD 6.0 stable, the
> driver for NIC bfe0 (Broadcom BCM4401-B0) stops working. The NIC LED lights
> are on. The bfe0 interface is up and active. However, I got a permanent
> message on the console:

> bfe0: watching timeout -- resetting.

[...]

> The problem occur only if the upgraded memory (RAM) exceeds 1GB. It does not
> depend on the manufacturer of the memory chips and the number of occupied
> slots. I already tried 2 1GB modules from Infineon DDR400 CL3 and two
> modules from Crucial DDR333, CL2.5. It also does not depend on ACPI.

> What should be my next steps, in order to get NIC working?

This problem has a familiar ring to it. Unfortunately, I don't own any
machines that have this chipset built in, and they don't make any standalone
cards that have it so I can't buy one. This means I can't test it myself.
However, you can try the following:

- Bring up /sys/dev/bfe/if_bfe.c in your favorite editor.
- Find the bfe_dma_alloc() routine, and you should see code that looks
  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 */
                        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).

> Can I try NDIS for this NIC?

The NDISulator is known to work with this chip. But try the fix above
first.

-Bill

--
=============================================================================
-Bill Paul            (510) 749-2329 | Senior Engineer, Master of Unix-Fu
                 wpaul at windriver.com | Wind River Systems
=============================================================================
              <adamw> you're just BEGGING to face the moose
=============================================================================


More information about the freebsd-stable mailing list