public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Via-Rhine Driver - questions for D. Becker.
@ 2002-04-24 23:39 Ivan G.
  2002-04-25  2:49 ` Donald Becker
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan G. @ 2002-04-24 23:39 UTC (permalink / raw)
  To: Donald Becker; +Cc: LKML

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.



 

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

end of thread, other threads:[~2002-04-27 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-24 23:39 Via-Rhine Driver - questions for D. Becker Ivan G.
2002-04-25  2:49 ` Donald Becker
2002-04-27 21:15   ` Ivan G.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox