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

Joe Porthouse jporthouse@toptech.com
Thu Jul 27 20:11:00 GMT 2006

Nick and Andy,
	Thank you for your replies.  The information supplied, gave me
enough knowledge to get the driver up and running.
	The two issues I had were:
	#1.  Needed the latest SMSC driver to get the 32 bit access working
correctly in interrupt mode.
	#2.  My calling the cyg_scheduler_start() a second time was locking
everything up.
	Now to start with my IP configuration screens and application socket
	Thanks you again.
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750

-----Original Message-----
From: nickg@xl5.calivar.com [mailto:nickg@xl5.calivar.com] On Behalf Of Nick
Sent: Thursday, July 27, 2006 5:35 AM
To: jporthouse@toptech.com
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] 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

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

More information about the Ecos-discuss mailing list