summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2008-03-26 05:57:12 +0000
committerJeff Garzik <jeff@garzik.org>2008-04-04 17:26:16 -0400
commit30ecce908b944079181938e61ddbc00c8b23798c (patch)
tree3f19b22d2b9f9aabec197d7d48fcd756df0456ba
parente28e3a614cedb11637f6cc7a30f0812963df62fe (diff)
downloadlinux-30ecce908b944079181938e61ddbc00c8b23798c.tar.gz
linux-30ecce908b944079181938e61ddbc00c8b23798c.tar.bz2
linux-30ecce908b944079181938e61ddbc00c8b23798c.zip
fix endian lossage in forcedeth
a) if you initialize something with le32_to_cpu(...), then |= it with host-endian and feed to cpu_to_le32(), it's most definitely *not* __le32. As sparse would've told you... b) the whole sequence is |= cpu_to_le32(host-endian constant) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/forcedeth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 980c2c229a71..419f533006ab 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2112,9 +2112,8 @@ static inline void nv_tx_flip_ownership(struct net_device *dev)
np->tx_pkts_in_progress--;
if (np->tx_change_owner) {
- __le32 flaglen = le32_to_cpu(np->tx_change_owner->first_tx_desc->flaglen);
- flaglen |= NV_TX2_VALID;
- np->tx_change_owner->first_tx_desc->flaglen = cpu_to_le32(flaglen);
+ np->tx_change_owner->first_tx_desc->flaglen |=
+ cpu_to_le32(NV_TX2_VALID);
np->tx_pkts_in_progress++;
np->tx_change_owner = np->tx_change_owner->next_tx_ctx;