Skip to contentSkip to conversation

Re. Davicom DM9102A Network Problems

DISCUSSION Howard Gray 2 participants 2 messages Jul 31, 2002

lore
Share & tools
lore
#0 lore raw

Howard Gray wrote....

Quoted 2 lines
Quoted 2 lines

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/

#1 lore raw
Quoted 5 lines · Howard Gray

Howard Gray wrote....

Quoted 2 lines
Quoted 2 lines

How can the tulip driver work with the DM9102A at all if the transmit buffers are not guaranteed to be correctly aligned ?

Quoted 8 lines

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/