Date: Thu, 9 Nov 2017 15:35:51 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325596 - head/sys/dev/cxgbe/common Message-ID: <201711091535.vA9FZp6Q045036@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Nov 9 15:35:51 2017 New Revision: 325596 URL: https://svnweb.freebsd.org/changeset/base/325596 Log: cxgbe(4): Do not request settings not supported by the port. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Thu Nov 9 14:31:25 2017 (r325595) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Nov 9 15:35:51 2017 (r325596) @@ -3682,7 +3682,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m { struct fw_port_cmd c; unsigned int mdi = V_FW_PORT_CAP_MDI(FW_PORT_CAP_MDI_AUTO); - unsigned int aneg, fc, fec, speed; + unsigned int aneg, fc, fec, speed, rcap; fc = 0; if (lc->requested_fc & PAUSE_RX) @@ -3727,6 +3727,13 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m V_FW_PORT_CAP_SPEED(M_FW_PORT_CAP_SPEED); } + rcap = aneg | speed | fc | fec | mdi; + if ((rcap | lc->supported) != lc->supported) { + CH_WARN(adap, "rcap 0x%08x, pcap 0x%08x\n", rcap, + lc->supported); + rcap &= lc->supported; + } + memset(&c, 0, sizeof(c)); c.op_to_portid = cpu_to_be32(V_FW_CMD_OP(FW_PORT_CMD) | F_FW_CMD_REQUEST | F_FW_CMD_EXEC | @@ -3734,7 +3741,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m c.action_to_len16 = cpu_to_be32(V_FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) | FW_LEN16(c)); - c.u.l1cfg.rcap = cpu_to_be32(aneg | speed | fc | fec | mdi); + c.u.l1cfg.rcap = cpu_to_be32(rcap); return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711091535.vA9FZp6Q045036>