| 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 |
| 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 |
|
|