From 3c08665c2cf6c7ef11ba0000493185665acb8e45 Mon Sep 17 00:00:00 2001 From: Don Fry Date: Thu, 27 May 2004 06:07:05 -0400 Subject: [PATCH] [PATCH] pcnet32: fix for patch 8 le16_to_cpu Joe Perches pointed out an error in patch 8. As I looked at the results closer 3 out of 4 looked correct. This fixes the output for the last case. Output is now the same on IA32 and PPC64 hardware. --- drivers/net/pcnet32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 25aa1180d15d0..511bc109b6de0 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -1635,15 +1635,15 @@ pcnet32_tx_timeout (struct net_device *dev) for (i = 0 ; i < RX_RING_SIZE; i++) printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ", le32_to_cpu(lp->rx_ring[i].base), - le16_to_cpu(-lp->rx_ring[i].buf_length), + (-le16_to_cpu(lp->rx_ring[i].buf_length)) & 0xffff, le32_to_cpu(lp->rx_ring[i].msg_length), - le16_to_cpu((unsigned)lp->rx_ring[i].status)); + le16_to_cpu(lp->rx_ring[i].status)); for (i = 0 ; i < TX_RING_SIZE; i++) printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ", le32_to_cpu(lp->tx_ring[i].base), - le16_to_cpu(-lp->tx_ring[i].length), + (-le16_to_cpu(lp->tx_ring[i].length)) & 0xffff, le32_to_cpu(lp->tx_ring[i].misc), - le16_to_cpu((unsigned)lp->tx_ring[i].status)); + le16_to_cpu(lp->tx_ring[i].status)); printk("\n"); } pcnet32_restart(dev, 0x0042); -- 2.53.0