linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re. Davicom DM9102A Network Problems
@ 2002-07-31 13:50 Howard Gray
  2002-07-31 14:11 ` Christian Pellegrin
  0 siblings, 1 reply; 2+ messages in thread
From: Howard Gray @ 2002-07-31 13:50 UTC (permalink / raw)
  To: linuxppc-embedded


Howard Gray wrote....
>> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re. Davicom DM9102A Network Problems
  2002-07-31 13:50 Re. Davicom DM9102A Network Problems Howard Gray
@ 2002-07-31 14:11 ` Christian Pellegrin
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Pellegrin @ 2002-07-31 14:11 UTC (permalink / raw)
  To: howard.gray; +Cc: linuxppc-embedded


On Wed, 31 Jul 2002, Howard Gray wrote:

>
> Howard Gray wrote....
> >> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-31 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-31 13:50 Re. Davicom DM9102A Network Problems Howard Gray
2002-07-31 14:11 ` Christian Pellegrin

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).