Via-Rhine Driver - questions for D. Becker.

From: Ivan G. (ivangurdiev@linuxfreemail.com)
Date: Wed Apr 24 2002 - 18:39:08 EST


I have been trying to debug the kernel Via-Rhine driver but I do not have
much information and I'm forced to guess about many things.

Since you are the original author, I wanted to ask you some questions about
the operation of the driver. If you have time, your help would be greatly
appreciated.

(btw. I am aware that you have your own version of the driver.
However most issues will probably apply to that driver as well. )

Here are my questions:

- 1) "Something wicked happened"]
What is the precise purpose of the trap - what should be trapped and what
shouldn't. Is it even necessary? There are a definite number of interrupts to
call via_rhine_error - why not simply handle each one of them? I've seen 3
different versions of the "wicked" code.

- 2) CmdTxDemand should be issued to handle which error interrupts?

- 3) Missing interrupts in setting the bitmask....
Is there a reason or is it an error? some of those are used later in the
code... RxNoBuf for example, RxOverflow is another (actually your driver
includes that but never uses it), TxAborted is missing in both kernel and
your version.

- 4) RxOverflow is not handled. Does it need to be and how?

-5 ) What is a good resource on those things? I read the datasheets.
They give useful numbers but little explanation on how different interrupts
should be handled. What info did you have when you were writing the driver.

-6) TxUnderrun - it increases threshold and then issues CmdTxDemand in the
"wicked error" trap. The linuxfet VIA driver, additionally does the
following: Sets descriptor bit, CmdTxOn, CmdTxDemand

if (txstatus & 0x0800) {
                    /* uderrun happen */
                    np->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
                    writel(virt_to_bus(&np->tx_ring[entry]), ioaddr +
TxRingPtr);
                    /* Turn on Tx On*/
                    writew(CmdTxOn | np->chip_cmd, dev->base_addr + ChipCmd);
  

                    /* Stats counted in Tx-done handler, just restart Tx. */
                    writew(CmdTxDemand | np->chip_cmd, dev->base_addr +
ChipCmd)
;
                    if (debug > 1)
                       printk(KERN_ERR "Underrun happen");

Is it necessary to do the above on underruns?

That's all for now.
I have tried to figure those things out on my own but
the main problem is lack of any resource to help me.
I haven't written any network drivers so I am unfamiliar with
what every interrupt does and how. if you can point me to some documentation
for help maybe I could figure it out myself.

Thank you for your help.
This message will be cc'd to LKML as well.

 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:10 EST