From owner-freebsd-current Sun Jan 3 16:59:25 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA02953 for freebsd-current-outgoing; Sun, 3 Jan 1999 16:59:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mail4.aracnet.com (mail4.aracnet.com [205.159.88.46]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA02946; Sun, 3 Jan 1999 16:59:24 -0800 (PST) (envelope-from ctapang@easystreet.com) Received: from apex (216-99-199-226.cust.aracnet.com [216.99.199.226]) by mail4.aracnet.com (8.9.1/8.9.0) with SMTP id QAA04416; Sun, 3 Jan 1999 16:59:01 -0800 Message-ID: <004801be3785$92b11750$0d787880@apex.tapang> From: "Carlos C. Tapang" To: Cc: Subject: Fix for PR #i386/8567 Date: Sun, 3 Jan 1999 17:57:23 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A couple of months ago I submitted a fix for the Intel Pro/10+ driver. I just noticed that the fix has not been committed yet. I cvsupped 1.13 of this driver, and here is the diff between that and my version of the driver. This version will correctly distinguish between Pro/10 and Pro/10+. If you have a Pro/10, please let me know if it worked for you. Carlos C. Tapang http://www.genericwindows.com ps. There are 2 diffs. One for if_ex.c and another for if_exreg.h --------------------------------------- Index: if_ex.c =================================================================== RCS file: /usr/CVSROOT/src/sys/i386/isa/if_ex.c,v retrieving revision 1.13 diff -c -r1.13 if_ex.c *** if_ex.c 1998/10/22 05:58:39 1.13 --- if_ex.c 1999/01/03 15:36:57 *************** *** 23,30 **** * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: if_ex.c,v 1.13 1998/10/22 05:58:39 bde Exp $ */ /* --- 23,28 ---- *************** *** 43,57 **** --- 41,63 ---- #include #include + #include #include + #include #include #include #include + #include #include + #include + #include #ifdef INET #include + #include + #include + #include #include #endif *************** *** 67,72 **** --- 73,79 ---- #if NBPFILTER > 0 #include + #include #endif #include *************** *** 93,98 **** --- 100,106 ---- struct ex_softc { struct arpcom arpcom; /* Ethernet common data */ u_int iobase; /* I/O base address. */ + u_short chip_stepping; /* either TX or FX (FX is used in Pro/10+) */ u_short connector; /* Connector type. */ u_short irq_no; /* IRQ number. */ char *irq2ee; /* irq <-> internal representation conversion */ *************** *** 187,192 **** --- 195,204 ---- outb(iobase + CMD_REG, Reset_CMD); DELAY(400); + outb(iobase + CMD_REG, Bank2_Sel); + tmp = inb(iobase + EEPROM_REG); + sc->chip_stepping = (tmp & i82595_Stepping) >> 5; + /* * Fill in several fields of the softc structure: * - I/O base address. *************** *** 207,215 **** tmp = eeprom_read(iobase, EE_IRQ_No) & IRQ_No_Mask; /* work out which set of irq <-> internal tables to use */ ! if (sc->arpcom.ac_enaddr[0] == 0x00 && ! sc->arpcom.ac_enaddr[1] == 0xA0 && ! sc->arpcom.ac_enaddr[2] == 0xC9) { /* it's a 10+ */ sc->irq2ee = plus_irq2eemap; sc->ee2irq = plus_ee2irqmap; } else { /* it's an ordinary 10 */ --- 219,225 ---- tmp = eeprom_read(iobase, EE_IRQ_No) & IRQ_No_Mask; /* work out which set of irq <-> internal tables to use */ ! if (sc->chip_stepping >= FX_Stepping) { /* it's a Pro/10 Plus */ sc->irq2ee = plus_irq2eemap; sc->ee2irq = plus_ee2irqmap; } else { /* it's an ordinary 10 */ *************** *** 277,288 **** if_attach(ifp); ether_ifattach(ifp); ! if (sc->arpcom.ac_enaddr[0] == 0x00 && ! sc->arpcom.ac_enaddr[1] == 0xA0 && ! sc->arpcom.ac_enaddr[2] == 0xC9) { ! printf("ex%d: Intel EtherExpress Pro/10+, address %6D, connector ", dev->id_unit, sc->arpcom.ac_enaddr, ":"); } else { ! printf("ex%d: Intel EtherExpress Pro/10, address %6D, connector ", dev->id_unit, sc->arpcom.ac_enaddr, ":"); } switch(sc->connector) { case Conn_TPE: printf("TPE\n"); break; --- 287,296 ---- if_attach(ifp); ether_ifattach(ifp); ! if (sc->chip_stepping >= FX_Stepping) { ! printf("ex%d: Intel EtherExpr Pro/10+, address %6D, step %d, connector ", dev->id_unit, sc->arpcom.ac_enaddr, ":", sc->chip_stepping); } else { ! printf("ex%d: Intel EtherExpress Pro/10, address %6D, step %d, connector ", dev->id_unit, sc->arpcom.ac_enaddr, ":", sc->chip_stepping); } switch(sc->connector) { case Conn_TPE: printf("TPE\n"); break; Index: if_exreg.h =================================================================== RCS file: /usr/CVSROOT/src/sys/i386/isa/if_exreg.h,v retrieving revision 1.1 diff -c -r1.1 if_exreg.h *** if_exreg.h 1997/01/16 12:19:21 1.1 --- if_exreg.h 1999/01/03 02:12:43 *************** *** 121,126 **** --- 121,128 ---- #define I_ADDR_REG0 4 #define EEPROM_REG 10 #define Trnoff_Enable 0x10 + #define i82595_Stepping 0xE0 + #define FX_Stepping 4 /* EEPROM memory positions (16-bit wide). */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message