[eepro100] 82559 polling mode

wyb wyb@ccert.com.cn
Tue Dec 17 23:16:01 2002


I'm implementing a linux firewall with three 82559 cards. But under heavy load, interrupt
entering and leaving code consume too much cpu time. So I want to implement a polling 
mode.
 In NET_BH, first disable all 82559 from interrupting CPU, then process skbs.
After purging backlog, polling all 82559, if SCB status indicate some work need to be
processed, call speedo_interrupt() and process backlog again. ...

net_bh()
{
    ...

    for_all_82559()
        outw(SCBMaskAll, ioaddr+SCBCmd) ;

label_again:
    while( !skb_queue_empty( &backlog ) ) {
        ...
    }

    for_all_82559()
        speedo_interrupt() ;
    if ( RX or TX handled in speedo_interrupt() )
        goto    label_again ;

    for_all_82559()
        reenable_interrupt() ;
}

what I want to know is: if I disable 82559 from interrupting CPU, does it still generate interrupt
bit in SCB status words ? If not so, speedo_interrupt() would do nothing, and the upper polling
code is of no use.