All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Bryan <nbryan@embebidos.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Statuc code format for USB response...
Date: 06 Jul 2005 10:27:17 +0200	[thread overview]
Message-ID: <1120638436.6064.32.camel@daroca> (raw)

This is a trivial comment, but helpful for developers not expert in
debugging USB-related problems.

After issuing the following command:

U-Boot> usb reset

I obtained the following result:

      USB device not responding, giving up (status=20)

The code responsible for this is in ./common/usb.c and 
shown below:

printf("\n      USB device not responding, giving up
(status=%lX)\n",dev->status);

I _believe_ the status code returned is that defined in 
./include/usb_defs.h and that my status code of 20 is 
the value defined by the macro USB_ST_CRC_ERR.

The printf uses a %lX format specifier and it would be improved
if it was proceeded with an '0x' to inform the developer (me) 
that this is indeed a hexadecimal value.  My suggested change is

In ./common/usb.c
--------------
- printf("\n      USB device not responding, giving up
(status=%lX)\n",dev->status)
+ printf("\n      USB device not responding, giving up
(status=0x%lX)\n",dev->status)
--------------

As I said, I know this is trivial, but every little bit of 
extra information helps when debugging something that is
unfamiliar.

Flames and other comments gratefully received!

Regards,

Neil Bryan.

             reply	other threads:[~2005-07-06  8:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06  8:27 Neil Bryan [this message]
2005-07-06  8:57 ` [U-Boot-Users] Statuc code format for USB response Wolfgang Denk

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=1120638436.6064.32.camel@daroca \
    --to=nbryan@embebidos.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.