From: Sriram Date: Thu, 24 Sep 2009 19:15:18 +0000 (+0000) Subject: TI Davinci EMAC: Fix in vector definition for EMAC_VERSION_2 X-Git-Tag: MMI-PSA29.97-13-9~25857^2~283 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43c2ed8e9e2d285be49d7ea1afc05071d5d7b0f9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Chaithrika U S Signed-off-by: David S. Miller --- 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"; /** NOTE:: For DM646x the IN_VECTOR has changed */ #define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC BIT(EMAC_DEF_RX_CH) #define EMAC_DM646X_MAC_IN_VECTOR_TX_INT_VEC BIT(16 + EMAC_DEF_TX_CH) +#define EMAC_DM646X_MAC_IN_VECTOR_HOST_INT BIT(26) +#define EMAC_DM646X_MAC_IN_VECTOR_STATPEND_INT BIT(27) + /* CPPI bit positions */ #define EMAC_CPPI_SOP_BIT BIT(31) @@ -2167,7 +2170,11 @@ static int emac_poll(struct napi_struct *napi, int budget) emac_int_enable(priv); } - if (unlikely(status & EMAC_DM644X_MAC_IN_VECTOR_HOST_INT)) { + mask = EMAC_DM644X_MAC_IN_VECTOR_HOST_INT; + if (priv->version == EMAC_VERSION_2) + mask = EMAC_DM646X_MAC_IN_VECTOR_HOST_INT; + + if (unlikely(status & mask)) { u32 ch, cause; dev_err(emac_dev, "DaVinci EMAC: Fatal Hardware Error\n"); netif_stop_queue(ndev);