diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-10-03 21:11:15 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-10-03 21:11:15 +0000 |
commit | 0ae4055cd9ca13c195daa77e834d53c0b1e50169 (patch) | |
tree | 7bf2640547039785da1194a3ef34cdbc674411b6 /sys/dev/ic/ami.c | |
parent | 72bb7f725d0ea0320d6f6099595187b1b39b608e (diff) |
Reduce the number of openings the logical devices have to play with so
that ioctl's and raw commands will not cause i/o failures. Assume a
max of two processors/enclosures per raw bus for the moment.
Fixes regular crashes on my 1 logical device, all-softdep system
during make build with a bioctl loop running.
ok dlg@
Diffstat (limited to 'sys/dev/ic/ami.c')
-rw-r--r-- | sys/dev/ic/ami.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 94761a09dd6..468f2070a1d 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.91 2005/10/02 06:30:50 dlg Exp $ */ +/* $OpenBSD: ami.c,v 1.92 2005/10/03 21:11:14 krw Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -530,6 +530,13 @@ ami_attach(sc) sc->sc_maxunits = AMI_BIG_MAX_LDRIVES; if (sc->sc_maxcmds > AMI_MAXCMDS) sc->sc_maxcmds = AMI_MAXCMDS; + /* + * Reserve ccb's for ioctl's and raw commands to + * processors/enclosures by lowering the number of + * openings available for logical units. + */ + sc->sc_maxcmds -= AMI_MAXIOCTLCMDS + AMI_MAXPROCS * + AMI_MAXRAWCMDS * sc->sc_channels; if (sc->sc_nunits) sc->sc_link.openings = @@ -610,7 +617,7 @@ ami_attach(sc) rsc->sc_softc = sc; rsc->sc_channel = rsc - sc->sc_rawsoftcs; rsc->sc_link.device = &ami_raw_dev; - rsc->sc_link.openings = sc->sc_maxcmds; + rsc->sc_link.openings = AMI_MAXRAWCMDS; rsc->sc_link.adapter_softc = rsc; rsc->sc_link.adapter = &ami_raw_switch; rsc->sc_proctarget = -1; |