svn commit: r288409 - stable/10/sys/cam/scsi
Mark Johnston
markj at FreeBSD.org
Wed Sep 30 03:33:29 UTC 2015
Author: markj
Date: Wed Sep 30 03:33:28 2015
New Revision: 288409
URL: https://svnweb.freebsd.org/changeset/base/288409
Log:
MFC r287806:
Preserve the device queue status before retrying a sense request in
chdone().
Modified:
stable/10/sys/cam/scsi/scsi_ch.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/scsi/scsi_ch.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_ch.c Wed Sep 30 03:30:24 2015 (r288408)
+++ stable/10/sys/cam/scsi/scsi_ch.c Wed Sep 30 03:33:28 2015 (r288409)
@@ -655,11 +655,13 @@ chdone(struct cam_periph *periph, union
*/
return;
} else if (error != 0) {
- int retry_scheduled;
struct scsi_mode_sense_6 *sms;
+ int frozen, retry_scheduled;
sms = (struct scsi_mode_sense_6 *)
done_ccb->csio.cdb_io.cdb_bytes;
+ frozen = (done_ccb->ccb_h.status &
+ CAM_DEV_QFRZN) != 0;
/*
* Check to see if block descriptors were
@@ -670,7 +672,8 @@ chdone(struct cam_periph *periph, union
* block descriptors were disabled, enable
* them and re-send the command.
*/
- if (sms->byte2 & SMS_DBD) {
+ if ((sms->byte2 & SMS_DBD) != 0 &&
+ (periph->flags & CAM_PERIPH_INVALID) == 0) {
sms->byte2 &= ~SMS_DBD;
xpt_action(done_ccb);
softc->quirks |= CH_Q_NO_DBD;
@@ -679,7 +682,7 @@ chdone(struct cam_periph *periph, union
retry_scheduled = 0;
/* Don't wedge this device's queue */
- if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
+ if (frozen)
cam_release_devq(done_ccb->ccb_h.path,
/*relsim_flags*/0,
/*reduction*/0,
More information about the svn-src-stable-10
mailing list