summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2011-04-01 00:40:24 +0000
committernp <np@FreeBSD.org>2011-04-01 00:40:24 +0000
commit38b3395cc3edfb28d20ffecb12d75acdec5aa22e (patch)
tree5cb83bf2aa2161c9cbc0caadbec369eb2d370e0a
parent85e106aaaa58f10650db90c3acb54fa241ca19b0 (diff)
downloadFreeBSD-src-38b3395cc3edfb28d20ffecb12d75acdec5aa22e.zip
FreeBSD-src-38b3395cc3edfb28d20ffecb12d75acdec5aa22e.tar.gz
Update header and related code for firmware 1.3.8
MFC after: 3 days
-rw-r--r--sys/dev/cxgbe/common/common.h2
-rw-r--r--sys/dev/cxgbe/common/t4fw_interface.h40
-rw-r--r--sys/dev/cxgbe/t4_main.c6
3 files changed, 28 insertions, 20 deletions
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index 4a7203c..fa5ac9f 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -54,7 +54,7 @@ enum {
#define FW_VERSION_MAJOR 1
#define FW_VERSION_MINOR 3
-#define FW_VERSION_MICRO 0
+#define FW_VERSION_MICRO 8
struct port_stats {
u64 tx_octets; /* total # of octets in good frames */
diff --git a/sys/dev/cxgbe/common/t4fw_interface.h b/sys/dev/cxgbe/common/t4fw_interface.h
index 5fac13c..88126be 100644
--- a/sys/dev/cxgbe/common/t4fw_interface.h
+++ b/sys/dev/cxgbe/common/t4fw_interface.h
@@ -47,7 +47,7 @@ enum fw_retval {
FW_ENOSYS = 38, /* functionality not implemented */
FW_EPROTO = 71, /* protocol error */
FW_ETIMEDOUT = 110, /* timeout */
- FW_TIMEDOUT = 110, /* timeout */
+ FW_EINPROGRESS = 115, /* fw internal */
FW_SCSI_ABORT_REQUESTED = 128, /* */
FW_SCSI_ABORT_TIMEDOUT = 129, /* */
FW_SCSI_ABORTED = 130, /* */
@@ -3934,13 +3934,11 @@ enum fw_port_cap {
FW_PORT_CAP_FC_RX = 0x0040,
FW_PORT_CAP_FC_TX = 0x0080,
FW_PORT_CAP_ANEG = 0x0100,
- FW_PORT_CAP_MDI_0 = 0x0200,
- FW_PORT_CAP_MDI_1 = 0x0400,
- FW_PORT_CAP_BEAN = 0x0800,
- FW_PORT_CAP_PMA_LPBK = 0x1000,
- FW_PORT_CAP_PCS_LPBK = 0x2000,
- FW_PORT_CAP_PHYXS_LPBK = 0x4000,
- FW_PORT_CAP_FAR_END_LPBK = 0x8000,
+ FW_PORT_CAP_MDIX = 0x0200,
+ FW_PORT_CAP_MDIAUTO = 0x0400,
+ FW_PORT_CAP_FEC = 0x0800,
+ FW_PORT_CAP_TECHKR = 0x1000,
+ FW_PORT_CAP_TECHKX4 = 0x2000,
};
#define S_FW_PORT_CAP_SPEED 0
@@ -3955,6 +3953,12 @@ enum fw_port_cap {
#define G_FW_PORT_CAP_FC(x) \
(((x) >> S_FW_PORT_CAP_FC) & M_FW_PORT_CAP_FC)
+#define S_FW_PORT_CAP_ANEG 8
+#define M_FW_PORT_CAP_ANEG 0x1
+#define V_FW_PORT_CAP_ANEG(x) ((x) << S_FW_PORT_CAP_ANEG)
+#define G_FW_PORT_CAP_ANEG(x) \
+ (((x) >> S_FW_PORT_CAP_ANEG) & M_FW_PORT_CAP_ANEG)
+
enum fw_port_mdi {
FW_PORT_CAP_MDI_UNCHANGED,
FW_PORT_CAP_MDI_AUTO,
@@ -4253,16 +4257,16 @@ enum fw_port_type {
/* These are read from module's EEPROM and determined once the
module is inserted. */
enum fw_port_module_type {
- FW_PORT_MOD_TYPE_NA,
- FW_PORT_MOD_TYPE_LR = 0x1,
- FW_PORT_MOD_TYPE_SR = 0x2,
- FW_PORT_MOD_TYPE_ER = 0x3,
- FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4,
- FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5,
-
- FW_PORT_MOD_TYPE_LRM = 0x6,
-
- FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE
+ FW_PORT_MOD_TYPE_NA = 0x0,
+ FW_PORT_MOD_TYPE_LR = 0x1,
+ FW_PORT_MOD_TYPE_SR = 0x2,
+ FW_PORT_MOD_TYPE_ER = 0x3,
+ FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4,
+ FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5,
+ FW_PORT_MOD_TYPE_LRM = 0x6,
+ FW_PORT_MOD_TYPE_UNKNOWN = M_FW_PORT_CMD_MODTYPE - 2,
+ FW_PORT_MOD_TYPE_NOTSUPPORTED = M_FW_PORT_CMD_MODTYPE - 1,
+ FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE
};
/* used by FW and tools may use this to generate VPD */
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index ab4879a..3baaf0c 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2748,11 +2748,15 @@ t4_os_portmod_changed(const struct adapter *sc, int idx)
{
struct port_info *pi = sc->port[idx];
static const char *mod_str[] = {
- NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX"
+ NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX", "LRM"
};
if (pi->mod_type == FW_PORT_MOD_TYPE_NONE)
if_printf(pi->ifp, "transceiver unplugged.\n");
+ else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN)
+ if_printf(pi->ifp, "unknown transceiver inserted.\n");
+ else if (pi->mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED)
+ if_printf(pi->ifp, "unsupported transceiver inserted.\n");
else if (pi->mod_type > 0 && pi->mod_type < ARRAY_SIZE(mod_str)) {
if_printf(pi->ifp, "%s transceiver inserted.\n",
mod_str[pi->mod_type]);
OpenPOWER on IntegriCloud