This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

i82559 Ethernet driver


Hi,

I have experienced a somewhat strange behaviour of the Intel 82559 Ethernet driver (i386 PC target). The PING command under Redboot only works if CYGDBG_IO_ETH_DRIVERS_DEBUG is active, which causes a debug message output on the console for every packet which is sent or received.

With this option disabled, PING immediately returns with "PING: Cannot reach server".

I first thought of a timing problem, since the delay of the console output (serial) is significant.

The critical sections are in eth_drv.c:

#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
    if (cyg_io_eth_net_debug) {
        int old_console;
        old_console = start_console();
        diag_printf("Ethernet send:\n");
        DIAG_DUMP_BUF_HDR(eth_hdr, 14);
        DIAG_DUMP_BUF_BDY(buf, len);
        end_console(old_console);
    }
#endif

...

#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
    if (cyg_io_eth_net_debug) {
        int old_console;
        old_console = start_console();
        diag_printf("Ethernet recv:\n");
        if ( buf ) {
            DIAG_DUMP_BUF_HDR(buf, 14);
            DIAG_DUMP_BUF_BDY(buf+14, total_len-14);
        }
        else
            diag_printf("  ...NULL buffer.\n");
        end_console(old_console);
    }
#endif

In the end we found out, that the PING command still worked with the diag...() calls removed, and no actual console output. But I had to keep the start_console() and end_console() in order to keep the PING command working.

Any ideas why I need these console related calls for a working network driver?
Has someone used the driver under Redboot *without* Debug output?

Kind regards,
Peter


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]