Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Etherboot-users] Problems with Etherboot 4.6.0




Hello UG,

I use etherboot 4.6.0 and my problem is, that the system stalls
sporadically while loading the kernel image. I have set the
"SIZEINDICATOR" flag
to see where it happens, but its always a different value. Sometimes
after a few boots,
sometimes over a thousand boots. I have programmed a loop where the
system boots after every loading of the kernel (3 times per minute). I
run this test over several weeks now. I use (and must use because of the
BNC,
AUI, RJ45 in one card) a Etherlink XL PCI card and
a 650 MHz. Pentium III PC. 
First I thought there is a problem in the 3c90x driver because I found
some bugs. But after removal of the "bug" the system continues stalling.
My question is, has anybody else encountered such a problem and can
someone help me to give me a hint where to search for a bug.

Here a short description of the bug I found in the 3c90x driver:


----------------- snip ---------------------

 /*** a3c90x_poll: exported routine that waits for a certain length of
time
 *** for a packet, and if it sees none, returns 0.  This routine should
 *** copy the packet to nic->packet if it gets a packet and set the size
 *** in nic->packetlen.  Return 1 if a packet was found.
 ***/
static int
a3c90x_poll(struct nic *nic)
    {
    int i, errcode;
 
    if (!(inw(INF_3C90X.IOAddr + regCommandIntStatus_w)&0x0010))
    {
    return 0;
    }
 
    /** we don't need to acknowledge rxComplete -- the upload engine
     ** does it for us.
     **/
 
    /** Build the up-load descriptor **/
    INF_3C90X.ReceiveUPD.UpNextPtr = 0;
    INF_3C90X.ReceiveUPD.UpPktStatus = 0;
    INF_3C90X.ReceiveUPD.DataAddr = virt_to_bus(nic->packet);
    INF_3C90X.ReceiveUPD.DataLength = 1536 + (1<<31);
 
    /** Submit the upload descriptor to the NIC **/
    outl(virt_to_bus(&(INF_3C90X.ReceiveUPD)),
         INF_3C90X.IOAddr + regUpListPtr_l);
 
    /** Wait for upload completion (upComplete(15) or upError (14)) **/
    for(i=0;i<40000;i++);
    while((INF_3C90X.ReceiveUPD.UpPktStatus & ((1<<14) | (1<<15))) == 0)
    for(i=0;i<40000;i++);
 
    /** Check for Error (else we have good packet) **/
    if (INF_3C90X.ReceiveUPD.UpPktStatus & (1<<14))
 -------------------------snap-----------------------------------------

I thaught the problem is the while loop:
    for(i=0;i<40000;i++);
    while((INF_3C90X.ReceiveUPD.UpPktStatus & ((1<<14) | (1<<15))) == 0)
    for(i=0;i<40000;i++);

First I wondered why there is a the timing loop before the while loop.
Then I deleted the timing loop and the system stalls. The problem is
that the 3Com card writes the changes to the memory but the memory area
was not declared "volatile" therefore the optimizer makes a code where
the location is never read. I added "volatile" to the structure and it
works. But my system stalls nevertheless. There is a similar bug in the
transmit routine.


Thats the code I use instead of the above:

    /** Wait for upload completion (upComplete(15) or upError (14)) **/
    for(i=0; i<50000; i++)
    {
        Status = INF_3C90X.ReceiveUPD.UpPktStatus;
        if((Status & ((1<<14) | (1<<15))) != 0)
            break;
    }
    if(i >= 50000)
            printf("a3c90x_poll: UpPktStatus timeout\n");       /* tell
us there was a t                                                  

Thanks in advance

Peter

_______________________________________________
Etherboot-users mailing list
Etherboot-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/etherboot-users
===========================================================================
This Mail was sent to netboot mailing list by:
Peter Kunzmann <kunzmann@citron.de>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.