From owner-freebsd-net Thu Mar 18 12:11:58 1999 Delivered-To: freebsd-net@freebsd.org Received: from xylan.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id A553414E2D; Thu, 18 Mar 1999 12:11:44 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com by xylan.com (8.8.7/SMI-SVR4 (xylan-mgw 2.2 [OUT])) id MAA29050; Thu, 18 Mar 1999 12:11:24 -0800 (PST) Received: from utah.XYLAN.COM by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id MAA14950; Thu, 18 Mar 1999 12:11:24 -0800 Received: from softweyr.com by utah.XYLAN.COM (SMI-8.6/SMI-SVR4 (xylan utah [SPOOL])) id NAA11281; Thu, 18 Mar 1999 13:11:17 -0700 Message-ID: <36F15DDB.2996A3C8@softweyr.com> Date: Thu, 18 Mar 1999 13:11:07 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-stable@freebsd.org, freebsd-net@freebsd.org Subject: [Fwd: fxp driver causing lockup] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear -STABLE and -NET friends, I and several other users have been having problems with the fxp0 driver under FreeBSD 3.x. Mike Spengler provided me with a code snippet that fixes the problem; the PCI bus code was no longer enabling bus mastering so the driver had to do it. Here is a patch that fixes the problem for my Toshiba Equuium 7000S with on-board EEPro 100+. Please, if any of you have 3.x with an EEPro 100, test this patch even if you don't have the problem and get back to me with your results. Many thanks. Here's the diff vs. 3.1-RELEASE: *** if_fxp.c.orig Wed Mar 17 17:06:51 1999 --- if_fxp.c Wed Mar 17 17:23:09 1999 *************** *** 98,103 **** --- 98,104 ---- #include /* for DELAY */ #include + #include /* for PCIM_CMD_xxx */ #include #include *************** *** 523,528 **** --- 524,530 ---- vm_offset_t pbase; struct ifnet *ifp; int s; + u_long val; sc = malloc(sizeof(struct fxp_softc), M_DEVBUF, M_NOWAIT); if (sc == NULL) *************** *** 531,536 **** --- 533,545 ---- callout_handle_init(&sc->stat_ch); s = splimp(); + + /* + * Enable bus mastering. + */ + val = pci_conf_read(config_id, PCI_COMMAND_STATUS_REG); + val |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); + pci_conf_write(config_id, PCI_COMMAND_STATUS_REG, val); /* * Map control/status registers. Thanks in advance for any testing you can provide. -- Where am I, and what am I doing in this handbasket? Wes Peters +1.801.915.2061 Softweyr LLC wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message