Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_sa.c
Show First 20 Lines • Show All 2,441 Lines • ▼ Show 20 Lines | saregister(struct cam_periph *periph, void *arg) | ||||
* tunable WILL GO AWAY in FreeBSD 11.0. | * tunable WILL GO AWAY in FreeBSD 11.0. | ||||
*/ | */ | ||||
snprintf(tmpstr, sizeof(tmpstr), "kern.cam.sa.%u.allow_io_split", | snprintf(tmpstr, sizeof(tmpstr), "kern.cam.sa.%u.allow_io_split", | ||||
periph->unit_number); | periph->unit_number); | ||||
TUNABLE_INT_FETCH(tmpstr, &softc->allow_io_split); | TUNABLE_INT_FETCH(tmpstr, &softc->allow_io_split); | ||||
/* | /* | ||||
* If maxio isn't set, we fall back to DFLTPHYS. Otherwise we take | * If maxio isn't set, we fall back to DFLTPHYS. Otherwise we take | ||||
* the smaller of cpi.maxio or MAXPHYS. | * the smaller of cpi.maxio or maxphys. | ||||
*/ | */ | ||||
if (cpi.maxio == 0) | if (cpi.maxio == 0) | ||||
softc->maxio = DFLTPHYS; | softc->maxio = DFLTPHYS; | ||||
else if (cpi.maxio > MAXPHYS) | else if (cpi.maxio > maxphys) | ||||
softc->maxio = MAXPHYS; | softc->maxio = maxphys; | ||||
else | else | ||||
softc->maxio = cpi.maxio; | softc->maxio = cpi.maxio; | ||||
/* | /* | ||||
* Record the controller's maximum I/O size so we can report it to | * Record the controller's maximum I/O size so we can report it to | ||||
* the user later. | * the user later. | ||||
*/ | */ | ||||
softc->cpi_maxio = cpi.maxio; | softc->cpi_maxio = cpi.maxio; | ||||
▲ Show 20 Lines • Show All 3,441 Lines • Show Last 20 Lines |