diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-11-01 12:21:52 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-11-01 12:21:52 +0000 |
commit | 1c873d750c62839e45ad4dd080704d4fb3e18ece (patch) | |
tree | a02bbd5039b0f9cbb2f7f9000d73631bbb58ec74 /sys/dev/pci | |
parent | 319a366648df57ae4597d10e8b16b41f463e1bf7 (diff) |
dont walk the device list looking for our scsibus, it is stashed when we
attach it.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/arc.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index 8f8471d83a2..2d980aa045f 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.52 2006/11/01 12:12:32 dlg Exp $ */ +/* $OpenBSD: arc.c,v 1.53 2006/11/01 12:21:51 dlg Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -1546,22 +1546,8 @@ int arc_create_sensors(struct arc_softc *sc) { struct device *dev; - struct scsibus_softc *ssc; int i; - TAILQ_FOREACH(dev, &alldevs, dv_list) { - if (dev->dv_parent != &sc->sc_dev) - continue; - - /* check if this is the scsibus for the logical disks */ - ssc = (struct scsibus_softc *)dev; - if (ssc->adapter_link == &sc->sc_link) - break; - } - - if (ssc == NULL) - return (1); - sc->sc_sensors = malloc(sizeof(struct sensor) * sc->sc_disk_count, M_DEVBUF, M_WAITOK); if (sc->sc_sensors == NULL) @@ -1569,10 +1555,10 @@ arc_create_sensors(struct arc_softc *sc) bzero(sc->sc_sensors, sizeof(struct sensor) * sc->sc_disk_count); for (i = 0; i < sc->sc_disk_count; i++) { - if (ssc->sc_link[i][0] == NULL) + if (sc->sc_scsibus->sc_link[i][0] == NULL) goto bad; - dev = ssc->sc_link[i][0]->device_softc; + dev = sc->sc_scsibus->sc_link[i][0]->device_softc; sc->sc_sensors[i].type = SENSOR_DRIVE; sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; |