Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 1999 17:57:23 -0800
From:      "Carlos C. Tapang" <ctapang@easystreet.com>
To:        <freebsd-gnats-submit@FreeBSD.ORG>
Cc:        <freebsd-current@FreeBSD.ORG>
Subject:   Fix for PR #i386/8567
Message-ID:  <004801be3785$92b11750$0d787880@apex.tapang>

next in thread | raw e-mail | index | archive | help
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 <sys/param.h>
  #include <sys/systm.h>
+ #include <sys/kernel.h>
  #include <sys/conf.h>
+ #include <sys/errno.h>
  #include <sys/sockio.h>
  #include <sys/mbuf.h>
  #include <sys/socket.h>
+ #include <sys/syslog.h>

  #include <net/if.h>
+ #include <net/if_dl.h>
+ #include <net/if_types.h>

  #ifdef INET
  #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/in_var.h>
+ #include <netinet/ip.h>
  #include <netinet/if_ether.h>
  #endif

***************
*** 67,72 ****
--- 73,79 ----

  #if NBPFILTER > 0
  #include <net/bpf.h>
+ #include <net/bpfdesc.h>
  #endif

  #include <machine/clock.h>
***************
*** 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004801be3785$92b11750$0d787880>