summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym/sym_conf.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sym/sym_conf.h')
-rw-r--r--sys/dev/sym/sym_conf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sym/sym_conf.h b/sys/dev/sym/sym_conf.h
index aa486d4..b1b2102 100644
--- a/sys/dev/sym/sym_conf.h
+++ b/sys/dev/sym/sym_conf.h
@@ -90,11 +90,12 @@
#define SYM_CONF_DMA_BOUNDARY (1UL << 24)
/*
- * Max number of scatter/gather entries for en IO.
+ * Max number of scatter/gather entries for an I/O.
* Each entry costs 8 bytes in the internal CCB data structure.
- * For now 65 should suffice given the BSD O/Ses capabilities.
+ * We use at most 33 segments but also no more than required for handling
+ * MAXPHYS.
*/
-#define SYM_CONF_MAX_SG (33)
+#define SYM_CONF_MAX_SG (MIN(33, (MAXPHYS / PAGE_SIZE) + 1))
/*
* Max number of targets.
OpenPOWER on IntegriCloud