public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bodonoghue@codehermit.ie>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PXA27x usbtty start up sequence
Date: Mon, 21 May 2007 00:59:46 +0100	[thread overview]
Message-ID: <20070521005946.3b3ab7b9@localhost.localdomain> (raw)
In-Reply-To: <20070521001158.6056ad5d@localhost.localdomain>

On Mon, 21 May 2007 00:11:58 +0100
Bryan O'Donoghue <bodonoghue@codehermit.ie> wrote:

> On Mon, 21 May 2007 00:23:42 +0200
> Rodolfo Giometti <giometti@enneenne.com> wrote:
>  
> > The problem is that the defice __is__ into configured state (USB
> > cable is connected and /dev/ttyUSB0 is running) but nobody has
> > opened the serial line (no minicom/kermit running).
> > 
> > So, I suppose, the above modification is useless...

For some reason I seem to fail to parse English occasionally I
thought you'd said your device was in the configured state but, not
physically connected to the HOST ! oops !

You are of course right checking for state configured would not fix
your stall problem if the cable is connected to your PC but, this
pseudo-code below would be a better improvement still... since we
wouldn't even bother _trying_ to send unless the bus was in the
configured state... which is what my warped mind was in fact
attempting to get at.

if(data && state == STATE_CONFIGURED && retries < 10000L){
	/* Blah */
}

You're still wrong about not having to deal with EP0 control requests
after host enumeration, though. g_serial might let you away with it
but, that's just g_serial's oddities I guess. There's no reason a host
couldn't or wouldn't send you periodic get_status requests using
g_serial or any other high level USB protocol and so theoretically if
you don't respond to EP0 control requests the host can reset you ! I
doubt any other driver then g_serial would let you away with this
either !

I still think the fix is #1 above but, having re-read your email

#2
If on TX timeout you propagate an error code upwards to write_buffer,
it should be sufficient I think. write_buffer should be
smart enough to retry tx on the data that didn't get sent and
eventually the __puts() function itself should just give-up !

      reply	other threads:[~2007-05-20 23:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 23:19 [U-Boot-Users] PXA27x usbtty start up sequence Rodolfo Giometti
2007-05-13 12:25 ` Bryan O'Donoghue
2007-05-14  6:35   ` Rodolfo Giometti
2007-05-18 17:15   ` Rodolfo Giometti
2007-05-20 13:54     ` Bryan O'Donoghue
2007-05-20 16:07       ` Rodolfo Giometti
2007-05-20 21:40         ` Bryan O'Donoghue
2007-05-20 22:23           ` Rodolfo Giometti
2007-05-20 23:11             ` Bryan O'Donoghue
2007-05-20 23:59               ` Bryan O'Donoghue [this message]

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=20070521005946.3b3ab7b9@localhost.localdomain \
    --to=bodonoghue@codehermit.ie \
    --cc=u-boot@lists.denx.de \
    /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