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]

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


"Joe Porthouse" <jporthouse@toptech.com> writes:

> 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:

Why have you made this change?  main() is usually run in a thread,
after the scheduler has started. Calling cyg_scheduler_start() again
will almost certainly crash the system. 

Try running the test programs exactly as they are written. This is
what they are there for. Start with ping_test, then tcp_echo test.

> 
> 	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?

The BSD stack can only run after the scheduler starts since is has
some internal threads that need to be scheduled.

cyg_scheduler_start() will never return, so even if your main() were
correct, the last printf() would never be seen.

> 
> 	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.

It is likely that this is as far as the stack gets before the second
call to cyg_scheduler_start() crashes the system.

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

Of course it works with interrupts, there are several targets in
anoncvs that use the LAN91CXX driver. We have also used it in a number
of other targets with no problems.

Take a look at the targets in anoncvs. I'm sure at least one of those
uses the 32 bit access code. It must have been added for a reason.

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

Again, find a example in the repository. By the look of it the
XSEngine is close to your configuration.

-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


-- 
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]