ftgmac100: Remove useless tests in interrupt handler
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 5 Apr 2017 02:28:52 +0000 (12:28 +1000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 19:38:04 +0000 (12:38 -0700)
The interrupt is neither enabled nor registered when the interface
isn't running (regardless of whether we use nc-si or not) so the
test isn't useful.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c

index 2c08bacd066ca151010b6f3e369bdfb890455afd..6625012d734e7e1e4e7dc657028943d1890e877f 100644 (file)
@@ -1049,14 +1049,9 @@ static irqreturn_t ftgmac100_interrupt(int irq, void *dev_id)
        struct net_device *netdev = dev_id;
        struct ftgmac100 *priv = netdev_priv(netdev);
 
-       /* When running in NCSI mode, the interface should be ready for
-        * receiving or transmitting NCSI packets before it's opened.
-        */
-       if (likely(priv->use_ncsi || netif_running(netdev))) {
-               /* Disable interrupts for polling */
-               iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
-               napi_schedule(&priv->napi);
-       }
+       /* Disable interrupts for polling */
+       iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
+       napi_schedule(&priv->napi);
 
        return IRQ_HANDLED;
 }