summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mfi.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-05-01 00:47:32 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-05-01 00:47:32 +0000
commitd7b8f1775805d1153cc44f7891137ac007b0bb94 (patch)
tree0f2c77ee551621b412c168c4b9e4620489c056ea /sys/dev/ic/mfi.c
parent8b615fe42d15574193f8112a277b25f65db72cd8 (diff)
dont need to walk alldevs during sensor creation looking for the logical
disk scsibus when we record that in mfi_attach. also happens to get rid of a logic error that let it come out of the loop on alldevs with a reference to something that wasnt the logical disk scsibus and use that.
Diffstat (limited to 'sys/dev/ic/mfi.c')
-rw-r--r--sys/dev/ic/mfi.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 66fc4c5fecf..15744960a5e 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.140 2013/04/30 07:17:36 dlg Exp $ */
+/* $OpenBSD: mfi.c,v 1.141 2013/05/01 00:47:31 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -2024,23 +2024,9 @@ int
mfi_create_sensors(struct mfi_softc *sc)
{
struct device *dev;
- struct scsibus_softc *ssc = NULL;
struct scsi_link *link;
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 ksensor) * sc->sc_ld_cnt,
M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->sc_sensors == NULL)
@@ -2050,7 +2036,7 @@ mfi_create_sensors(struct mfi_softc *sc)
sizeof(sc->sc_sensordev.xname));
for (i = 0; i < sc->sc_ld_cnt; i++) {
- link = scsi_get_link(ssc, i, 0);
+ link = scsi_get_link(sc->sc_scsibus, i, 0);
if (link == NULL)
goto bad;