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: Re: [9fans] Raspberry Pi: won't recognize the USB mouse
Date: Mon,  3 Mar 2014 11:05:09 +0000	[thread overview]
Message-ID: <0a0177d44168b739667f2b51ac67cea8@hamnavoe.com> (raw)
In-Reply-To: <ed1cfbeaf40800d0e3930f9d2c7df27b@mikro.quanstro.net>

> after looking over the spec, i didn't see this question addressed.  do you?
> it's a byte, so in theory there could be 255 configurations.

Section 9.6 on device descriptors - this applies to every device,
not just hubs.  (Although the iMac keyboard does in fact contain
a hub.)

Yes of course there can be up to 255 configurations.  In practice
there won't, but the word "bug" in the error message hints that the
programmer was aware that it was not particularly good practice to
declare a fixed size array instead of looking at bNumConfigurations
and allocating an array of the correct size.

A large part of the reason the usb keyboard/mouse driver has generated
so much embarrassment is that it's got too many fixed size arrays, which
keep overflowing when a new raspberry pi user tries another complicated
type of mouse or keyboard.

A case could be made for just reading in one configuration descriptor
and ignoring any others, since as far as I can see every plan 9 usb
device driver selects config 0 without checking for other possibilities.

But looking at this particular keyboard, I think the flurry of usb i/o
errors suggests there's a more fundamental problem than descriptor
parsing.  That's why I asked whether you'd changed something in your
usb kernel driver.




  reply	other threads:[~2014-03-03 11:05 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-01  5:43 Michael Hansen
2014-03-01 12:09 ` Richard Miller
2014-03-01 12:12 ` erik quanstrom
2014-03-02 10:46   ` Richard Miller
2014-03-02 14:57     ` erik quanstrom
2014-03-02 19:54       ` Richard Miller
2014-03-02 23:22         ` Winston Kodogo
2014-03-03  1:29         ` erik quanstrom
2014-03-03 11:05           ` Richard Miller [this message]
2014-03-03 11:24   ` Richard Miller
2014-03-03 13:39     ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2014-03-02  1:12 Michael Hansen
2014-03-02  1:39 ` erik quanstrom
2014-02-26 16:27 Ramakrishnan Muthukrishnan
2014-02-26 17:19 ` Richard Miller
2014-02-27 16:27   ` Ramakrishnan Muthukrishnan
2014-02-27 16:35     ` Ramakrishnan Muthukrishnan
2014-02-27 17:05       ` Ramakrishnan Muthukrishnan
2014-02-27 17:08         ` Lyndon Nerenberg
2014-02-27 17:31           ` Ramakrishnan Muthukrishnan
2014-02-27 18:03             ` Bakul Shah
2014-02-28 11:10             ` Ramakrishnan Muthukrishnan
2014-02-28 11:28               ` Richard Miller
2014-02-28 14:12                 ` Ramakrishnan Muthukrishnan
2014-02-28 14:35                   ` Bakul Shah
2014-02-28 15:12                     ` Ramakrishnan Muthukrishnan
2014-02-28 14:45             ` Anthony Sorace
2014-02-28 15:15               ` Ramakrishnan Muthukrishnan
2014-02-28 16:24               ` Bakul Shah
2014-03-04 14:12                 ` Ramakrishnan Muthukrishnan
2014-03-04 14:27                   ` erik quanstrom
2014-03-04 15:54                     ` Ramakrishnan Muthukrishnan
2014-03-04 16:26                       ` erik quanstrom
2014-03-04 18:18                         ` Bakul Shah
2014-03-04 18:26                           ` erik quanstrom
2014-03-08 14:56                           ` Ramakrishnan Muthukrishnan
2014-03-08 14:59                             ` erik quanstrom
2014-03-09 13:25                               ` Ramakrishnan Muthukrishnan
2014-03-09 13:46                                 ` erik quanstrom
2014-03-05 10:57                     ` Richard Miller
2014-03-05 10:59                     ` Richard Miller
2014-02-27 17:10         ` erik quanstrom
2014-02-27 17:15       ` Steve Simon
2014-02-26 17:22 ` Ramakrishnan Muthukrishnan
2014-02-28  4:31   ` Grant Mather
2014-02-28  9:05     ` erik quanstrom

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=0a0177d44168b739667f2b51ac67cea8@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).