[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130425074420.GA11880@elgon.mountain>
Date: Thu, 25 Apr 2013 10:44:20 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Grant Likely <grant.likely@...aro.org>
Cc: Rob Herring <rob.herring@...xeda.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Fabio Estevam <fabio.estevam@...escale.com>,
Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
devicetree-discuss@...ts.ozlabs.org,
kernel-janitors@...r.kernel.org
Subject: [patch -next] net: calxedaxgmac: fix condition in
xgmac_set_features()
The "changed" variable should be a 64 bit type, otherwise it can't store
all the features. The way the code is now the test for whether
NETIF_F_RXCSUM changed is always false and we return immediately.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index 791e5ff..4a1f2fa 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t features
u32 ctrl;
struct xgmac_priv *priv = netdev_priv(dev);
void __iomem *ioaddr = priv->base;
- u32 changed = dev->features ^ features;
+ netdev_features_t changed = dev->features ^ features;
if (!(changed & NETIF_F_RXCSUM))
return 0;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists