diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-02 21:20:41 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-02 21:20:41 +0000 |
commit | 25ccaf9f8165a1c363dd94db2862b86a0db5f3e8 (patch) | |
tree | c6217e434a6198c41500e6dab87d5a429b633d83 /sys/dev/ic | |
parent | 6dfc99e44a26270cfc3664538728247e45eb81f4 (diff) |
- drop number of openings by 4 to avoid "not queued" errors.
- check return from aac_start() and return correctly in case
we need to reschedule the watchdog.
convervative fix from niklas@, prompted by several ppl.
krw and deraadt ok.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/aac.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index 40f45b6f1e4..544e2e955dd 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.15 2003/04/27 11:22:52 ho Exp $ */ +/* $OpenBSD: aac.c,v 1.16 2003/09/02 21:20:40 fgsch Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -241,7 +241,12 @@ aac_attach(sc) sc->sc_link.adapter_softc = sc; sc->sc_link.adapter = &aac_switch; sc->sc_link.device = &aac_dev; - sc->sc_link.openings = AAC_ADAP_NORM_CMD_ENTRIES; /* XXX optimal? */ + /* + * XXX Theoretically this should be AAC_ADAP_NORM_CMD_ENTRIES but + * XXX in some configurations this can cause "not queued" errors. + * XXX A quarter of that number has been reported to be safe. + */ + sc->sc_link.openings = AAC_ADAP_NORM_CMD_ENTRIES / 4; sc->sc_link.adapter_buswidth = AAC_MAX_CONTAINERS; sc->sc_link.adapter_target = AAC_MAX_CONTAINERS; @@ -1570,11 +1575,12 @@ aac_exec_ccb(ccb) sizeof(struct aac_sg_entry); } - aac_start(ccb); - - xs->error = XS_NOERROR; - xs->resid = 0; - return (1); + if (aac_start(ccb) == 0) { + xs->error = XS_NOERROR; + xs->resid = 0; + return (1); + } + return (0); } /******************************************************************************** |