Messages in this thread Patch in this message | | | Date | Thu, 10 Feb 2000 17:55:56 +0000 (GMT) | From | Peter Denison <> | Subject | [PATCH] isa_{read,write}{w,l} fixed |
| |
In trying to fix some ISA access in older net drivers, I came across lots of "invalid operand to binary +" messages, tracked down to trying to add pointers of different types together. Since it is intuitive to pass a long * to isa_writel, etc. the included patch should sort this out.
I can't believe it's not bitten anyone before! Does no-one use isa_writel?
-- Peter Denison <peterd@pnd-pc.demon.co.uk> Linux Driver for Promise DC4030VL cards. See http://www.pnd-pc.demon.co.uk/promise/promise.html for details --- include/asm-i386/io.h.old Tue Feb 8 21:26:12 2000 +++ include/asm-i386/io.h Wed Feb 9 22:47:18 2000 @@ -195,15 +195,15 @@ */ #define __ISA_IO_base ((char *)(PAGE_OFFSET)) -#define isa_readb(a) readb(__ISA_IO_base + (a)) -#define isa_readw(a) readw(__ISA_IO_base + (a)) -#define isa_readl(a) readl(__ISA_IO_base + (a)) -#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a)) -#define isa_writew(w,a) writew(w,__ISA_IO_base + (a)) -#define isa_writel(l,a) writel(l,__ISA_IO_base + (a)) -#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c)) -#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c)) -#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c)) +#define isa_readb(a) readb(__ISA_IO_base + (unsigned long)(a)) +#define isa_readw(a) readw(__ISA_IO_base + (unsigned long)(a)) +#define isa_readl(a) readl(__ISA_IO_base + (unsigned long)(a)) +#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (unsigned long)(a)) +#define isa_writew(w,a) writew(w,__ISA_IO_base + (unsigned long)(a)) +#define isa_writel(l,a) writel(l,__ISA_IO_base + (unsigned long)(a)) +#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (unsigned long)(a),(b),(c)) +#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (unsigned long)(b),(c)) +#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (unsigned long)(a),(b),(c)) /* @@ -211,7 +211,7 @@ */ #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d)) -#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d)) +#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (unsigned long)(b)),(c),(d)) static inline int check_signature(unsigned long io_addr, const unsigned char *signature, int length) | |