/[pcsclite]/trunk/Drivers/ccid/src/ccid_usb.c
ViewVC logotype

Diff of /trunk/Drivers/ccid/src/ccid_usb.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1255 by rousseau, Fri Aug 6 11:18:41 2004 UTC revision 1256 by rousseau, Thu Sep 30 13:57:07 2004 UTC
# Line 58  Line 58 
58   * Manufacturer and Product ID are also used to identify the device */   * Manufacturer and Product ID are also used to identify the device */
59  #define ALLOW_PROPRIETARY_CLASS  #define ALLOW_PROPRIETARY_CLASS
60    
61    /*
62     * The O2Micro OZ776S reader has a wrong USB descriptor
63     * The extra[] field is associated with the last endpoint instead of the
64     * main USB descriptor
65     */
66    #define O2MICRO_OZ776_PATCH
67    
68  #define BUS_DEVICE_STRSIZE 32  #define BUS_DEVICE_STRSIZE 32
69    
70  typedef struct  typedef struct
# Line 588  static int get_end_points(struct usb_dev Line 595  static int get_end_points(struct usb_dev
595                  }                  }
596          }          }
597          else          else
598                  /* we keep this in case a reader reports a bad class value */                  /* only one interface found */
599                  usb_interface = dev->config->interface;                  usb_interface = dev->config->interface;
600    
601    #ifdef O2MICRO_OZ776_PATCH
602            if (usb_interface != NULL
603                    && (OZ776 == (dev->descriptor.idVendor << 16)
604                    + dev->descriptor.idProduct)
605                    && (0 == usb_interface->altsetting->extralen)) /* this is the bug */
606            {
607                    int i;
608    
609                    for (i=0; i<usb_interface->altsetting->bNumEndpoints; i++)
610                    {
611                            /* find the extra[] array */
612                            if (54 == usb_interface->altsetting->endpoint[i].extralen)
613                            {
614                                    /* get the extra[] from the endpoint */
615                                    usb_interface->altsetting->extralen = 54;
616                                    usb_interface->altsetting->extra =
617                                            usb_interface->altsetting->endpoint[i].extra;
618                                    break;
619                            }
620                    }
621            }
622    #endif
623    
624          return usb_interface;          return usb_interface;
625  } /* get_ccid_usb_interface */  } /* get_ccid_usb_interface */
626    

Legend:
Removed from v.1255  
changed lines
  Added in v.1256

  ViewVC Help
Powered by ViewVC 1.1.5