Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/scsi/scsi_all.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 9,228 Lines • ▼ Show 20 Lines | sysctl_scsi_delay(SYSCTL_HANDLER_ARGS) | ||||
int error, delay; | int error, delay; | ||||
delay = scsi_delay; | delay = scsi_delay; | ||||
error = sysctl_handle_int(oidp, &delay, 0, req); | error = sysctl_handle_int(oidp, &delay, 0, req); | ||||
if (error != 0 || req->newptr == NULL) | if (error != 0 || req->newptr == NULL) | ||||
return (error); | return (error); | ||||
return (set_scsi_delay(delay)); | return (set_scsi_delay(delay)); | ||||
} | } | ||||
SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, CTLTYPE_INT|CTLFLAG_RW, | SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, | ||||
0, 0, sysctl_scsi_delay, "I", | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, 0, sysctl_scsi_delay, "I", | ||||
"Delay to allow devices to settle after a SCSI bus reset (ms)"); | "Delay to allow devices to settle after a SCSI bus reset (ms)"); | ||||
static int | static int | ||||
set_scsi_delay(int delay) | set_scsi_delay(int delay) | ||||
{ | { | ||||
/* | /* | ||||
* If someone sets this to 0, we assume that they want the | * If someone sets this to 0, we assume that they want the | ||||
* minimum allowable bus settle delay. | * minimum allowable bus settle delay. | ||||
Show All 12 Lines |