Re: [PATCH] USB and Driver Core patches for 2.6.10

From: Greg KH (greg_at_kroah.com)
Date: 01/08/05

  • Next message: Greg KH: "Re: [PATCH] USB and Driver Core patches for 2.6.10"
    Date:	Fri, 7 Jan 2005 21:47:38 -0800
    To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
    
    

    ChangeSet 1.1938.439.51, 2005/01/06 17:29:21-08:00, oliver@neukum.org

    [PATCH] USB: another workaround for cdc-acm

    there are a lot of buggy modems.

    Signed-Off-By: Oliver Neukum <oliver@neukum.name>
    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

     drivers/usb/class/cdc-acm.c | 15 +++++++++++++++
     drivers/usb/class/cdc-acm.h | 3 ++-
     2 files changed, 17 insertions(+), 1 deletion(-)

    diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
    --- a/drivers/usb/class/cdc-acm.c 2005-01-07 15:37:12 -08:00
    +++ b/drivers/usb/class/cdc-acm.c 2005-01-07 15:37:12 -08:00
    @@ -532,7 +532,17 @@
             u8 call_management_function = 0;
             int call_interface_num = -1;
             int data_interface_num;
    + unsigned long quirks;
     
    + /* handle quirks deadly to normal probing*/
    + quirks = (unsigned long)id->driver_info;
    + if (quirks == NO_UNION_NORMAL) {
    + data_interface = usb_ifnum_to_if(usb_dev, 1);
    + control_interface = usb_ifnum_to_if(usb_dev, 0);
    + goto skip_normal_probe;
    + }
    +
    + /* normal probing*/
             if (!buffer) {
                     err("Wierd descriptor references");
                     return -EINVAL;
    @@ -607,6 +617,7 @@
                     if (data_interface_num != call_interface_num)
                             dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.");
     
    +skip_normal_probe:
             if (usb_interface_claimed(data_interface)) { /* valid in this context */
                     dev_dbg(&intf->dev,"The data interface isn't available\n");
                     return -EBUSY;
    @@ -805,6 +816,10 @@
      */
     
     static struct usb_device_id acm_ids[] = {
    + /* quirky and broken devices */
    + { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
    + .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
    + },
             /* control interfaces with various AT-command sets */
             { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 1) },
             { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 2) },
    diff -Nru a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
    --- a/drivers/usb/class/cdc-acm.h 2005-01-07 15:37:12 -08:00
    +++ b/drivers/usb/class/cdc-acm.h 2005-01-07 15:37:12 -08:00
    @@ -125,4 +125,5 @@
     
     #define CDC_DATA_INTERFACE_TYPE 0x0a
     
    -
    +/* constants describing various quirks and errors */
    +#define NO_UNION_NORMAL 1

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Greg KH: "Re: [PATCH] USB and Driver Core patches for 2.6.10"

    Relevant Pages

    • Re: PCI memory allocation bug with CONFIG_HIGHMEM
      ... The "unmarked hardware" is why we have PCI quirks. ... not only are the BIOSes buggy and don't give a ... anybody who uses the PnP-BIOS is much more likely ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] Real-Time Preemption, -RT-2.6.12-rc1-V0.7.43-00
      ... No quirks so far, on the UP laptop. ... Building now for the SMP/HT desktop. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [BK PATCHES] libata fixes
      ... > Won't this oops if some Intel device would be hotplugged? ... the quirks have no need to be run after initial boot. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: MTRR vesafb and wrong X performance
      ... > Even that wasn't foolproof however, and there were a few quirks ... You may have dithering depth apertures, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] PCI and I2C fixes for 2.6.8
      ... PCI: fix compiler warning in quirks file, ... * The bridge optimization stuff has been removed. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)

    Loading