Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

smc91x driver in uClinux-dist

Hi,

i am currently trying the uClinux-dist-20060803 on custom board (with the SMC91C11) with ethernet based applications. It works very well so far.

After some time i noticed the following messages on the console:

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

eth0: fubar (rxlen 0 status 6576

eth0: fubar (rxlen 0 status 0

eth0: fubar (rxlen 0 status 2641

eth0: fubar (rxlen 0 status 0[/b]

--- Quote End ---

it comes from the smc91x driver: You can find it in the

smc_recv function: Please look for.

    if (unlikely(packet_len < 6 || status & RS_ERRORS)) {
  if (status & RS_TOOLONG && packet_len <= (1514 + 4 + 6)) {
      /* accept VLAN packets */
      status &= ~RS_TOOLONG;
      goto back;
  }
  if (packet_len < 6) {
      /* bloody hardware */
      printk(KERN_ERR "%s: fubar (rxlen %u status %x\n",
        dev->name, packet_len, status);
      status |= RS_TOOSHORT;
  }

it&#39;s something wrong with packet length of incoming messages.

did anyone else see this messages? However those messages didn&#39;t break my system. So uClinux still seems to run well; no reboots or strange behaviour of the system.

Thank you.

Helmchen

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Helmchen,

    I had that message too. But it was just a warning, you may turn it off.

    There are actually two SMC91111 drivers. The one in main-stream Linux is smc91x.c from Monta Vista. And the other is scm91111.c from Microtonix&#39;s release 1.4. Both came the same vendor source, SMC. Both works.

    There are three drivers for DM9000A now. The one in main-stream is dm9000.c. And the dm9000x.c is from Microtronix. The last one , dm9ks.c is from Davicom. I feel dm9ks.c is more stable than others, and a little faster with checksum offloading support. I think it can be even faster if we can add scattered DMA.

    Hippo
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi hippo,

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    I had that message too. But it was just a warning, you may turn it off.

    There are actually two SMC91111 drivers. The one in main-stream Linux is smc91x.c from Monta Vista. And the other is scm91111.c from Microtonix&#39;s release 1.4. Both came the same vendor source, SMC. Both works.[/b]

    --- Quote End ---

    thank you for answer. i appreciate your help.

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    I feel dm9ks.c is more stable than others, and a little faster with checksum offloading support. I think it can be even faster if we can add scattered DMA.[/b]

    --- Quote End ---

    Checksum offloading and DMA will help (for UDP you can simply disable the udp checksum).

    Zero-Copy-Sockets would be nice. However moving big data portions is a pain on nios; it takes 10 clock cycles/ 4bytes if its not cached.

    IMO because of this issue, we have big performance penalties. So in general DMA is the way to go. And if the chip does the checksum, moving the data with DMA is gonna be a lot of easier.

    helmchen

    <EDIT>

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    I think it can be even faster if we can add scattered DMA.[/b]

    --- Quote End ---

    Just looked in the Altera Scatter DMA paper, http://www.altera.com/literature/an/an417.pdf (http://www.altera.com/literature/an/an417.pdf). This is what we need.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes, I had read AN417 before. I will let you know if I have the result.

    But even without a real SC DMA, modify the driver with SC by CPU will get some saving too.