From 1c9ed43eb59ce7605b6a9b777033e2d713d3f508 Mon Sep 17 00:00:00 2001 From: simokawa Date: Wed, 12 Nov 2003 03:45:10 +0000 Subject: [PATCH] - Reserve a ocb for management ORB. - Requeue XPT_SCSI_IO if ocb is short. --- sys/dev/firewire/sbp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index fc9db27fca51..95ce8e0143a7 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -1317,6 +1317,7 @@ sbp_mgm_orb(struct sbp_dev *sdev, int func, struct sbp_ocb *aocb) } if ((ocb = sbp_get_ocb(sdev)) == NULL) { splx(s); + /* XXX */ return; } ocb->flags = OCB_ACT_MGM; @@ -1903,7 +1904,7 @@ END_DEBUG sbp->sim = cam_sim_alloc(sbp_action, sbp_poll, "sbp", sbp, device_get_unit(dev), /*untagged*/ 1, - /*tagged*/ SBP_QUEUE_LEN, + /*tagged*/ SBP_QUEUE_LEN - 1, devq); if (sbp->sim == NULL) { @@ -2325,8 +2326,11 @@ END_DEBUG } } #endif - if ((ocb = sbp_get_ocb(sdev)) == NULL) + if ((ocb = sbp_get_ocb(sdev)) == NULL) { + ccb->ccb_h.status = CAM_REQUEUE_REQ; + xpt_done(ccb); return; + } ocb->flags = OCB_ACT_CMD; ocb->sdev = sdev;