From 8faf9264bba4d5921f3fb7e0620b99c426a27d8f Mon Sep 17 00:00:00 2001 From: briggs Date: Wed, 27 Mar 2002 21:41:35 +0000 Subject: [PATCH] Print the chip revision in the attach function. Treat revision 0x84 of the SiS like other SIS630 variants. Call revision 0x84 the 630ET (name from OpenBSD). --- sys/dev/pci/if_sip.c | 9 +++++---- sys/dev/pci/if_sipreg.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c index bb71ee7057a0..e3da76db2d06 100644 --- a/sys/dev/pci/if_sip.c +++ b/sys/dev/pci/if_sip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.49 2002/03/24 11:00:17 is Exp $ */ +/* $NetBSD: if_sip.c,v 1.50 2002/03/27 21:41:35 briggs Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.49 2002/03/24 11:00:17 is Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.50 2002/03/27 21:41:35 briggs Exp $"); #include "bpfilter.h" @@ -590,7 +590,7 @@ SIP_DECL(attach)(struct device *parent, struct device *self, void *aux) } sc->sc_rev = PCI_REVISION(pa->pa_class); - printf(": %s\n", sip->sip_name); + printf(": %s, rev %#02x\n", sip->sip_name, sc->sc_rev); sc->sc_model = sip; @@ -3069,11 +3069,12 @@ SIP_DECL(sis900_read_macaddr)(struct sip_softc *sc, { u_int16_t myea[ETHER_ADDR_LEN / 2]; - switch (PCI_REVISION(pa->pa_class)) { + switch (sc->sc_rev) { case SIS_REV_630S: case SIS_REV_630E: case SIS_REV_630EA1: case SIS_REV_635: + case 0x84: /* * The MAC address for the on-board Ethernet of * the SiS 630 chipset is in the NVRAM. Kick diff --git a/sys/dev/pci/if_sipreg.h b/sys/dev/pci/if_sipreg.h index 9a55a1c9ed9b..d3eb114d6fe0 100644 --- a/sys/dev/pci/if_sipreg.h +++ b/sys/dev/pci/if_sipreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_sipreg.h,v 1.9 2002/02/09 21:04:02 thorpej Exp $ */ +/* $NetBSD: if_sipreg.h,v 1.10 2002/03/27 21:41:35 briggs Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -707,6 +707,7 @@ struct sip_desc { #define SIS_REV_630E 0x81 #define SIS_REV_630S 0x82 #define SIS_REV_630EA1 0x83 +#define SIS_REV_630ET 0x84 #define SIS_REV_635 0x90 /* same for 735 (745?) */ /*