From 3f54ec85e8a1e88e729ff28a36048e36a59e30d3 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Merry" Date: Mon, 23 May 2016 19:52:08 +0000 Subject: [PATCH] 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 --- sys/cam/ata/ata_da.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 8a6e2412cc79..ceb8be4ec862 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1639,11 +1639,6 @@ adaregister(struct cam_periph *periph, void *arg) 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, void *arg) 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;