public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Andrea Scian" <andrea.scian@wawnet.biz>
To: <ecos-discuss@sources.redhat.com>
Subject: [ECOS] Socket problem with smsc LAN91C96
Date: Thu, 16 Oct 2003 13:13:00 -0000	[thread overview]
Message-ID: <004501c393e7$d28c3bc0$1800a8c0@llandrews> (raw)

Hi all!
I have a problem while running eCos on an ARM7TDMI (S3C44B0) based board
with a SMSC LAN91C96 ethernet controller.
While the whole TCP/IP stack works fine (I'm using OpenBSD at the moment) I
have a problem when I call the socket "connect" function after a hardware
reset.

This is what happen to me: inside a thread, after calling
init_all_network_interfaces(), I create a socket (AF_INET, SOCK_STREAM) and
call connect() to a LAN server. When connect() is called after a HW reset it
waits a long time (more or less it's 4 seconds) before send the first TCP/IP
packet, after that it all works good.
This happen only after a HW reset, because when, later, I need to restart
the system (I just set the program counter to start from the first location,
so behaving like a reset exception) it doesn't wait, that is the connect()
end only a few millis after it's called and the connection is full working.
Please note that the "reset exception" caused a reset of the whole board
(micro, ram, ethernet controller...)
If, after a HW reset, I wait that 4 second somewhere else (even with a dumb
"for" cicle inside cyg_user_start() before starting the scheduler) the
"connect" call doesn't stop and I get the connection without wait!

It's not so bad, the application works good both times, but I'm having
problem when I have to do a HW reset or when the power goes down because of
that 4 second that slow down the whole application.

I'm I doing something wrong or what?

Has anybody had this kind of problem before? Any clue about what is
happening?

Thank you in advance!


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

             reply	other threads:[~2003-10-16 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16 13:13 Andrea Scian [this message]
2003-10-16 13:45 ` Andrew Lunn
2003-10-24 17:26   ` Andrea Scian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004501c393e7$d28c3bc0$1800a8c0@llandrews' \
    --to=andrea.scian@wawnet.biz \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).