kern/173584: [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to force firmware "updates" at module load
Garrett Cooper
yanegomi at gmail.com
Mon Nov 12 19:20:00 UTC 2012
>Number: 173584
>Category: kern
>Synopsis: [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to force firmware "updates" at module load
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 12 19:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 9.1-STABLE
>Organization:
EMC Isilon
>Environment:
FreeBSD wf158.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Tue Nov 6 14:00:42 PST 2012 root at wf158.west.isilon.com:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
The attached patch adds a tunable which forces a firmware update in order to ensure that when the driver is loaded, if it's running a newer version of firmware it can be downgraded to an older version. Example:
# kenv hw.cxgbe.force_firmware_install=1
# kldload if_cxgbe
# sysctl dev.t4nex.0.firmware_version
dev.t4nex.0.firmware_version: 1.6.2.0
The firmware version provided on the card was newer before (1.7.x IIRC).
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: sys/dev/cxgbe/t4_main.c
===================================================================
--- sys/dev/cxgbe/t4_main.c (revision 242655)
+++ sys/dev/cxgbe/t4_main.c (working copy)
@@ -234,6 +234,9 @@
static int t4_fcoecaps_allowed = 0;
TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", &t4_fcoecaps_allowed);
+static int t4_force_firmware_install = 0;
+TUNABLE_INT("hw.cxgbe.force_firmware_install", &t4_force_firmware_install);
+
struct intrs_and_queues {
int intr_type; /* INTx, MSI, or MSI-X */
int nirq; /* Number of vectors */
@@ -1576,9 +1579,10 @@
/*
* Always upgrade, even for minor/micro/build mismatches.
* Downgrade only for a major version mismatch or if
- * force_firmware_install was specified.
+ * t4_force_firmware_install was specified.
*/
- if (fw != NULL && (rc < 0 || v > sc->params.fw_vers)) {
+ if (fw != NULL &&
+ (t4_force_firmware_install || rc < 0 || v > sc->params.fw_vers)) {
device_printf(sc->dev,
"installing firmware %d.%d.%d.%d on card.\n",
G_FW_HDR_FW_VER_MAJOR(v), G_FW_HDR_FW_VER_MINOR(v),
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list