LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: nardelli <jnardelli@infosciences.com>
To: jkroon@cs.up.ac.za
Cc: Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] [PATCH] visor: Fix Oops on disconnect
Date: Fri, 21 May 2004 16:22:33 -0400 [thread overview]
Message-ID: <40AE6509.5070507@infosciences.com> (raw)
In-Reply-To: <36233.165.165.44.119.1085169684.squirrel@165.165.44.119>
jkroon@cs.up.ac.za wrote:
>>I've made all of the changes that recommended below. If it looks like
>>I've missed anything, please indicate so.
>>
>>
>
>
> [snip]
>
>
>>>>+ if (num_ports <= 0 || num_ports > 2) {
>>>
>>>
>>>I like the idea of this check, but you are trying to test for a negative
>>>value on a __u16 variable, which is always unsigned. So that check will
>>>never be true :)
>
>
> What happens if num_ports == 0? Not that hardware should ever report that.
>
> [snip]
>
>
Short answer:
A warning is logged and num_ports defaults to 2.
Long answer:
Unfortunately, it does not apear that this class of device sends any kind of
connect info back in repsonse to VISOR_GET_CONNECTION_INFORMATION,
PALM_GET_EXT_CONNECTION_INFORMATION, or for that matter any request under
200 (or some similiar number - I don't remember how far I tested).
Based upon a usb packet capture under windoze, I believe that the device
is not capable of this. I'd really like some kind of documentation on
the connection protocol, but I've come up completely empty handed in that
regard.
The packet capture available at
http://bugzilla.kernel.org/attachment.cgi?id=2924&action=view shows the
attempt to send both VISOR_GET_CONNECTION_INFORMATION (3) and
PALM_GET_EXT_CONNECTION_INFORMATION (4) requests. Both times nothing is
returned.
In any case, when no valid connection info is found, num_ports is initially
set to 0, a warning is logged, and num_ports defaults to 2.
--
Joe Nardelli
jnardelli@infosciences.com
next prev parent reply other threads:[~2004-05-21 20:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-20 23:08 nardelli
2004-05-21 4:30 ` [linux-usb-devel] " Greg KH
2004-05-21 5:03 ` Pete Zaitcev
2004-05-21 14:52 ` nardelli
2004-05-21 14:48 ` nardelli
2004-05-21 15:05 ` Alan Stern
2004-05-21 17:08 ` nardelli
2004-05-21 15:41 ` Greg KH
2004-05-21 19:51 ` nardelli
2004-05-21 20:01 ` jkroon
2004-05-21 20:22 ` nardelli [this message]
2004-05-21 20:44 ` Greg KH
2004-05-21 21:44 ` nardelli
2004-05-21 21:56 ` Greg KH
2004-05-21 22:04 ` nardelli
2004-05-21 22:30 ` Greg KH
2004-05-24 17:20 ` nardelli
2004-05-24 19:38 ` nardelli
2004-05-24 20:06 ` Greg KH
2004-05-24 20:21 ` nardelli
2004-05-25 13:15 ` nardelli
2004-05-24 20:08 ` Greg KH
2004-05-24 21:42 ` nardelli
2004-05-25 18:30 ` Greg KH
2004-05-25 18:55 ` nardelli
2004-05-21 4:31 ` Greg KH
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=40AE6509.5070507@infosciences.com \
--to=jnardelli@infosciences.com \
--cc=greg@kroah.com \
--cc=jkroon@cs.up.ac.za \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--subject='Re: [linux-usb-devel] [PATCH] visor: Fix Oops on disconnect' \
/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
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).