[eepro100] eepro100 receiver flexible mode problem

Kallol Biswas kallol@efi.com
Thu Jan 3 19:44:01 2002


Have you got any reply? I think I can help you.

Here is how the RFD and RBDs should be set up.

   rfd----> rfd ----> rfd ---->rfd
    ^____________________|
make sure to set the
  rfd::rbd addr to 82559's NULL pointer
  rfd ::count to zero (3rd word, at offset C)
The rfd::link address is the address of the next rfd
The last RFD should have the EL bit set.

Set up the rbds similarly

rbd--->rbd-->rbd---->rbd
^------------------------|
The link address is the address address of the next rbd, last rbd should
have the
EL bit set,  in normal network load the NIC fetches  RBDs before RFDs so
most of the time the RU stops after hitting this bit.

The receive buffer address is the address of dma buffer where you want
to receive frames, the length should be the length of the dma buffer. It
is good idea to allocate this buffer more than max ethernet frame size,
otherwise the RU can put a partial frame in a different buffer, making
management of RU buffers complicated.

At this point link the first rfd to the first rbd (only)
i.e.

first rfd->rbd_addr = address of the first rbd in the ring, note that
the linkage has to be done only once, as the device puts frames in
memory it increments its internal rfd and rbd pointers automatically.

So the final picture looks like:

rfd--->rfd--->rfd-->rfd--->rfd-->rfd  (EL )set
^----------------------------------|
|
|
v
|----------------------------------
v                                                 |
rbd ---> rbd --->rbd-->rbd-->rbd (EL set)
 |              |            |          |         |
buffer   buffer    buffer    buffer  buffer


Hope this helps.

Kallol

Sergey Zimin wrote:

> Hi, folks.
>
> I write small driver of the EtherExpress and
> I want to use the flexible RU mode. I try
> to do this, same way as for CU, but the eepro
> still receive the data in the simple mode.
>
> Example here:
>
> struct RxFD {
>     u16 status;
>     u16 control;
>     u32 rx_desc_addr;
>     u32 count;
>
>     u32 tx_buf_addr0;
>     s32 tx_buf_size0;
>     u32 tx_buf_addr1;
>     s32 tx_buf_size1;
> };
>
> I do the follows:
>  set the RxFlex bit in the control field,
>
>  add two RBD entry,
>  set the address of the first RBD in the data buffer
>  set the size of the first RBD to the size of the data buffer
>  point rx_desc_addr to the first RBD entry
>  set count value to the 0x01208000
>
> My chip is i82557. Tell my please, what's wrong, and
> where can i find good documentation about this chip.
>
> Thanks, Serj.
>
> _______________________________________________
> eepro100 mailing list
> eepro100@scyld.com
> http://www.scyld.com/mailman/listinfo/eepro100