summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-06-28 05:01:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-06-28 05:01:29 +0000
commit4a287c61cc9c252c69067d061b960de5deffd9b7 (patch)
tree839fb2e5be6353b25a8a3b29e35e78b9ad46bdb0 /sys
parent751bfc71f484ab046eea6ca8b79b88f8d51d3ab8 (diff)
Move the calculation of sc_link->openings to after the printf about
tagged queueing which is where it was last time around. This fixes a panic I was seeing when there were lots of transactions (e.g. when i read my mail).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 7946d938e3f..cd21f7266ad 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -29,10 +29,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx_openbsd.c,v 1.5 2002/06/28 00:34:54 smurph Exp $
+ * $Id: aic7xxx_openbsd.c,v 1.6 2002/06/28 05:01:28 millert Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_freebsd.c,v 1.26 2001/07/18 21:39:47 gibbs Exp $
- * $OpenBSD: aic7xxx_openbsd.c,v 1.5 2002/06/28 00:34:54 smurph Exp $
+ * $OpenBSD: aic7xxx_openbsd.c,v 1.6 2002/06/28 05:01:28 millert Exp $
*/
#include <dev/ic/aic7xxx_openbsd.h>
@@ -1631,22 +1631,6 @@ ahc_check_tags(ahc, xs)
{
struct ahc_devinfo devinfo;
- if (ahc->scb_data->maxhscbs >= 16 ||
- (ahc->flags & AHC_PAGESCBS)) {
- /* Default to 16 tags */
- xs->sc_link->openings += 14;
- } else {
- /*
- * Default to 4 tags on whimpy
- * cards that don't have much SCB
- * space and can't page. This prevents
- * a single device from hogging all
- * slots. We should really have a better
- * way of providing fairness.
- */
- xs->sc_link->openings += 2;
- }
-
if (xs->sc_link->quirks & SDEV_NOTAGS)
return;
@@ -1665,6 +1649,21 @@ ahc_check_tags(ahc, xs)
printf("%s: target %d using tagged queuing\n",
ahc_name(ahc), XS_SCSI_ID(xs));
+ if (ahc->scb_data->maxhscbs >= 16 ||
+ (ahc->flags & AHC_PAGESCBS)) {
+ /* Default to 16 tags */
+ xs->sc_link->openings += 14;
+ } else {
+ /*
+ * Default to 4 tags on whimpy
+ * cards that don't have much SCB
+ * space and can't page. This prevents
+ * a single device from hogging all
+ * slots. We should really have a better
+ * way of providing fairness.
+ */
+ xs->sc_link->openings += 2;
+ }
}
int