9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: [9fans] usb configuration
Date: Mon,  3 Mar 2014 13:37:47 +0000	[thread overview]
Message-ID: <7921ce54112efa14d3fb71b216cf24b9@hamnavoe.com> (raw)

I am curious about this comment:

/n/sources/plan9/sys/src/cmd/usb/lib/dev.c:231,235
	/*
	 * Several hubs are returning descriptors of 17 bytes, not 18.
	 * We accept them and leave number of configurations as zero.
	 * (a get configuration descriptor also fails for them!)
	 */

Does anyone know which particular devices this refers to?  Has anyone tried
issuing the Rgetdesc command with a length of 18 bytes instead of 18+255 bytes
as the existing code does?  The usb specification says a device descriptor
is 18 bytes, so why not read exactly that length?  In the case of the hub in the
iMac keyboard, doing that seems to get rid of the "bug: out of configurations"
message.  I'm inclined to offer that as a correction but not if it would break
any known devices.




             reply	other threads:[~2014-03-03 13:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 13:37 Richard Miller [this message]
2014-03-03 13:45 ` erik quanstrom
2014-03-03 13:52   ` Richard Miller
2014-03-03 14:27     ` erik quanstrom
2014-03-03 14:42 ` cinap_lenrek
2014-03-03 14:56   ` Richard Miller
2014-03-03 15:24     ` cinap_lenrek
2014-03-03 15:32       ` erik quanstrom
2014-03-03 15:37     ` erik quanstrom
2014-03-03 17:29       ` Ramakrishnan Muthukrishnan
2014-03-03 17:32         ` erik quanstrom
2014-03-03 17:41           ` Ramakrishnan Muthukrishnan
2014-03-03 18:24             ` Joseph Thompson
2014-03-03 18:25             ` erik quanstrom
2014-03-04 11:11             ` Nicolas Bercher
2014-03-04 11:28               ` Steve Simon
2014-03-04 17:40                 ` Mark van Atten
2014-03-05  9:29                 ` Nicolas Bercher

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=7921ce54112efa14d3fb71b216cf24b9@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /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 NNTP newsgroup(s).