{
struct event *e = (struct event*)(wdheader->data);
struct usb_bus *bus;
+ char* device_num;
+ char* remainder;
+ int devnum = -1;
int i;
DPRINTF("handle: %lu, action: %lu, status: %lu, eventid: %lu, cardtype: %lu, kplug: %lu, options: %lu, dev: %lx:%lx, unique: %lu, ver: %lu, nummatch: %lu\n",
e->u.Usb.dwUniqueID, e->dwEventVer,
e->dwNumMatchTables);
+ device_num=getenv("XILINX_USB_DEVNUM");
+ if (device_num!=NULL) {
+ DPRINTF("XILINX_USB_BUS=%s\n",device_num);
+ devnum=strtol(device_num,&remainder,10);
+ if (device_num==remainder) /* no integer in env variable */
+ devnum=-1;
+ }
+
+
for (i = 0; i < e->dwNumMatchTables; i++) {
DPRINTF("match: dev: %04x:%04x, class: %x, subclass: %x, intclass: %x, intsubclass: %x, intproto: %x\n",
if((desc->idVendor == e->matchTables[i].VendorId) &&
(desc->idProduct == e->matchTables[i].ProductId) &&
(desc->bDeviceClass == e->matchTables[i].bDeviceClass) &&
- (desc->bDeviceSubClass == e->matchTables[i].bDeviceSubClass)) {
+ (desc->bDeviceSubClass == e->matchTables[i].bDeviceSubClass) &&
+ ((devnum == -1) || (dev->devnum == devnum)) ) {
int ac;
for (ac = 0; ac < desc->bNumConfigurations; ac++) {
struct usb_interface *interface = dev->config[ac].interface;