mirror of https://gitee.com/openkylin/linux.git
e1000: display flow control of link status at link up
Print RX/TX flow control setting at link up time to display the actual link FC properties instead of the advertised values. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
parent
60cba200f1
commit
9669f53b98
|
@ -2583,15 +2583,22 @@ e1000_watchdog(unsigned long data)
|
||||||
|
|
||||||
if (link) {
|
if (link) {
|
||||||
if (!netif_carrier_ok(netdev)) {
|
if (!netif_carrier_ok(netdev)) {
|
||||||
|
uint32_t ctrl;
|
||||||
boolean_t txb2b = 1;
|
boolean_t txb2b = 1;
|
||||||
e1000_get_speed_and_duplex(&adapter->hw,
|
e1000_get_speed_and_duplex(&adapter->hw,
|
||||||
&adapter->link_speed,
|
&adapter->link_speed,
|
||||||
&adapter->link_duplex);
|
&adapter->link_duplex);
|
||||||
|
|
||||||
DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s\n",
|
ctrl = E1000_READ_REG(&adapter->hw, CTRL);
|
||||||
adapter->link_speed,
|
DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s, "
|
||||||
adapter->link_duplex == FULL_DUPLEX ?
|
"Flow Control: %s\n",
|
||||||
"Full Duplex" : "Half Duplex");
|
adapter->link_speed,
|
||||||
|
adapter->link_duplex == FULL_DUPLEX ?
|
||||||
|
"Full Duplex" : "Half Duplex",
|
||||||
|
((ctrl & E1000_CTRL_TFCE) && (ctrl &
|
||||||
|
E1000_CTRL_RFCE)) ? "RX/TX" : ((ctrl &
|
||||||
|
E1000_CTRL_RFCE) ? "RX" : ((ctrl &
|
||||||
|
E1000_CTRL_TFCE) ? "TX" : "None" )));
|
||||||
|
|
||||||
/* tweak tx_queue_len according to speed/duplex
|
/* tweak tx_queue_len according to speed/duplex
|
||||||
* and adjust the timeout factor */
|
* and adjust the timeout factor */
|
||||||
|
|
Loading…
Reference in New Issue