diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-28 14:00:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-28 14:00:01 +0000 |
commit | 7adc2fd1cc0527df2d955bd95fbc89d442768f7b (patch) | |
tree | 6a03df81483f011a590df84457a8ed787d839d9b /sys | |
parent | 8817d0b5c1445f970be2840d71c641f02e753bf2 (diff) |
Correctly probe for the Ethernet chip on HPC 1.5 expansion boards. Gets rid of
false sq positives ("sq not configured" since rejected by the sq driver) in
dmesg, for SCSI HPC boards.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sgi/hpc/hpc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/sgi/hpc/hpc.c b/sys/arch/sgi/hpc/hpc.c index a34bdeeb85f..25f00a57ca3 100644 --- a/sys/arch/sgi/hpc/hpc.c +++ b/sys/arch/sgi/hpc/hpc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpc.c,v 1.15 2012/09/29 19:24:31 miod Exp $ */ +/* $OpenBSD: hpc.c,v 1.16 2013/09/28 14:00:00 miod Exp $ */ /* $NetBSD: hpc.c,v 1.66 2011/07/01 18:53:46 dyoung Exp $ */ /* $NetBSD: ioc.c,v 1.9 2011/07/01 18:53:47 dyoung Exp $ */ @@ -518,7 +518,7 @@ hpc_attach(struct device *parent, struct device *self, void *aux) /* XXX: the firmware should have taken care of this already */ #if 0 - if (sys_config.system_subtype != IP22_INDIGO) { + if (sys_config.system_subtype != IP22_INDIGO2) { bus_space_write_4(sc->sc_ct, sc->sc_ch, IOC_BASE + IOC_GCSEL, 0xff); bus_space_write_4(sc->sc_ct, sc->sc_ch, @@ -688,9 +688,13 @@ hpc_attach(struct device *parent, struct device *self, void *aux) delay(20); *reg = 0x00; - pa = sc->sc_ch + hd->hd_devoff; - if (guarded_read_4(PHYS_TO_XKPHYS(pa, CCA_NC), - &probe32) != 0) + pa = sc->sc_ch + hd->hd_devoff + + (7 << 2); /* SEEQ_TXSTAT */ + reg = (volatile uint32_t *) + PHYS_TO_XKPHYS(pa, CCA_NC); + if (guarded_read_4((vaddr_t)reg, &probe32) != 0) + continue; + if ((probe32 & 0xff) != 0x80) /*TXSTAT_OLDNEW*/ continue; } else /* if (strcmp(hd->hd_name, "wdsc") == 0) */ { |