Re. Davicom DM9102A Network Problems

2 messages, 2 authors, 2002-07-31 · open the first message on its own page

Re. Davicom DM9102A Network Problems

From: Howard Gray <hidden>
Date: 2002-07-31 13:50:02

Howard Gray wrote....
quoted
How can the tulip driver work with the DM9102A at all if the transmit
buffers are not guaranteed to be correctly aligned ?
Answering one of my own questions.....

According to a chip errata sheet the DM9102A Rev. 0x40 requires double word
aligned transmit buffers but earlier revisions (e.g. 0x31) didn't. I guess
the tulip driver works well with older revisions only.

But my question still remains: How can I get a double word aligned transmit
buffer using the network core's sk_buff mechanism ? If I can't do that I'll
have to rewrite the driver to use use my own aligned buffers and copy the
sk_buff data to them. It's a pity because then it doesn't make much sense to
follow that with a DMA transfer....

--
Howard Gray
MATRIX Vision GmbH
Oppenweiler
Germany


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Re. Davicom DM9102A Network Problems

From: Christian Pellegrin <hidden>
Date: 2002-07-31 14:11:24

On Wed, 31 Jul 2002, Howard Gray wrote:
Howard Gray wrote....
quoted
quoted
How can the tulip driver work with the DM9102A at all if the transmit
buffers are not guaranteed to be correctly aligned ?
But my question still remains: How can I get a double word aligned transmit
buffer using the network core's sk_buff mechanism ? If I can't do that I'll
have to rewrite the driver to use use my own aligned buffers and copy the
sk_buff data to them. It's a pity because then it doesn't make much sense to
follow that with a DMA transfer....
From Alex Zeffertt mpc860sar.c (in this case 16-byte aligned, just change
to 16 to 4 and 15 to 3):


        // Allocate a socket buffer
        newskb = dev_alloc_skb(mtu_ + 15);

        if (newskb) {
          // Make sure that newskb->data gives a burst-aligned
          // pointer (divisible by 16)
          if ((len = (ulong)newskb->data & (ulong)0x0f)){
            skb_reserve(newskb, 16 - len);
          }

hth
Bye!


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help