Date: Tue, 15 Oct 2019 18:47:07 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r353584 - stable/12/sys/cam/scsi Message-ID: <201910151847.x9FIl7ef067563@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Oct 15 18:47:06 2019 New Revision: 353584 URL: https://svnweb.freebsd.org/changeset/base/353584 Log: MFC r352743: Add kern.cam.da.X.quirks tunable, similar existing for ada. Submitted by: Michael Lass Differential Revision: https://reviews.freebsd.org/D20677 Modified: stable/12/sys/cam/scsi/scsi_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_da.c Tue Oct 15 18:44:50 2019 (r353583) +++ stable/12/sys/cam/scsi/scsi_da.c Tue Oct 15 18:47:06 2019 (r353584) @@ -2679,6 +2679,7 @@ daregister(struct cam_periph *periph, void *arg) struct ccb_getdev *cgd; char tmpstr[80]; caddr_t match; + int quirks; cgd = (struct ccb_getdev *)arg; if (cgd == NULL) { @@ -2734,6 +2735,13 @@ daregister(struct cam_periph *periph, void *arg) xpt_path_inq(&cpi, periph->path); if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE)) softc->quirks |= DA_Q_NO_6_BYTE; + + /* Override quirks if tunable is set */ + snprintf(tmpstr, sizeof(tmpstr), "kern.cam.da.%d.quirks", + periph->unit_number); + quirks = softc->quirks; + TUNABLE_INT_FETCH(tmpstr, &quirks); + softc->quirks = quirks; if (SID_TYPE(&cgd->inq_data) == T_ZBC_HM) softc->zone_mode = DA_ZONE_HOST_MANAGED;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910151847.x9FIl7ef067563>