aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPravin M. Bathija <pbathija@amcc.com>2008-03-14 05:52:28 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-17 08:06:33 -0400
commit4373c9327f10c362f13d5b78557f93a471211a42 (patch)
tree4d3ac3b31b36d4fe8617d49ce93bb6b981e066e5 /drivers/net
parent16bb547e130bad47c16852f353f5501cf4b9b35a (diff)
NEWEMAC: fix support for pause packets
Problem Description and Fix --------------------------- When a pause packet(with destination as reserved Multicast address) is received by the EMAC hardware to control the flow of frames being transmitted by it, it is dropped by the hardware unless the reserved Multicast address is hashed in to the GAHT[1-4] registers. This code fix adds the default reserved multicast address to the GAHT[1-4] registers in the EMAC(s) present on the chip. The flow control with Pause packets will only work if the following register bits are programmed in EMAC: EMACx_MR1[APP] = 1 EMACx_RMR[BAE] = 1 EMACx_RMR[MAE] = 1 Behavior that may be observed in a running system ------------------------------------------------- A host transferring data from a PPC based system may send a Pause packet to the PPC EMAC requesting it to slow down the flow of packets. If the default reserved multicast MAC address is not programmed into the GAHT[1-4] registers this Pause packet will be dropped by PPC EMAC and no Flow Control will be done. Signed-off-by: Pravin M. Bathija <pbathija@amcc.com> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ibm_newemac/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index e6c69f77259b..0789802d59ed 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -143,6 +143,10 @@ static inline void emac_report_timeout_error(struct emac_instance *dev,
143#define STOP_TIMEOUT_1000 13 143#define STOP_TIMEOUT_1000 13
144#define STOP_TIMEOUT_1000_JUMBO 73 144#define STOP_TIMEOUT_1000_JUMBO 73
145 145
146static unsigned char default_mcast_addr[] = {
147 0x01, 0x80, 0xC2, 0x00, 0x00, 0x01
148};
149
146/* Please, keep in sync with struct ibm_emac_stats/ibm_emac_error_stats */ 150/* Please, keep in sync with struct ibm_emac_stats/ibm_emac_error_stats */
147static const char emac_stats_keys[EMAC_ETHTOOL_STATS_COUNT][ETH_GSTRING_LEN] = { 151static const char emac_stats_keys[EMAC_ETHTOOL_STATS_COUNT][ETH_GSTRING_LEN] = {
148 "rx_packets", "rx_bytes", "tx_packets", "tx_bytes", "rx_packets_csum", 152 "rx_packets", "rx_bytes", "tx_packets", "tx_bytes", "rx_packets_csum",
@@ -618,6 +622,9 @@ static int emac_configure(struct emac_instance *dev)
618 if (emac_phy_gpcs(dev->phy.mode)) 622 if (emac_phy_gpcs(dev->phy.mode))
619 emac_mii_reset_phy(&dev->phy); 623 emac_mii_reset_phy(&dev->phy);
620 624
625 /* Required for Pause packet support in EMAC */
626 dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1);
627
621 return 0; 628 return 0;
622} 629}
623 630