From c553931b80f5cc1cb27514ef9f90c2fcf0a8cf14 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sun, 19 Jul 2009 02:09:52 -0400 Subject: Load glxsb by default, unless disabled. Add option to disable to System -> Advanced. --- etc/inc/pfsense-utils.inc | 21 ++++++++++++++++++++- etc/rc.bootup | 3 +++ usr/local/www/system_advanced.php | 21 ++++++++++++++++++++- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d5559eb..445596e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -854,6 +854,25 @@ function get_interface_mac_address($interface) { } } +/****f* pfsense-utils/setup_glxsb + * NAME + * setup_glxsb - loads or unloads glxsb module as needed + * INPUTS + * null + * RESULT + * null + ******/ +function setup_glxsb() { + global $config, $g; + $is_loaded = `/sbin/kldstat | /usr/bin/grep -c glxsb`; + if (!isset($config['system']['disableglxsb']) && ($is_loaded == 0)) { + mwexec("/sbin/kldload glxsb"); + } elseif (isset($config['system']['disableglxsb']) && ($is_loaded > 0)) { + mwexec("/sbin/kldunload glxsb"); + } + +} + /****f* pfsense-utils/return_dir_as_array * NAME * return_dir_as_array - Return a directory's contents as an array. @@ -3857,4 +3876,4 @@ function is_fqdn($fqdn) { } -?> +?> \ No newline at end of file diff --git a/etc/rc.bootup b/etc/rc.bootup index 972bdb0..e92ca92 100755 --- a/etc/rc.bootup +++ b/etc/rc.bootup @@ -304,6 +304,9 @@ function rescue_detect_keypress() { echo "Setting up microcode and tx/rx offloading..."; setup_microcode(); echo "done.\n"; + + /* load glxsb unless it's disabled */ + setup_glxsb(); mwexec("/sbin/pfctl -f /tmp/rules.debug"); diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index ae15b18..cbe227b 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -60,6 +60,7 @@ $pconfig['polling_enable'] = isset($config['system']['polling']); $pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); $pconfig['disablenatreflection'] = $config['system']['disablenatreflection']; $pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']); +$pconfig['disableglxsb'] = isset($config['system']['disableglxsb']); $pconfig['disablescrub'] = isset($config['system']['disablescrub']); $pconfig['shapertype'] = $config['system']['shapertype']; $pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']); @@ -238,6 +239,14 @@ if ($_POST) { unset($config['system']['disablechecksumoffloading']); setup_microcode(); } + + if($_POST['disableglxsb'] == "yes") { + $config['system']['disableglxsb'] = $_POST['disableglxsb']; + setup_glxsb(); + } else { + unset($config['system']['disableglxsb']); + setup_glxsb(); + } if($_POST['disablescrub'] == "yes") { $config['system']['disablescrub'] = $_POST['disablescrub']; @@ -689,7 +698,7 @@ include("head.inc");   - Hardware Checksum Offloading + Hardware Options Disable Hardware Checksum Offloading @@ -697,7 +706,17 @@ include("head.inc"); onclick="enable_change(false)" /> Checking this option will disable hardware checksum offloading. Checksum offloading is broken in some hardware, particularly some Realtek cards. Rarely, drivers may have problems with checksum offloading and some specific NICs. + + + Disable glxsb loading + + onclick="enable_change(false)" /> + Checking this option will disable loading of the glxsb driver. +
+ The glxsb crypto accelerator is found on some Geode platforms (PC Engines ALIX among others). When using a better crypto card such as a Hifn, you will want to disable the glxsb. If this device is currently in use, YOU MUST REBOOT for it to be unloaded. + +   -- cgit v1.1