The writing of the data should implicitly truncate the data to 8bits, so do not bother with the ands in the code. Signed-off-by: Ben Dooks Index: linux-2.6.24-quilt3/drivers/net/dm9000.c =================================================================== --- linux-2.6.24-quilt3.orig/drivers/net/dm9000.c +++ linux-2.6.24-quilt3/drivers/net/dm9000.c @@ -817,8 +817,8 @@ dm9000_start_xmit(struct sk_buff *skb, s /* TX control: First packet immediately send, second packet queue */ if (db->tx_pkt_cnt == 1) { /* Set TX length to DM9000 */ - iow(db, DM9000_TXPLL, skb->len & 0xff); - iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff); + iow(db, DM9000_TXPLL, skb->len); + iow(db, DM9000_TXPLH, skb->len >> 8); /* Issue TX polling command */ iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */ @@ -893,8 +893,8 @@ dm9000_tx_done(struct net_device *dev, b /* Queue packet check & send */ if (db->tx_pkt_cnt > 0) { - iow(db, DM9000_TXPLL, db->queue_pkt_len & 0xff); - iow(db, DM9000_TXPLH, (db->queue_pkt_len >> 8) & 0xff); + iow(db, DM9000_TXPLL, db->queue_pkt_len); + iow(db, DM9000_TXPLH, db->queue_pkt_len >> 8); iow(db, DM9000_TCR, TCR_TXREQ); dev->trans_start = jiffies; } @@ -1278,8 +1278,8 @@ dm9000_phy_write(struct net_device *dev, iow(db, DM9000_EPAR, DM9000_PHY | reg); /* Fill the written data into REG_0D & REG_0E */ - iow(db, DM9000_EPDRL, (value & 0xff)); - iow(db, DM9000_EPDRH, ((value >> 8) & 0xff)); + iow(db, DM9000_EPDRL, value); + iow(db, DM9000_EPDRH, value >> 8); iow(db, DM9000_EPCR, 0xa); /* Issue phyxcer write command */ -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html