netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10 2.4.27-pre3] pcnet32: fix for patch 8 le16_to_cpu
@ 2004-05-27 17:43 Don Fry
  2004-05-27 18:07 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Don Fry @ 2004-05-27 17:43 UTC (permalink / raw)
  To: tsbogend, jgarzik, netdev

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.

--- linux-2.4.27-pre3/drivers/net/wake.pcnet32.c	Wed May 26 12:30:42 2004
+++ linux-2.4.27-pre3/drivers/net/pcnet32.c	Wed May 26 14:26:49 2004
@@ -1634,15 +1634,15 @@
 	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);

-- 
Don Fry
brazilnut@us.ibm.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-27 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-27 17:43 [PATCH 10 2.4.27-pre3] pcnet32: fix for patch 8 le16_to_cpu Don Fry
2004-05-27 18:07 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).