[ECOS] 82559 Self Test failure

Cristiano Pereira ligieri2002@hotmail.com
Wed Oct 9 08:49:00 GMT 2002


Hi again,

If I comment out the Self Test piece of code I get another error in the 
function i82559_configure(). Seems like whenever I'm polling memory for 
checking some status I'm not getting the right result. The error happens in 
this part of the code:

// Default values from the Intel Manual
    config_bytes = ccs + CFG_BYTES;

    config_bytes[0]=0x13;
    config_bytes[1]=0xc;
    config_bytes[2]=0x0;
    config_bytes[3]=0x0;
    config_bytes[4]=0x0;
    config_bytes[5]=0x0;
    config_bytes[6]=0x32 | (promisc ? 0x80 : 0x00); //   | 0x32 for small 
stats,
    config_bytes[7]=0x00 | (promisc ? 0x00 : 0x01); //\  | 0x12 for stats 
with P
AUSE stats
    config_bytes[8]=0x01; // [7]:discard short frames  \ | 0x16 for PAUSE + 
TCO
stats
    config_bytes[9]=0x0;
    config_bytes[10]=0x28;
    config_bytes[11]=0x0;
    config_bytes[12]=0x60;
    config_bytes[13]=0x0;          // arp
    config_bytes[14]=0x0;          // arp

    config_bytes[15]=0x80 | (promisc ? 1 : 0); // 0x81: promiscuous mode set
                                               // 0x80: normal mode
    config_bytes[16]=0x0;
    config_bytes[17]=0x40;
    config_bytes[18]=0x72 | (oversized ? 8 : 0); // Keep the Padding Enable 
bit

    // Let chip read configuration
    wait_for_cmd_done(ioaddr, WAIT_CU);

    OUTL(VIRT_TO_BUS(ccs), ioaddr + SCBPointer);
    OUTW(SCB_M | CU_START, ioaddr + SCBCmd);

    // ...and wait for it to complete operation
    count = 10000;
    do {
      udelay(1);
      READMEM16(ccs + CFG_STATUS, status);
    } while (0 == (status & CFG_STATUS_C) && (count-- > 0));

    // Check status
    if ((status & (CFG_STATUS_C | CFG_STATUS_OK))
        != (CFG_STATUS_C | CFG_STATUS_OK)) {
        // Failed!
#ifdef DEBUG
        os_printf("%s:%d Config update failed\n", __FUNCTION__, __LINE__);
#endif
        return 1;
    }

The function prints the message right above and returns.

Thanks again,
Cristiano.

>Hi all,
>
>I can't get the code for the Xscale platform to pass through the Self Test 
>defined
>in the function i82559_init(). Did anybody have the same problem. There is 
>not much
>documentation about it and conseguently there is not much I can do for 
>pinpointing what's wrong.
>
>Here is the code sequence which is failing:
>
>#ifdef DEBUG
>    os_printf("Init82559 %d @ %x\n82559 SelTest\n",
>              p_i82559->index, (int)ndp);
>#endif
>
>    ints = Mask82559Interrupt(p_i82559);
>
>    // Reset device
>    i82559_reset(p_i82559);
>
>    // Perform a system self-test. (get enough mem to round address)
>    if ( (selftest = (cyg_uint32)pciwindow_mem_alloc(32) ) == 0)
>        return (0);
>    p_selftest = (cyg_uint32 *) ((selftest + 15) & ~0xf);
>    p_selftest[0] = p_selftest[1] = -1;
>
>    OUTL( (VIRT_TO_BUS(p_selftest)) | I82559_SELFTEST, ioaddr + SCBPort);
>    //count = 0x7FFFF;                // Timeout for self-test.
>    count = 0x0FFFF;                // Timeout for self-test.
>
>    do {
>        udelay(10);
>    } while ( (p_selftest[1] == -1)  &&  (--count >= 0) );
>
>    // Reset device again after selftest
>    i82559_reset(p_i82559);
>
>    Acknowledge82559Interrupt(p_i82559);
>    UnMask82559Interrupt(p_i82559, ints );
>
>    if (count < 0) {
>        // Test timed out.
>#ifdef DEBUG
>        os_printf("Self test failed\n");
>#endif
>        return (0);
>    }
>The counter is timing out and the function returns at this point.
>
>Thanks,
>Cristiano.
>
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
>and search the list archive: http://sources.redhat.com/ml/ecos-discuss




_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list