diff options
author | Sriram <srk@ti.com> | 2009-09-24 15:15:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-25 16:43:49 -0400 |
commit | 43c2ed8e9e2d285be49d7ea1afc05071d5d7b0f9 (patch) | |
tree | dea325fefb4e6c1b80f2d10f8a509c18706bd905 /drivers/net/davinci_emac.c | |
parent | c0181d420cc1a506ca4418ce90e2ad89831eee2c (diff) |
TI Davinci EMAC: Fix in vector definition for EMAC_VERSION_2
In the emac_poll function when looking for interrupt status masks
correct definition must be chosen based on EMAC_VERSION(the bit
mask has changed from version 1 to version 2).
Signed-off-by: Sriram <srk@ti.com>
Acked-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r-- | drivers/net/davinci_emac.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index d465eaa796c4..65a2d0ba64e2 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -200,6 +200,9 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1"; | |||
200 | /** NOTE:: For DM646x the IN_VECTOR has changed */ | 200 | /** NOTE:: For DM646x the IN_VECTOR has changed */ |
201 | #define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC BIT(EMAC_DEF_RX_CH) | 201 | #define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC BIT(EMAC_DEF_RX_CH) |
202 | #define EMAC_DM646X_MAC_IN_VECTOR_TX_INT_VEC BIT(16 + EMAC_DEF_TX_CH) | 202 | #define EMAC_DM646X_MAC_IN_VECTOR_TX_INT_VEC BIT(16 + EMAC_DEF_TX_CH) |
203 | #define EMAC_DM646X_MAC_IN_VECTOR_HOST_INT BIT(26) | ||
204 | #define EMAC_DM646X_MAC_IN_VECTOR_STATPEND_INT BIT(27) | ||
205 | |||
203 | 206 | ||
204 | /* CPPI bit positions */ | 207 | /* CPPI bit positions */ |
205 | #define EMAC_CPPI_SOP_BIT BIT(31) | 208 | #define EMAC_CPPI_SOP_BIT BIT(31) |
@@ -2167,7 +2170,11 @@ static int emac_poll(struct napi_struct *napi, int budget) | |||
2167 | emac_int_enable(priv); | 2170 | emac_int_enable(priv); |
2168 | } | 2171 | } |
2169 | 2172 | ||
2170 | if (unlikely(status & EMAC_DM644X_MAC_IN_VECTOR_HOST_INT)) { | 2173 | mask = EMAC_DM644X_MAC_IN_VECTOR_HOST_INT; |
2174 | if (priv->version == EMAC_VERSION_2) | ||
2175 | mask = EMAC_DM646X_MAC_IN_VECTOR_HOST_INT; | ||
2176 | |||
2177 | if (unlikely(status & mask)) { | ||
2171 | u32 ch, cause; | 2178 | u32 ch, cause; |
2172 | dev_err(emac_dev, "DaVinci EMAC: Fatal Hardware Error\n"); | 2179 | dev_err(emac_dev, "DaVinci EMAC: Fatal Hardware Error\n"); |
2173 | netif_stop_queue(ndev); | 2180 | netif_stop_queue(ndev); |