[lkml]   [2004]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [linux-usb-devel] [PATCH] visor: Fix Oops on disconnect 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

    The packet capture available at shows the
    attempt to send both VISOR_GET_CONNECTION_INFORMATION (3) and
    PALM_GET_EXT_CONNECTION_INFORMATION (4) requests. Both times nothing is

    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
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.020 / U:47.204 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site