Set the trasnmit and receive interrupt masks for the used channels only.

Currently, the EMAC uses only channel 0. Set the interrupt masks accordingly.

Signed-off-by: Chaithrika U S <chaithr...@ti.com>
---
 drivers/net/davinci_emac.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index be63fbe..33a9466 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -215,8 +215,8 @@ static const char emac_version_string[] = "TI DaVinci EMAC 
Linux v6.0";
 /* MAC_IN_VECTOR (0x180) register bit fields */
 #define EMAC_DM644X_MAC_IN_VECTOR_HOST_INT           (0x20000)
 #define EMAC_DM644X_MAC_IN_VECTOR_STATPEND_INT       (0x10000)
-#define EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC         (0xFF00)
-#define EMAC_DM644X_MAC_IN_VECTOR_TX_INT_VEC         (0xFF)
+#define EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC         (0x0100)
+#define EMAC_DM644X_MAC_IN_VECTOR_TX_INT_VEC         (0x01)
 
 /** NOTE:: For DM646x the IN_VECTOR has changed */
 #define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC   (1 << EMAC_DEF_RX_CH)
@@ -2167,7 +2167,6 @@ static int emac_poll(struct napi_struct *napi, int budget)
        /* Check interrupt vectors and call packet processing */
        status = emac_read(EMAC_MACINVECTOR);
 
-       /* Since we support only 1 TX ch, for now check all TX int mask */
        mask = EMAC_DM644X_MAC_IN_VECTOR_TX_INT_VEC;
 
        if (cpu_is_davinci_dm646x())
@@ -2179,7 +2178,6 @@ static int emac_poll(struct napi_struct *napi, int budget)
                                          &txpending);
        } /* TX processing */
 
-       /* Since we support only 1 RX ch, for now check all RX int mask */
        mask = EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC;
 
        if (cpu_is_davinci_dm646x())
-- 
1.5.6

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to