Subject: [PATCH 3/6] sky2: fix for use on big endian

From: Stephen Hemminger <[email-masked]>
Date: Fri, 23 Feb 2007 15:10:45 -0800

Ben added this for 2.6.18, it allows sky2 to run on big endian.

Signed-off-by: Stephen Hemminger <[email-masked]>

---
 drivers/net/sky2.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- linux-2.6.16.y.orig/drivers/net/sky2.c	2007-02-23 14:45:34.000000000 -0800
+++ linux-2.6.16.y/drivers/net/sky2.c	2007-02-23 14:45:36.000000000 -0800
@@ -3254,12 +3254,13 @@
 	spin_lock_init(&hw->hw_lock);
 
 #ifdef __BIG_ENDIAN
-	/* byte swap descriptors in hardware */
+	/* The sk98lin vendor driver uses hardware byte swapping but
+	 * this driver uses software swapping.
+	 */
 	{
 		u32 reg;
-
 		reg = sky2_pci_read32(hw, PCI_DEV_REG2);
-		reg |= PCI_REV_DESC;
+		reg &= ~PCI_REV_DESC;
 		sky2_pci_write32(hw, PCI_DEV_REG2, reg);
 	}
 #endif

--
Stephen Hemminger <[email-masked]>