From 6e70dfc6c61a685f54939def68b7b56cae62fd42 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Mon, 5 Nov 2007 20:50:21 +0000 Subject: More scsi_done() at SPLBIO. Wrap more interrupt function calls while polling in splbio/splx. --- sys/dev/ic/adv.c | 5 ++++- sys/dev/ic/adw.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index b241a5d85fd..4cdd07f6882 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.17 2006/11/29 01:00:47 grange Exp $ */ +/* $OpenBSD: adv.c,v 1.18 2007/11/05 20:50:20 krw Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -883,10 +883,13 @@ adv_poll(sc, xs, count) struct scsi_xfer *xs; int count; { + int s; /* timeouts are in msec, so we loop in 1000 usec cycles */ while (count) { + s = splbio(); adv_intr(sc); + splx(s); if (xs->flags & ITSDONE) return (0); delay(1000); /* only happens in boot so ok */ diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index f0b2a23cc8b..f499600532e 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.31 2006/11/28 23:59:45 dlg Exp $ */ +/* $OpenBSD: adw.c,v 1.32 2007/11/05 20:50:20 krw Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -969,10 +969,13 @@ adw_poll(sc, xs, count) struct scsi_xfer *xs; int count; { + int s; /* timeouts are in msec, so we loop in 1000 usec cycles */ while (count > 0) { + s = splbio(); adw_intr(sc); + splx(s); if (xs->flags & ITSDONE) { if ((xs->cmd->opcode == INQUIRY) && (xs->sc_link->lun == 0) -- cgit v1.2.3