Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 1998 12:56:42 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        hackers@FreeBSD.ORG
Subject:   RealTek + memory mapped registers + SMP == ?*%^(#!!
Message-ID:  <199809251656.MAA03274@skynet.ctr.columbia.edu>

next in thread | raw e-mail | index | archive | help
Uhm... this is a question for those with more hardware clues than I.
Originally I set up the RealTek driver to use PCI memory mapped mode to
access the chip registers. This worked fine on the development machine
I used, which is a single processor Dell Optiplex GX1 (PII, 400Mhz).

SMP machines don't seem to like it though. I also have a Dell PowerEdge
2300/400 machine (dual PII 400Mhz, 256MB RAM) and on this machine, the
driver causes the system to lock up when doing certain register access
operations. It looks like the problem is performing multiple register
accesses in rapid succession. For example, the first place it locks up
is when attempting to load the MAC address: there's a small for(;;)
loop like this:

        /* Init our MAC address */
        for (i = 0; i < ETHER_ADDR_LEN; i++) {
                CSR_WRITE_1(sc, RL_IDR0 + i, sc->arpcom.ac_enaddr[i]);
        }

The machine grinds to a halt at this point. The same thing happens
with a uniprocessor kernel on the same hardware. If I switch to using 
programmed I/O mode, everything works fine. (I updated the driver at 
www.freebsd.org/~wpaul so that PIO mode is now the default.)

Can anyone think of a reason why this would happen? The machine also
has two Intel EtherExpress Pro 100B adapters, and the fxp driver, which
also uses memory mapped access, works fine. I suspect that there's
just something bogus about the RealTek chip that's causing it, but I
don't know what.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809251656.MAA03274>