From owner-freebsd-hackers Fri Sep 25 09:51:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA00320 for freebsd-hackers-outgoing; Fri, 25 Sep 1998 09:51:30 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id JAA00307 for ; Fri, 25 Sep 1998 09:51:26 -0700 (PDT) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id MAA03274 for hackers@freebsd.org; Fri, 25 Sep 1998 12:56:44 -0400 From: Bill Paul Message-Id: <199809251656.MAA03274@skynet.ctr.columbia.edu> Subject: RealTek + memory mapped registers + SMP == ?*%^(#!! To: hackers@FreeBSD.ORG Date: Fri, 25 Sep 1998 12:56:42 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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