]> git.hungrycats.org Git - linux/commitdiff
[PATCH] pcnet32: correct printk for big-endian arch
authorDon Fry <brazilnut@us.ibm.com>
Thu, 27 May 2004 09:12:23 +0000 (05:12 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 27 May 2004 09:12:23 +0000 (05:12 -0400)
This patch corrects a printk when executed on a big-endian system.  Tested
ppc64.

drivers/net/pcnet32.c

index 72b1c9b3433c8bc2d6f37ae33547191dbd2b5047..529dcfb16858460c28615bfcd311bd660cd096b6 100644 (file)
@@ -1633,12 +1633,16 @@ pcnet32_tx_timeout (struct net_device *dev)
           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);