David Brownell wrote:
Hi Randy,
On Thursday 14 October 2004 11:38 am, Randy.Dunlap wrote:
David Brownell wrote:
This is a chip that can be wired onto any PCI bus, and it's
also available on add-in PCI cards. No reason the driver
shouldn't be clean w.r.t. 64/32/N bit words, endianness, etc.
Are net2280 dma addresses always 32-bit (internally), or does
it depend on the host system?
Are fields always little-endian internally?
The chip itself wants little-endian data, and only uses 32bit
DMA. But there's no "32bit dma address" type ... :(
drivers/usb/gadget/net2280.c: In function `fill_dma_desc':
drivers/usb/gadget/net2280.c:718: warning: passing arg 1 of
`__cpu_to_le32p' from incompatible pointer type
Could mark req.dma as __le32...
I didn't like that suggestion (yet), other people can comment on it,
though. For now I'm just adding a cast.
Changing that type for sparse sounds better to me, so it works
on a big-endian 64bit CPU as well as just fixing the warning.
Do you want me to make those changes?
If you would, please. I just wasn't sure about the more global
ramifications of that.
One of these moments I really should install "sparse".
Yes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/gadget/net2280.c: In function `show_queues':
drivers/usb/gadget/net2280.c:1704: warning: unsigned int format,
different type arg (arg 4)
Common kernel practice for printing a dma_addr_t is to cast it to
unsigned long long, which needs %16llx.
I made this one %*llx so that '*' can be variable-sized,
depending on host arch.
Looks OK, at least if you ignore the fact that it'll print out
byteswapped on big-endian ... I'm told the driver does
work OK on PPC32, though.
So this is a net2280 dma addr, therefore it's always little-endian?
ugh. So it can be something like
(unsigned long long) le32_to_cpu(req->td_dma),
? argh. that doesn't make much sense.
this is a "dma_32bit_t", right? darn.
otherwise le32_to_cpu(on a 64-bit dma addr) is funky.
Ideas/suggestions?
--
~Randy
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel