cxgbe(4): sysctl to track the last L1_CFG32 requested by the driver.
dev.<port>.<inst>.rcaps # sysctl dev.cc | grep rcaps dev.cc.1.rcaps: 581107776 dev.cc.0.rcaps: 582156414 MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
b2bf1a5787
commit
d99b1d83b9
@ -444,6 +444,7 @@ struct link_config {
|
||||
int8_t requested_fc; /* flow control */
|
||||
int8_t requested_fec; /* FEC */
|
||||
u_int requested_speed; /* speed (Mbps) */
|
||||
uint32_t requested_caps;/* rcap in last l1cfg issued by the driver. */
|
||||
|
||||
uint32_t pcaps; /* link capabilities */
|
||||
uint32_t acaps; /* advertised capabilities */
|
||||
|
@ -3975,6 +3975,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
|
||||
c.u.l1cfg.rcap = cpu_to_be32(fwcaps32_to_caps16(rcap));
|
||||
}
|
||||
|
||||
lc->requested_caps = rcap;
|
||||
return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL);
|
||||
}
|
||||
|
||||
|
@ -5703,6 +5703,7 @@ init_link_config(struct port_info *pi)
|
||||
|
||||
PORT_LOCK_ASSERT_OWNED(pi);
|
||||
|
||||
lc->requested_caps = 0;
|
||||
lc->requested_speed = 0;
|
||||
|
||||
if (t4_autoneg == 0)
|
||||
@ -7770,6 +7771,8 @@ cxgbe_sysctls(struct port_info *pi)
|
||||
sysctl_autoneg, "I",
|
||||
"autonegotiation (-1 = not supported)");
|
||||
|
||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rcaps", CTLFLAG_RD,
|
||||
&pi->link_cfg.requested_caps, 0, "L1 config requested by driver");
|
||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "pcaps", CTLFLAG_RD,
|
||||
&pi->link_cfg.pcaps, 0, "port capabilities");
|
||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "acaps", CTLFLAG_RD,
|
||||
|
Loading…
Reference in New Issue
Block a user