lkml.org 
[lkml]   [2003]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lne390 and Jensen Alphas
On Sun, Oct 12, 2003 at 01:24:30PM +0200, Marc Zyngier wrote:

> This doesn't look to me like a proper fix. You should unconditionally
> use ioremap and memcpy_{from,to}io (not the isa_* version). No need to
> have a special Jensen case here.

Marc,

I wish I could use the memcpy_{from,to}io-functions because I know by
myself that they are well optimized and tested. But in this case they
don't behave the way the lne390 adapter needs them.
If you take a look into arch/alpha/lib/io.c you see that the function
_memcpy_toio() is checking the count of bytes to copy and the address to
copy to against their alignment. In case they are on a 16bit boundary
(and unfortunately they are always on such a boundary because the MAC
header is 14 bytes and the alignment of skb->data is honoring the start
of IP data for alignment to increase the performance of the stack)
_memcpy_toio() will use __raw_writew() to actually copy the data. And
this is exactly what doesn't work: Filling the shared mem of the lne390
adapter using 16bit write operations. I think this problem does not arise
on x86 architectures.
About five years ago I addressed that issue
(http://www.uwsg.iu.edu/hypermail/linux/kernel/9807.3/1132.html) and got
an answer from Alan Cox
(http://www.uwsg.iu.edu/hypermail/linux/kernel/9807.3/1212.html)

> Please look at the way ne3210.c was fixed in 2.6.0-test7.

Hmm, I see you are using memcpy_{from,to}io-functions only. Five years
ago I sent another patch that established a new function I called
"memcpy_toio_g32a"()
(http://www.ussg.iu.edu/hypermail/linux/kernel/9808.1/0275.html), but that was
the one that never did it into an official release. Indeed, I am also
unwilling to write a dirty hack and use well defined io-functions
instead. This is clean and it is even easier to develop and debug.
Unfortunately .... I start to repeat. Or, is there another way to copy
something from mem to iomem that is definitely using 32bit write
operations? Any help is welcome ...

Regards,
Carsten Jacobi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.050 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site