svn commit: r353584 - stable/12/sys/cam/scsi
Alexander Motin
mav at FreeBSD.org
Tue Oct 15 18:47:07 UTC 2019
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;
More information about the svn-src-all
mailing list