|
|
@@ -475,8 +475,9 @@ static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
|
|
|
if (fc & FLOW_RX) {
|
|
|
pr_debug("\tReceive Flow-Control ON\n");
|
|
|
flow |= GMAC_RX_FLOW_CTRL_RFE;
|
|
|
- writel(flow, ioaddr + GMAC_RX_FLOW_CTRL);
|
|
|
}
|
|
|
+ writel(flow, ioaddr + GMAC_RX_FLOW_CTRL);
|
|
|
+
|
|
|
if (fc & FLOW_TX) {
|
|
|
pr_debug("\tTransmit Flow-Control ON\n");
|
|
|
|
|
|
@@ -484,7 +485,7 @@ static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
|
|
|
pr_debug("\tduplex mode: PAUSE %d\n", pause_time);
|
|
|
|
|
|
for (queue = 0; queue < tx_cnt; queue++) {
|
|
|
- flow |= GMAC_TX_FLOW_CTRL_TFE;
|
|
|
+ flow = GMAC_TX_FLOW_CTRL_TFE;
|
|
|
|
|
|
if (duplex)
|
|
|
flow |=
|
|
|
@@ -492,6 +493,9 @@ static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
|
|
|
|
|
|
writel(flow, ioaddr + GMAC_QX_TX_FLOW_CTRL(queue));
|
|
|
}
|
|
|
+ } else {
|
|
|
+ for (queue = 0; queue < tx_cnt; queue++)
|
|
|
+ writel(0, ioaddr + GMAC_QX_TX_FLOW_CTRL(queue));
|
|
|
}
|
|
|
}
|
|
|
|