]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sky2: fix for use on big endian
authorStephen Hemminger <shemminger@linux-foundation.org>
Mon, 26 Feb 2007 00:52:23 +0000 (01:52 +0100)
committerAdrian Bunk <bunk@stusta.de>
Mon, 26 Feb 2007 00:52:23 +0000 (01:52 +0100)
Ben added this for 2.6.18, it allows sky2 to run on big endian.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/net/sky2.c

index a173e377580389a945e5de825739e8b672a22a39..dd3f4830097381beb09d3ccb904ab084b3f32f9d 100644 (file)
@@ -3254,12 +3254,13 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
        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