Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/scsi/scsi_sa.c
Show First 20 Lines • Show All 612 Lines • ▼ Show 20 Lines | |||||
static int sa_allow_io_split = SA_DEFAULT_IO_SPLIT; | static int sa_allow_io_split = SA_DEFAULT_IO_SPLIT; | ||||
/* | /* | ||||
* Tunable to allow the user to set a global allow_io_split value. Note | * Tunable to allow the user to set a global allow_io_split value. Note | ||||
* that this WILL GO AWAY in FreeBSD 11.0. Silently splitting the I/O up | * that this WILL GO AWAY in FreeBSD 11.0. Silently splitting the I/O up | ||||
* is bad behavior, because it hides the true tape block size from the | * is bad behavior, because it hides the true tape block size from the | ||||
* application. | * application. | ||||
*/ | */ | ||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, sa, CTLFLAG_RD, 0, | static SYSCTL_NODE(_kern_cam, OID_AUTO, sa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, | ||||
"CAM Sequential Access Tape Driver"); | "CAM Sequential Access Tape Driver"); | ||||
SYSCTL_INT(_kern_cam_sa, OID_AUTO, allow_io_split, CTLFLAG_RDTUN, | SYSCTL_INT(_kern_cam_sa, OID_AUTO, allow_io_split, CTLFLAG_RDTUN, | ||||
&sa_allow_io_split, 0, "Default I/O split value"); | &sa_allow_io_split, 0, "Default I/O split value"); | ||||
static struct periph_driver sadriver = | static struct periph_driver sadriver = | ||||
{ | { | ||||
sainit, "sa", | sainit, "sa", | ||||
TAILQ_HEAD_INITIALIZER(sadriver.units), /* generation */ 0 | TAILQ_HEAD_INITIALIZER(sadriver.units), /* generation */ 0 | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,678 Lines • ▼ Show 20 Lines | sasysctlinit(void *context, int pending) | ||||
snprintf(tmpstr, sizeof(tmpstr), "CAM SA unit %d", periph->unit_number); | snprintf(tmpstr, sizeof(tmpstr), "CAM SA unit %d", periph->unit_number); | ||||
snprintf(tmpstr2, sizeof(tmpstr2), "%u", periph->unit_number); | snprintf(tmpstr2, sizeof(tmpstr2), "%u", periph->unit_number); | ||||
sysctl_ctx_init(&softc->sysctl_ctx); | sysctl_ctx_init(&softc->sysctl_ctx); | ||||
softc->flags |= SA_FLAG_SCTX_INIT; | softc->flags |= SA_FLAG_SCTX_INIT; | ||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx, | softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx, | ||||
SYSCTL_STATIC_CHILDREN(_kern_cam_sa), OID_AUTO, tmpstr2, | SYSCTL_STATIC_CHILDREN(_kern_cam_sa), OID_AUTO, tmpstr2, | ||||
CTLFLAG_RD, 0, tmpstr, "device_index"); | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index"); | ||||
if (softc->sysctl_tree == NULL) | if (softc->sysctl_tree == NULL) | ||||
goto bailout; | goto bailout; | ||||
SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), | SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), | ||||
OID_AUTO, "allow_io_split", CTLFLAG_RDTUN | CTLFLAG_NOFETCH, | OID_AUTO, "allow_io_split", CTLFLAG_RDTUN | CTLFLAG_NOFETCH, | ||||
&softc->allow_io_split, 0, "Allow Splitting I/O"); | &softc->allow_io_split, 0, "Allow Splitting I/O"); | ||||
SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), | SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), | ||||
OID_AUTO, "maxio", CTLFLAG_RD, | OID_AUTO, "maxio", CTLFLAG_RD, | ||||
▲ Show 20 Lines • Show All 3,600 Lines • Show Last 20 Lines |