summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1999-01-03 22:57:54 +0000
committermjacob <mjacob@FreeBSD.org>1999-01-03 22:57:54 +0000
commit97dd49d76d7a0d9dad9e5ab09cea3fff2457b023 (patch)
tree0b4c180d6507232da652c272e88aeb02e72a613d /sys
parentc9db69e854914f2881e1cc321e82e85e041ff157 (diff)
downloadFreeBSD-src-97dd49d76d7a0d9dad9e5ab09cea3fff2457b023.zip
FreeBSD-src-97dd49d76d7a0d9dad9e5ab09cea3fff2457b023.tar.gz
Temporary workaround (bandaid) for case where you have READ
CAPACITY fail for a non-removable media device. There's a race condition where the device entry is removed and then xpt_release_ccb is called which attempts to give back the ccb to a device that's now gone. In this bandaid release the ccb early and then remember to not call xpt_release_ccb later.
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/scsi/scsi_da.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index fe8ce1a..4ed0b5c 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_da.c,v 1.15 1998/12/11 03:54:43 gibbs Exp $
+ * $Id: scsi_da.c,v 1.16 1998/12/23 16:48:17 mjacob Exp $
*/
#include "opt_hw_wdog.h"
@@ -1367,7 +1367,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
printf("got CAM status %#x\n",
done_ccb->ccb_h.status);
}
-
+ xpt_release_ccb(done_ccb);
+ done_ccb = NULL;
xpt_print_path(periph->path);
printf("fatal error, failed"
" to attach to device\n");
@@ -1397,7 +1398,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
/* No-op. We're polling */
return;
}
- xpt_release_ccb(done_ccb);
+ if (done_ccb)
+ xpt_release_ccb(done_ccb);
}
static int
OpenPOWER on IntegriCloud