Add kern.cam.da.X.quirks tunable, similar existing for ada.
Submitted by: Michael Lass MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20677
This commit is contained in:
parent
20bd59416d
commit
34a5c41c43
@ -2694,6 +2694,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) {
|
||||
@ -2750,6 +2751,13 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
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;
|
||||
else if (softc->quirks & DA_Q_SMR_DM)
|
||||
|
Loading…
Reference in New Issue
Block a user