summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_cd.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-11-14 20:13:38 +0000
committermav <mav@FreeBSD.org>2009-11-14 20:13:38 +0000
commit2f5418e2b9f72a27fd6515faa265998fda9f1d0b (patch)
tree352bf63383ab97b930ea51f43c617d5cf95be212 /sys/cam/scsi/scsi_cd.c
parent65ae6957dab32b28124a7f314768cb788541ec8c (diff)
downloadFreeBSD-src-2f5418e2b9f72a27fd6515faa265998fda9f1d0b.zip
FreeBSD-src-2f5418e2b9f72a27fd6515faa265998fda9f1d0b.tar.gz
MFp4:
Fix several device freeze counting bugs.
Diffstat (limited to 'sys/cam/scsi/scsi_cd.c')
-rw-r--r--sys/cam/scsi/scsi_cd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index f2a612b..7bd6158 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1570,7 +1570,8 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
bp->bio_resid = bp->bio_bcount;
bp->bio_error = error;
bp->bio_flags |= BIO_ERROR;
- cam_release_devq(done_ccb->ccb_h.path,
+ if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
+ cam_release_devq(done_ccb->ccb_h.path,
/*relsim_flags*/0,
/*reduction*/0,
/*timeout*/0,
@@ -1658,7 +1659,8 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
struct ccb_getdev cgd;
/* Don't wedge this device's queue */
- cam_release_devq(done_ccb->ccb_h.path,
+ if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
+ cam_release_devq(done_ccb->ccb_h.path,
/*relsim_flags*/0,
/*reduction*/0,
/*timeout*/0,
OpenPOWER on IntegriCloud