summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_xpt.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-05-25 20:17:29 +0000
committergibbs <gibbs@FreeBSD.org>1999-05-25 20:17:29 +0000
commit39762f08bd495f76c5ec17ce06e5bba73ebd7535 (patch)
tree3be8a4e03355c2cf9fa7f7c870aad2c364a5859a /sys/cam/cam_xpt.c
parentd80423807ab53ee4e194324aa2142b8255eaa227 (diff)
downloadFreeBSD-src-39762f08bd495f76c5ec17ce06e5bba73ebd7535.zip
FreeBSD-src-39762f08bd495f76c5ec17ce06e5bba73ebd7535.tar.gz
Run xpt_action at splsoftcam() so that it cannot be re-entered by our SWI.
The XPT doesn't have a problem with this itself, but some controllers drivers may have been caught off guard by the old behavior. XPT_CONT_TARGET_IO is also a valid ccb type for cam_periph_unmapmem.
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r--sys/cam/cam_xpt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index d053475..3fc748d 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cam_xpt.c,v 1.59 1999/05/22 21:58:47 gibbs Exp $
+ * $Id: cam_xpt.c,v 1.60 1999/05/23 18:57:29 gibbs Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@@ -2718,10 +2718,13 @@ xptsetasyncbusfunc(struct cam_eb *bus, void *arg)
void
xpt_action(union ccb *start_ccb)
{
+ int iopl;
+
CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n"));
start_ccb->ccb_h.status = CAM_REQ_INPROG;
+ iopl = splsoftcam();
switch (start_ccb->ccb_h.func_code) {
case XPT_SCSI_IO:
{
@@ -3280,6 +3283,7 @@ xpt_action(union ccb *start_ccb)
start_ccb->ccb_h.status = CAM_PROVIDE_FAIL;
break;
}
+ splx(iopl);
}
void
OpenPOWER on IntegriCloud