Author: ken
Date: Mon May 23 19:52:08 2016
New Revision: 300532
URL: https://svnweb.freebsd.org/changeset/base/300532

Log:
  Fix ada(4) trim support quirk setting.
  
  I broke broke the quirk in the ada(4) driver disabling NCQ trim support
  in revision 300207.  The support flags were set before the quirks were
  loaded.
  
  sys/cam/ata/ata_da.c:
        Call adasetflags() after loading quirks, so that we'll set the
        flags accurately.
  
  Sponsored by: Spectra Logic

Modified:
  head/sys/cam/ata/ata_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c   Mon May 23 19:46:58 2016        (r300531)
+++ head/sys/cam/ata/ata_da.c   Mon May 23 19:52:08 2016        (r300532)
@@ -1639,11 +1639,6 @@ adaregister(struct cam_periph *periph, v
                return(CAM_REQ_CMP_ERR);
        }
 
-       /*
-        * Set support flags based on the Identify data.
-        */
-       adasetflags(softc, cgd);
-
        periph->softc = softc;
 
        /*
@@ -1683,6 +1678,12 @@ adaregister(struct cam_periph *periph, v
        snprintf(announce_buf, sizeof(announce_buf),
            "kern.cam.ada.%d.write_cache", periph->unit_number);
        TUNABLE_INT_FETCH(announce_buf, &softc->write_cache);
+
+       /*
+        * Set support flags based on the Identify data and quirks.
+        */
+       adasetflags(softc, cgd);
+
        /* Disable queue sorting for non-rotational media by default. */
        if (cgd->ident_data.media_rotation_rate == ATA_RATE_NON_ROTATING) {
                softc->rotating = 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