Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/pci Pull up revision 1.80 (requested by rpaulo in...



details:   https://anonhg.NetBSD.org/src/rev/dd6fece15747
branches:  netbsd-3
changeset: 576346:dd6fece15747
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Jul 01 12:28:20 2005 +0000

description:
Pull up revision 1.80 (requested by rpaulo in ticket #493):
Add support for ASIX AX88140A/AX88141 chipsets using only
the 10/100 MII with inspiration from FreeBSD dc(4) driver.
Tested on i386 and macppc.
Reviewed by Jason Thorpe and ok'ed by Hubert Feyrer.

diffstat:

 sys/dev/pci/if_tlp_pci.c |  23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (60 lines):

diff -r 1acfa64721c0 -r dd6fece15747 sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c  Fri Jul 01 12:28:14 2005 +0000
+++ b/sys/dev/pci/if_tlp_pci.c  Fri Jul 01 12:28:20 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_pci.c,v 1.78.2.1 2005/06/18 05:56:59 riz Exp $  */
+/*     $NetBSD: if_tlp_pci.c,v 1.78.2.2 2005/07/01 12:28:20 tron Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.78.2.1 2005/06/18 05:56:59 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.78.2.2 2005/07/01 12:28:20 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -169,10 +169,8 @@
        { PCI_VENDOR_3COM,              PCI_PRODUCT_3COM_3C910SOHOB,
          TULIP_CHIP_AN985 },
 
-#if 0
        { PCI_VENDOR_ASIX,              PCI_PRODUCT_ASIX_AX88140A,
          TULIP_CHIP_AX88140 },
-#endif
 
        { 0,                            0,
          TULIP_CHIP_INVALID },
@@ -486,6 +484,8 @@
        case TULIP_CHIP_MX98725:
        case TULIP_CHIP_DM9102:
        case TULIP_CHIP_DM9102A:
+       case TULIP_CHIP_AX88140:
+       case TULIP_CHIP_AX88141:
                /*
                 * Clear the "sleep mode" bit in the CFDA register.
                 */
@@ -930,6 +930,21 @@
                sc->sc_mediasw = &tlp_dm9102_mediasw;
                break;
 
+       case TULIP_CHIP_AX88140:
+       case TULIP_CHIP_AX88141:
+               /*
+                * ASIX AX88140/AX88141 Ethernet Address is located at offset
+                * 20 of the SROM.
+                */
+               memcpy(enaddr, &sc->sc_srom[20], ETHER_ADDR_LEN);
+
+               /*
+                * ASIX AX88140A/AX88141 chip can have a built-in PHY or
+                * an external MII interface.
+                */
+               sc->sc_mediasw = &tlp_asix_mediasw;
+               break;
+
        default:
  cant_cope:
                printf("%s: sorry, unable to handle your board\n",



Home | Main Index | Thread Index | Old Index