Author: imp
Date: Wed Mar 21 12:55:59 2018
New Revision: 331291
URL: https://svnweb.freebsd.org/changeset/base/331291

Log:
  Revert r331273: "Release the "TUR" reference when clearing the TUR work flag. 
We mostly"
  
  It exposes other issues, so revert to the pervious state of known issues.

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Wed Mar 21 10:26:39 2018        (r331290)
+++ head/sys/cam/scsi/scsi_da.c Wed Mar 21 12:55:59 2018        (r331291)
@@ -3114,7 +3114,6 @@ more:
                if (bp == NULL) {
                        if (cam_iosched_has_work_flags(softc->cam_iosched, 
DA_WORK_TUR)) {
                                cam_iosched_clr_work_flags(softc->cam_iosched, 
DA_WORK_TUR);
-                               da_periph_release_locked(periph, DA_REF_TUR);
                                scsi_test_unit_ready(&start_ccb->csio,
                                     /*retries*/ da_retry_count,
                                     dadone,
@@ -3138,6 +3137,11 @@ more:
                                biofinish(bp, NULL, 0);
                                goto more;
                        }
+               }
+
+               if (cam_iosched_has_work_flags(softc->cam_iosched, 
DA_WORK_TUR)) {
+                       cam_iosched_clr_work_flags(softc->cam_iosched, 
DA_WORK_TUR);
+                       da_periph_release_locked(periph, DA_REF_TUR);
                }
 
                if ((bp->bio_flags & BIO_ORDERED) != 0 ||
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to