Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153154074
D56462.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56462.diff
View Options
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -86,8 +86,8 @@
_Static_assert(XPT_PRINT_LEN <= XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large");
/*
- * This is the maximum number of high powered commands (e.g. start unit)
- * that can be outstanding at a particular time.
+ * This sets a default for the the maximum number of high powered commands
+ * (e.g. start unit) that can be outstanding at a particular time.
*/
#ifndef CAM_MAX_HIGHPOWER
#define CAM_MAX_HIGHPOWER 4
@@ -168,6 +168,9 @@
&xsoftc.boot_delay, 0, "Bus registration wait time");
SYSCTL_UINT(_kern_cam, OID_AUTO, xpt_generation, CTLFLAG_RD,
&xsoftc.xpt_generation, 0, "CAM peripheral generation count");
+SYSCTL_INT(_kern_cam, OID_AUTO, max_high_power, CTLFLAG_RWTUN,
+ &xsoftc.num_highpower, 0,
+ "Max number of high power commands to be issued at once");
struct cam_doneq {
struct mtx_padalign cam_doneq_mtx;
@@ -892,7 +895,10 @@
TAILQ_INIT(&xsoftc.xpt_busses);
TAILQ_INIT(&xsoftc.ccb_scanq);
STAILQ_INIT(&xsoftc.highpowerq);
- xsoftc.num_highpower = CAM_MAX_HIGHPOWER;
+
+ /* Fall back to a default if the kenv tunable isn't set */
+ if (xsoftc.num_highpower == 0)
+ xsoftc.num_highpower = CAM_MAX_HIGHPOWER;
mtx_init(&xsoftc.xpt_highpower_lock, "XPT highpower lock", NULL, MTX_DEF);
xsoftc.xpt_taskq = taskqueue_create("CAM XPT task", M_WAITOK,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:23 PM (3 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31699185
Default Alt Text
D56462.diff (1 KB)
Attached To
Mode
D56462: cam: kern.cam.max_high_power tuneable / sysctl
Attached
Detach File
Event Timeline
Log In to Comment