diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-10-24 17:56:21 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-10-24 17:56:21 +0000 |
commit | c9e697a3558161ef7f9289bfc5d4a85a2b2429cc (patch) | |
tree | e1185bb904ec56b742f29b36909fa21326c4f998 /package/madwifi/patches | |
parent | 3c8b5cbf4b1d287fc3a39e1a6a16a050773b0009 (diff) | |
download | master-31e0f0ae-c9e697a3558161ef7f9289bfc5d4a85a2b2429cc.tar.gz master-31e0f0ae-c9e697a3558161ef7f9289bfc5d4a85a2b2429cc.tar.bz2 master-31e0f0ae-c9e697a3558161ef7f9289bfc5d4a85a2b2429cc.zip |
revert changes to io access functions done in madwifi trunk (they seem wrong to me, and they break xscale) fixes #2591
SVN-Revision: 9433
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r-- | package/madwifi/patches/128-revert_ioaccess.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/package/madwifi/patches/128-revert_ioaccess.patch b/package/madwifi/patches/128-revert_ioaccess.patch new file mode 100644 index 0000000000..5aaa4ddc92 --- /dev/null +++ b/package/madwifi/patches/128-revert_ioaccess.patch @@ -0,0 +1,59 @@ +Index: madwifi-ng-r2756-20071018/ath_hal/ah_os.h +=================================================================== +--- madwifi-ng-r2756-20071018.orig/ath_hal/ah_os.h 2007-10-24 19:56:29.632449329 +0200 ++++ madwifi-ng-r2756-20071018/ath_hal/ah_os.h 2007-10-24 19:56:39.192994154 +0200 +@@ -172,44 +172,25 @@ + * never byte-swapped by PCI chipsets or bridges, but always + * written directly (i.e. the format defined by the manufacturer). + */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) +-# if (AH_BYTE_ORDER == AH_BIG_ENDIAN) ++#if (AH_BYTE_ORDER == AH_BIG_ENDIAN) + #define _OS_REG_WRITE(_ah, _reg, _val) do { \ + (0x4000 <= (_reg) && (_reg) < 0x5000) ? \ +- iowrite32((_val), (_ah)->ah_sh + (_reg)) : \ +- iowrite32be((_val), (_ah)->ah_sh + (_reg)); \ +- } while (0) +-#define _OS_REG_READ(_ah, _reg) \ +- ((0x4000 <= (_reg) && (_reg) < 0x5000) ? \ +- ioread32((_ah)->ah_sh + (_reg)) : \ +- ioread32be((_ah)->ah_sh + (_reg))); +-# else /* AH_LITTLE_ENDIAN */ +-#define _OS_REG_WRITE(_ah, _reg, _val) do { \ +- iowrite32(_val, (_ah)->ah_sh + (_reg)); \ +- } while (0) +-#define _OS_REG_READ(_ah, _reg) \ +- ioread32((_ah)->ah_sh + (_reg)) +- +-# endif /* AH_BYTE_ORDER */ +-#else +-# if (AH_BYTE_ORDER == AH_BIG_ENDIAN) +-#define _OS_REG_WRITE(_ah, _reg, _val) do { \ +- writel((0x4000 <= (_reg) && (_reg) < 0x5000) ? \ +- (_val) : cpu_to_le32(_val), \ +- (_ah)->ah_sh + (_reg)); \ +- } while (0) ++ writel((_val), (_ah)->ah_sh + (_reg)) : \ ++ ({__raw_writel((_val), (_ah)->ah_sh + (_reg)); \ ++ mb(); }); \ ++} while (0) + #define _OS_REG_READ(_ah, _reg) \ + ((0x4000 <= (_reg) && (_reg) < 0x5000) ? \ + readl((_ah)->ah_sh + (_reg)) : \ +- cpu_to_le32(readl((_ah)->ah_sh + (_reg)))) +-# else /* AH_LITTLE_ENDIAN */ ++ ({unsigned long __v = __raw_readl((_ah)->ah_sh + \ ++ (_reg)); mb(); __v; })) ++#else /* AH_LITTLE_ENDIAN */ + #define _OS_REG_WRITE(_ah, _reg, _val) do { \ + writel(_val, (_ah)->ah_sh + (_reg)); \ +- } while (0) ++} while (0) + #define _OS_REG_READ(_ah, _reg) \ + readl((_ah)->ah_sh + (_reg)) +-# endif /* AH_BYTE_ORDER */ +-#endif /* KERNEL_VERSON(2,6,12) */ ++#endif /* AH_BYTE_ORDER */ + + /* + The functions in this section are not intended to be invoked by MadWifi driver |