From: Pierre TARDY <pierre.tardy@freescale.com>
To: netdev@vger.kernel.org
Subject: [PATCH] smc911x
Date: Tue, 19 Dec 2006 18:02:57 +0100 [thread overview]
Message-ID: <45881B41.1070109@freescale.com> (raw)
[-- 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)
next reply other threads:[~2006-12-19 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-19 17:02 Pierre TARDY [this message]
2006-12-26 21:30 ` [PATCH] smc911x Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45881B41.1070109@freescale.com \
--to=pierre.tardy@freescale.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).