netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/5 2.6.6-bk8] pcnet32: correct printk for big-endian arch
@ 2004-05-26 20:41 Don Fry
  2004-05-27 17:13 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Don Fry @ 2004-05-26 20:41 UTC (permalink / raw)
  To: tsbogend, jgarzik, netdev

This patch corrects a printk when executed on a big-endian system.  Tested
ppc64.

--- linux-2.6.6-bk8/drivers/net/anr.pcnet32.c	Mon May 24 11:24:22 2004
+++ linux-2.6.6-bk8/drivers/net/pcnet32.c	Wed May 26 12:23:09 2004
@@ -1633,12 +1633,16 @@
 	   lp->cur_rx);
 	for (i = 0 ; i < RX_RING_SIZE; i++)
 	printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
-	       lp->rx_ring[i].base, -lp->rx_ring[i].buf_length,
-	       lp->rx_ring[i].msg_length, (unsigned)lp->rx_ring[i].status);
+	       le32_to_cpu(lp->rx_ring[i].base),
+	       le16_to_cpu(-lp->rx_ring[i].buf_length),
+	       le32_to_cpu(lp->rx_ring[i].msg_length),
+	       le16_to_cpu((unsigned)lp->rx_ring[i].status));
 	for (i = 0 ; i < TX_RING_SIZE; i++)
 	printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
-	       lp->tx_ring[i].base, -lp->tx_ring[i].length,
-	       lp->tx_ring[i].misc, (unsigned)lp->tx_ring[i].status);
+	       le32_to_cpu(lp->tx_ring[i].base),
+	       le16_to_cpu(-lp->tx_ring[i].length),
+	       le32_to_cpu(lp->tx_ring[i].misc),
+	       le16_to_cpu((unsigned)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

* Re: [PATCH 8/5 2.6.6-bk8] pcnet32: correct printk for big-endian arch
  2004-05-26 20:41 [PATCH 8/5 2.6.6-bk8] pcnet32: correct printk for big-endian arch Don Fry
@ 2004-05-27 17:13 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-05-27 17:13 UTC (permalink / raw)
  To: Don Fry; +Cc: tsbogend, netdev

applied to 2.4 and 2.6

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-26 20:41 [PATCH 8/5 2.6.6-bk8] pcnet32: correct printk for big-endian arch Don Fry
2004-05-27 17:13 ` 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).