[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[21/98] USB: dont choose configs with no interfaces
    2.6.32-stable review patch.  If anyone has any objections, please let us know.


    From: Alan Stern <>

    commit 62f9cfa3ece58268b3e92ca59c23b175f86205aa upstream.

    This patch (as1372) fixes a bug in the routine that chooses the
    default configuration to install when a new USB device is detected.
    The algorithm is supposed to look for a config whose first interface
    is for a non-vendor-specific class. But the way it's currently
    written, it will also accept a config with no interfaces at all, which
    is not very useful. (Believe it or not, such things do exist.)

    Signed-off-by: Alan Stern <>
    Tested-by: Andrew Victor <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/usb/core/generic.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/usb/core/generic.c
    +++ b/drivers/usb/core/generic.c
    @@ -120,7 +120,7 @@ int usb_choose_configuration(struct usb_
    * than a vendor-specific driver. */
    else if (udev->descriptor.bDeviceClass !=
    - (!desc || desc->bInterfaceClass !=
    + (desc && desc->bInterfaceClass !=
    best = c;

     \ /
      Last update: 2010-05-12 10:11    [W:0.020 / U:10.108 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site