Page MenuHomeFreeBSD

D42588.id.diff
No OneTemporary

D42588.id.diff

diff --git a/sys/dev/mpi3mr/mpi3mr.h b/sys/dev/mpi3mr/mpi3mr.h
--- a/sys/dev/mpi3mr/mpi3mr.h
+++ b/sys/dev/mpi3mr/mpi3mr.h
@@ -555,8 +555,7 @@
uint32_t chain_frame_size;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
- char fw_version[16];
- char msg_version[8];
+ char fw_version[32];
struct mpi3mr_chain *chains;
struct callout periodic;
struct callout device_check_callout;
diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c
--- a/sys/dev/mpi3mr/mpi3mr.c
+++ b/sys/dev/mpi3mr/mpi3mr.c
@@ -1564,6 +1564,7 @@
{
int retval = 0;
U32 ioc_config, req_sz, facts_flags;
+ struct mpi3mr_compimg_ver *fwver;
if (le16toh(facts_data->IOCFactsDataLength) !=
(sizeof(*facts_data) / 4)) {
@@ -1660,6 +1661,12 @@
sc->io_throttle_high = (sc->facts.io_throttle_high * 2 * 1024);
sc->io_throttle_low = (sc->facts.io_throttle_low * 2 * 1024);
+ fwver = &sc->facts.fw_ver;
+ snprintf(sc->fw_version, sizeof(sc->fw_version),
+ "%d.%d.%d.%d.%05d-%05d",
+ fwver->gen_major, fwver->gen_minor, fwver->ph_major,
+ fwver->ph_minor, fwver->cust_id, fwver->build_num);
+
mpi3mr_dprint(sc, MPI3MR_INFO, "ioc_num(%d), maxopQ(%d), maxopRepQ(%d), maxdh(%d),"
"maxreqs(%d), mindh(%d) maxPDs(%d) maxvectors(%d) maxperids(%d)\n",
sc->facts.ioc_num, sc->facts.max_op_req_q,
@@ -1675,7 +1682,7 @@
sc->facts.max_dev_per_tg, sc->facts.max_io_throttle_group,
sc->facts.io_throttle_data_length * 4,
sc->facts.io_throttle_high, sc->facts.io_throttle_low);
-
+
sc->max_host_ios = sc->facts.max_reqs -
(MPI3MR_INTERNALCMDS_RESVD + 1);
@@ -2219,7 +2226,6 @@
{
int i = 0;
char personality[16];
- struct mpi3mr_compimg_ver *fwver = &sc->facts.fw_ver;
switch (sc->facts.personality) {
case MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA:
@@ -2235,9 +2241,7 @@
mpi3mr_dprint(sc, MPI3MR_INFO, "Current Personality: %s\n", personality);
- mpi3mr_dprint(sc, MPI3MR_INFO, "FW Version: %d.%d.%d.%d.%05d-%05d\n",
- fwver->gen_major, fwver->gen_minor, fwver->ph_major,
- fwver->ph_minor, fwver->cust_id, fwver->build_num);
+ mpi3mr_dprint(sc, MPI3MR_INFO, "%s\n", sc->fw_version);
mpi3mr_dprint(sc, MPI3MR_INFO, "Protocol=(");
@@ -2880,7 +2884,6 @@
sc->reply_sz = sc->facts.reply_sz;
}
-
mpi3mr_display_ioc_info(sc);
retval = mpi3mr_reply_alloc(sc);
diff --git a/sys/dev/mpi3mr/mpi3mr_pci.c b/sys/dev/mpi3mr/mpi3mr_pci.c
--- a/sys/dev/mpi3mr/mpi3mr_pci.c
+++ b/sys/dev/mpi3mr/mpi3mr_pci.c
@@ -145,6 +145,10 @@
OID_AUTO, "io_cmds_highwater", CTLFLAG_RD,
&sc->io_cmds_highwater, 0, "Max FW outstanding commands");
+ SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
+ OID_AUTO, "firmware_version", CTLFLAG_RD, sc->fw_version,
+ strlen(sc->fw_version), "firmware version");
+
SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
OID_AUTO, "mpi3mr_debug", CTLFLAG_RW, &sc->mpi3mr_debug, 0,
"Driver debug level");

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 19, 6:55 AM (13 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35225042
Default Alt Text
D42588.id.diff (2 KB)

Event Timeline