* [PATCH] smc911x
@ 2006-12-19 17:02 Pierre TARDY
2006-12-26 21:30 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Pierre TARDY @ 2006-12-19 17:02 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
Attached a patch on smc911x driver, which corrects obvious errors in the
16bit chips support of this driver.
Please note that this driver still do NOT support 16bit chips (9115 and
9117), as it claims to, there may be mistakes in the data fifo
managment, this patch enable the driver to init the chip, but the data
is then corrupted.
I managed to make my chip work with the driver smsc911x (out of the
box), from smsc, which has been refused to be included in the kernel tree.
http://thread.gmane.org/gmane.linux.network.general/10498/focus=40384
I think it my be a good idea to reconsider this choice
- smsc911x has more chance to be supported as it has originally been
made by the manufacturer of the chip.
- smc911x is mono chip (do not work with 9117 at least), mono arch and
mono plateform (restricted to PXA), while smsc911x has been tested on
various chips by smsc
The only thing that is missing in smsc911x is dma support, which is very
architecture dependant ( There is one way to do dma with the pxa,
another on the freescale mxc plateforms, another on the x86..)
--
Pierre Tardy
[-- Attachment #2: smc911x_16bit.patch --]
[-- Type: text/x-patch, Size: 887 bytes --]
--- linux-2.6.18.1.orig/drivers/net/smc911x.h 2006-10-14 05:34:03.000000000 +0200
+++ linux-2.6.18.1/drivers/net/smc911x.h 2006-12-19 11:22:39.000000000 +0100
@@ -46,13 +46,13 @@
#if SMC_USE_16BIT
#define SMC_inb(a, r) readb((a) + (r))
#define SMC_inw(a, r) readw((a) + (r))
-#define SMC_inl(a, r) ((SMC_inw(a, r) & 0xFFFF)+(SMC_inw(a+2, r)<<16))
+#define SMC_inl(a, r) ((SMC_inw(a, r) & 0xFFFF)|(SMC_inw(a+2, r)<<16))
#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) \
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] smc911x
2006-12-19 17:02 [PATCH] smc911x Pierre TARDY
@ 2006-12-26 21:30 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-12-26 21:30 UTC (permalink / raw)
To: Pierre TARDY; +Cc: netdev
Pierre TARDY wrote:
> Attached a patch on smc911x driver, which corrects obvious errors in the
> 16bit chips support of this driver.
>
> Please note that this driver still do NOT support 16bit chips (9115 and
> 9117), as it claims to, there may be mistakes in the data fifo
> managment, this patch enable the driver to init the chip, but the data
> is then corrupted.
>
> I managed to make my chip work with the driver smsc911x (out of the
> box), from smsc, which has been refused to be included in the kernel tree.
> http://thread.gmane.org/gmane.linux.network.general/10498/focus=40384
>
> I think it my be a good idea to reconsider this choice
> - smsc911x has more chance to be supported as it has originally been
> made by the manufacturer of the chip.
> - smc911x is mono chip (do not work with 9117 at least), mono arch and
> mono plateform (restricted to PXA), while smsc911x has been tested on
> various chips by smsc
>
> The only thing that is missing in smsc911x is dma support, which is very
> architecture dependant ( There is one way to do dma with the pxa,
> another on the freescale mxc plateforms, another on the x86..)
ACK the patch, but please follow standard patch format
(http://linux.yyz.us/patch-format.html), chiefly you should always
include a Signed-off-by line, and avoid MIME attachments.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-26 21:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19 17:02 [PATCH] smc911x Pierre TARDY
2006-12-26 21:30 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).