diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-27 07:56:56 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-27 07:56:56 +0000 |
commit | b4ac3962aacac675b759b68a22cc15d66b2412a4 (patch) | |
tree | 350f2fa62ea3cb8708949270551304d488ec9623 /sys | |
parent | 211ae1b3c47dec67932f325705c574baa5ab27d8 (diff) |
we cant do bioctl or sensors on broken controllers since they dont have the
spare ccbs for it and they dont understand the megaraid commands we use in
those paths.
initially found by jared rr spiegel
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ami.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 6fa5e3a2823..e9364870c6e 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.166 2006/06/09 04:48:13 marco Exp $ */ +/* $OpenBSD: ami.c,v 1.167 2006/06/27 07:56:55 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -535,21 +535,21 @@ ami_attach(struct ami_softc *sc) /* lock around ioctl requests */ lockinit(&sc->sc_lock, PZERO, DEVNAME(sc), 0, 0); + config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + + /* can't do bioctls, sensors, or pass-through on broken devices */ + if (sc->sc_flags & AMI_BROKEN) + return (0); + #if NBIO > 0 if (bio_register(&sc->sc_dev, ami_ioctl) != 0) - printf("%s: controller registration failed", DEVNAME(sc)); + printf("%s: controller registration failed\n", DEVNAME(sc)); else sc->sc_ioctl = ami_ioctl; +#endif if (sensor_task_register(sc, ami_refresh, 10)) printf("%s: unable to register update task\n", DEVNAME(sc)); -#endif /* NBIO > 0 */ - - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); - - /* can't do pass-through on broken device for now */ - if (sc->sc_flags & AMI_BROKEN) - return (0); rsc = malloc(sizeof(struct ami_rawsoftc) * sc->sc_channels, M_DEVBUF, M_NOWAIT); @@ -562,8 +562,6 @@ ami_attach(struct ami_softc *sc) for (sc->sc_rawsoftcs = rsc; rsc < &sc->sc_rawsoftcs[sc->sc_channels]; rsc++) { - /* TODO fetch and print channel properties */ - rsc->sc_softc = sc; rsc->sc_channel = rsc - sc->sc_rawsoftcs; rsc->sc_link.device = &ami_raw_dev; |