This is the mail archive of the ecos-discuss@sourceware.org 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]

Still can make progress running the SMSC91C111 driver in interrupt mode.


To recap,
	My target is a custom PXA255 board with a SMSC LAN91C111 Ethernet
controller.

	I have gotten past my hardware addressing problems and can now
successfully run Redboot with the smsc_lan91cxx driver accessing the
Ethernet controller with 32 bit access in polled mode.

	I can NOT get the driver to work in interrupt mode in my
application, or any application.

	I have been attempting to run a simple eCos test program
(test/server_test.c) with no success.

	I have modified the test/server_test.c program to create a main() so
the top function looks like:
int main(void)
{
    printf("Start Main\n");

    // Create a main thread, so we can run the scheduler and have time
'pass'
    cyg_thread_create(10,                // Priority - just a number
                      net_test,          // entry
                      0,                 // entry parameter
                      "Network test",    // Name
                      &stack[0],         // Stack
                      STACK_SIZE,        // Size
                      &thread_handle,    // Handle
                      &thread_data       // Thread data structure
            );

    printf("Resume Thread\n");
    cyg_thread_resume(thread_handle);  // Start it

    printf("Starting Scheduler\n");
    cyg_scheduler_start();

    printf("Main Done\n");  // execution never gets here!!!
    for(;;);      

return 0;
}

	BTW, is it necessary to start a task if you are only intended to
test the loopback (ping) functionality?  My execution also never gets past
the cyg_schedule_start().  Does this indicate a problem with the scheduler?

	My diag output is (please ignore the stray mangled chars, hardware
not software errors):
BA98754300002Init device '/dev/ttydiag'
Init tty channel: 4acb4
Init device '/dev/haldiag'
HAL/diag SERIAL init
Network stack using 69632 bytes for misc space
                    69632 bytes æor mbufs
                    139264 bytås for mbuf clusters
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'lan91cxx_eth0'
smsc_lan91cxx_init
LAN91CXX - supposed BankReg @ 800030e = 3300
LAN91CXX - type: 9, rev: 2
LAN91CXX - status: 0000
Got ESA from cpd
LAN91CXX - ESA: 00:80:66:ff:ff:ff
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x0004a998)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x0004a388)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
1Start Main
Resume Thread
Start net_test
BOOTP[eth0] op: REPLY
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0x0
        secs: 0
       flags: 0x0
       hw_addr: 00:80:66:ff:ff:ff
     client IP: 172.16.8.111
         my IP: 172.16.8.111
     server IP: 172.16.8.109
    gateway IP: 172.16.1.1
  options:
        subnet mask: 255.255.0.0
       IP broadcast: 172.16.1.255
            gateway: 172.16.q.1
lan91cxx_start
lan91cxx_can_send
lan91cxx_send
lan91cxx_send: allocated packet 0000
#####Tx packet allocated 0 (previous 0)
lan91cxx_isr
lan91cxx_send:END: ints at TX: 030c
lan91cxx_can_send
lan91cxx_TxEvent
lan91cxx_TxEvent:START: fifo 8000 ints 0100
#####Tx packet freed 0 (expected 0)
lan91cxx_TxEvent:END: fifo 8080 ints 010c
lan91cxx_deliver
lan91cxx_control
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
lan91cxx_start
lan91cxx_control
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
lan91cxx_can_send
lan91cxx_send
lan91cxx_send: allocated packet 0000
#####Tx packet allocated 0 (previous 0)
llan91cxx_isr
an91cxx_send:END: ints at TX: 030c
lan91cxx_can_send
lan91cxx_TxEvent
lan91cxx_TxEvent:START: fifo 8000 ints 0100
#####Tx packet freed 0 (expected 0)
lan91cxx_TxEvent:END: fifo 8080 ints 010c
lan91cxx_deliver
lan91cxx_stop
lan91cxx_start
lan91cxx_control
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
Start SERVER test
Starting Scheduler

	Looking at the stats I can see that I get two interrupts firing, and
that's it.  I can also see two ARPs are sent.  When I ping the target,
nothing is returned, and no new interrupts are generated.

	Any advice on where should I go from here?  Does the smsc_lan91C111
driver work with interrupts?  With 32 bit access?

	Does anyone have any known working configuration files that support
a smsc_lan91C111 in interrupt mode with 32 bit access?

Thanks, 
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750




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


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