Skip to contentSkip to conversation

smc911x: Fix accessor SMC_* routines

PATCH In review [email protected] 1 participant 2 messages Sep 12, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/11 smc911x: Fix accessor SMC_* routines

When in 16 bit mode, SMC_outl incorrectly simulates the situation and plus in 32 bit mode SMC_outw is missing...

Index: linux-2.6.18-rc4/drivers/net/smc911x.h
===================================================================
--- linux-2.6.18-rc4.orig/drivers/net/smc911x.h 2006-08-06 21:20:11.000000000
+0300
+++ linux-2.6.18-rc4/drivers/net/smc911x.h 2006-08-24 12:23:10.000000000 +0300
@@ -51,8 +51,8 @@
#define SMC_outw(v, a, r) writew(v, (a) + (r))
#define SMC_outl(v, a, r) \
do{ \
- writel(v & 0xFFFF, (a) + (r)); \
- writel(v >> 16, (a) + (r) + 2); \
+ writew(v & 0xFFFF, (a) + (r)); \
+ writew(v >> 16, (a) + (r) + 2); \
} while (0)
#define SMC_insl(a, r, p, l) readsw((short*)((a) + (r)), p, l*2)
#define SMC_outsl(a, r, p, l) writesw((short*)((a) + (r)), p, l*2)
@@ -62,6 +62,7 @@
#define SMC_inw(a, r) readw((a) + (r))
#define SMC_inl(a, r) readl((a) + (r))
#define SMC_outb(v, a, r) writeb(v, (a) + (r))
+#define SMC_outw(v, a, r) writew(v, (a) + (r))
#define SMC_outl(v, a, r) writel(v, (a) + (r))
#define SMC_insl(a, r, p, l) readsl((int*)((a) + (r)), p, l)
#define SMC_outsl(a, r, p, l) writesl((int*)((a) + (r)), p, l)

--
Bora SAHIN

#1 lore raw
Quoted 4 lines

When in 16 bit mode, SMC_outl incorrectly simulates the situation and plus in 32 bit mode SMC_outw is missing...

[Snip]

Because mailer wraps the lines patch is not applied. I pushed it by mistake...

Sory for the inconsistencies. I'll cook up new series of patches...

--
Bora SAHIN