diff --git a/share/man/man4/man4.i386/lnc.4 b/share/man/man4/man4.i386/lnc.4 index cc2390170869..99c491f0b19b 100644 --- a/share/man/man4/man4.i386/lnc.4 +++ b/share/man/man4/man4.i386/lnc.4 @@ -23,7 +23,7 @@ .\" (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: lnc.4,v 1.6 1998/11/06 09:46:02 obrien Exp $ +.\" $Id: lnc.4,v 1.7 1999/05/20 09:56:02 yokota Exp $ .\" .Dd January 19, 1997 .Dt LNC 4 i386 @@ -49,6 +49,7 @@ interface are: .It Digital DEPCA .It Hewlett Packard Vectra 486/66XM .It Hewlett Packard Vectra XU +.It Diamond HomeFree .El .Sh DIAGNOSTICS .Bl -diag @@ -113,5 +114,7 @@ The .Nm device driver was written by .An Paul Richards . +Support for the AMD PCHome phone-line based network added by +Robert Watson . This manual page was written by .An David E. O'Brien . diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 5fc823303ad8..d035311db6fe 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.c,v 1.60 1999/05/09 23:24:47 peter Exp $ + * $Id: if_lnc.c,v 1.61 1999/07/06 19:22:50 des Exp $ */ /* @@ -151,6 +151,7 @@ static char const * const ic_ident[] = { "PCnet-PCI II", "PCnet-FAST", "PCnet-FAST+", + "PCnet-Home", }; static void lnc_setladrf __P((struct lnc_softc *sc)); @@ -1192,6 +1193,8 @@ pcnet_probe(struct lnc_softc *sc) return (PCnet_FAST); case Am79C972: return (PCnet_FASTplus); + case Am79C978: + return (PCnet_Home); default: break; } @@ -1491,6 +1494,15 @@ lnc_init(struct lnc_softc *sc) /* Give the LANCE the physical address of the initialisation block */ + if (sc->nic.ic == PCnet_Home) { + u_short media; + /* Set PHY_SEL to HomeRun */ + media = read_bcr(sc, BCR49); + media &= ~3; + media |= 1; + write_bcr(sc, BCR49, media); + } + write_csr(sc, CSR1, kvtop(sc->init_block)); write_csr(sc, CSR2, (kvtop(sc->init_block) >> 16) & 0xff); diff --git a/sys/dev/lnc/if_lnc_pci.c b/sys/dev/lnc/if_lnc_pci.c index 4e66bf10b82b..c92ffc083bc7 100644 --- a/sys/dev/lnc/if_lnc_pci.c +++ b/sys/dev/lnc/if_lnc_pci.c @@ -17,7 +17,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: if_lnc_p.c,v 1.10 1999/05/10 22:39:37 paul Exp $ + * $Id: if_lnc_p.c,v 1.11 1999/07/03 20:17:04 peter Exp $ */ #include @@ -30,6 +30,7 @@ #include "lnc.h" #define PCI_DEVICE_ID_PCNet_PCI 0x20001022 +#define PCI_DEVICE_ID_PCHome_PCI 0x20011022 extern void *lnc_attach_ne2100_pci __P((int unit, unsigned iobase)); @@ -55,6 +56,9 @@ lnc_pci_probe (pcici_t tag, pcidi_t type) case PCI_DEVICE_ID_PCNet_PCI: return ("PCNet/PCI Ethernet adapter"); break; + case PCI_DEVICE_ID_PCHome_PCI: + return ("PCHome/PCI Ethernet adapter"); + break; default: break; } diff --git a/sys/dev/lnc/if_lncreg.h b/sys/dev/lnc/if_lncreg.h index fe146ee8931c..82efff9d5e32 100644 --- a/sys/dev/lnc/if_lncreg.h +++ b/sys/dev/lnc/if_lncreg.h @@ -24,6 +24,11 @@ #define CSR88 88 #define CSR89 89 +#define BCR49 49 +#define BCR32 32 +#define BCR33 33 +#define BCR34 34 + /* Control and Status Register Masks */ diff --git a/sys/dev/lnc/if_lncvar.h b/sys/dev/lnc/if_lncvar.h index b2fc532f1e3d..aeff426d5e17 100644 --- a/sys/dev/lnc/if_lncvar.h +++ b/sys/dev/lnc/if_lncvar.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.h,v 1.10 1999/01/31 00:56:32 paul Exp $ + * $Id: if_lnc.h,v 1.11 1999/07/06 19:22:51 des Exp $ */ #include @@ -107,6 +107,8 @@ #define PCnet_PCI_II 8 /* Am79C970A */ #define PCnet_FAST 9 /* Am79C971 */ #define PCnet_FASTplus 10 /* Am79C972 */ +#define PCnet_Home 11 /* Am79C978 */ + /* CSR88-89: Chip ID masks */ #define AMD_MASK 0x003 @@ -119,6 +121,7 @@ #define Am79C970A 0x2621 #define Am79C971 0x2623 #define Am79C972 0x2624 +#define Am79C978 0x2626 /* Board types */ #define UNKNOWN 0 diff --git a/sys/i386/isa/ic/Am7990.h b/sys/i386/isa/ic/Am7990.h index fe146ee8931c..82efff9d5e32 100644 --- a/sys/i386/isa/ic/Am7990.h +++ b/sys/i386/isa/ic/Am7990.h @@ -24,6 +24,11 @@ #define CSR88 88 #define CSR89 89 +#define BCR49 49 +#define BCR32 32 +#define BCR33 33 +#define BCR34 34 + /* Control and Status Register Masks */ diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c index 5fc823303ad8..d035311db6fe 100644 --- a/sys/i386/isa/if_lnc.c +++ b/sys/i386/isa/if_lnc.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.c,v 1.60 1999/05/09 23:24:47 peter Exp $ + * $Id: if_lnc.c,v 1.61 1999/07/06 19:22:50 des Exp $ */ /* @@ -151,6 +151,7 @@ static char const * const ic_ident[] = { "PCnet-PCI II", "PCnet-FAST", "PCnet-FAST+", + "PCnet-Home", }; static void lnc_setladrf __P((struct lnc_softc *sc)); @@ -1192,6 +1193,8 @@ pcnet_probe(struct lnc_softc *sc) return (PCnet_FAST); case Am79C972: return (PCnet_FASTplus); + case Am79C978: + return (PCnet_Home); default: break; } @@ -1491,6 +1494,15 @@ lnc_init(struct lnc_softc *sc) /* Give the LANCE the physical address of the initialisation block */ + if (sc->nic.ic == PCnet_Home) { + u_short media; + /* Set PHY_SEL to HomeRun */ + media = read_bcr(sc, BCR49); + media &= ~3; + media |= 1; + write_bcr(sc, BCR49, media); + } + write_csr(sc, CSR1, kvtop(sc->init_block)); write_csr(sc, CSR2, (kvtop(sc->init_block) >> 16) & 0xff); diff --git a/sys/i386/isa/if_lnc.h b/sys/i386/isa/if_lnc.h index b2fc532f1e3d..aeff426d5e17 100644 --- a/sys/i386/isa/if_lnc.h +++ b/sys/i386/isa/if_lnc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.h,v 1.10 1999/01/31 00:56:32 paul Exp $ + * $Id: if_lnc.h,v 1.11 1999/07/06 19:22:51 des Exp $ */ #include @@ -107,6 +107,8 @@ #define PCnet_PCI_II 8 /* Am79C970A */ #define PCnet_FAST 9 /* Am79C971 */ #define PCnet_FASTplus 10 /* Am79C972 */ +#define PCnet_Home 11 /* Am79C978 */ + /* CSR88-89: Chip ID masks */ #define AMD_MASK 0x003 @@ -119,6 +121,7 @@ #define Am79C970A 0x2621 #define Am79C971 0x2623 #define Am79C972 0x2624 +#define Am79C978 0x2626 /* Board types */ #define UNKNOWN 0 diff --git a/sys/pci/if_lnc_p.c b/sys/pci/if_lnc_p.c index 4e66bf10b82b..c92ffc083bc7 100644 --- a/sys/pci/if_lnc_p.c +++ b/sys/pci/if_lnc_p.c @@ -17,7 +17,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: if_lnc_p.c,v 1.10 1999/05/10 22:39:37 paul Exp $ + * $Id: if_lnc_p.c,v 1.11 1999/07/03 20:17:04 peter Exp $ */ #include @@ -30,6 +30,7 @@ #include "lnc.h" #define PCI_DEVICE_ID_PCNet_PCI 0x20001022 +#define PCI_DEVICE_ID_PCHome_PCI 0x20011022 extern void *lnc_attach_ne2100_pci __P((int unit, unsigned iobase)); @@ -55,6 +56,9 @@ lnc_pci_probe (pcici_t tag, pcidi_t type) case PCI_DEVICE_ID_PCNet_PCI: return ("PCNet/PCI Ethernet adapter"); break; + case PCI_DEVICE_ID_PCHome_PCI: + return ("PCHome/PCI Ethernet adapter"); + break; default: break; }