+ case CARD_UNREGISTER:
+ fprintf(stderr,"CARD_UNREGISTER\n");
+#ifndef NO_WINDRVR
+ ret = (*ioctl_func) (fd, request, wdioctl);
+#endif
+ break;
+
+ case EVENT_PULL:
+#ifdef DEBUG
+ fprintf(stderr,"EVENT_PULL\n");
+#endif
+ {
+ struct event *e = (struct event*)(wdheader->data);
+#ifdef DEBUG
+ int i;
+
+ fprintf(stderr,"handle: %lu, action: %lu, status: %lu, eventid: %lu, cardtype: %lx, kplug: %lu, options: %lu, dev: %lx:%lx, unique: %lu, ver: %lu, nummatch: %lu\n", e->handle, e->dwAction, e->dwStatus, e->dwEventId, e->dwCardType, e->hKernelPlugIn, e->dwOptions, e->u.Usb.deviceId.dwVendorId, e->u.Usb.deviceId.dwProductId, e->u.Usb.dwUniqueID, e->dwEventVer, e->dwNumMatchTables);
+ for (i = 0; i < e->dwNumMatchTables; i++)
+ fprintf(stderr,"match: dev: %04x:%04x, class: %x, subclass: %x, intclass: %x, intsubclass: %x, intproto: %x\n", e->matchTables[i].VendorId, e->matchTables[i].ProductId, e->matchTables[i].bDeviceClass, e->matchTables[i].bDeviceSubClass, e->matchTables[i].bInterfaceClass, e->matchTables[i].bInterfaceSubClass, e->matchTables[i].bInterfaceProtocol);
+#endif
+
+#ifndef NO_WINDRVR
+ ret = (*ioctl_func) (fd, request, wdioctl);
+#else
+ if (usbdevice) {
+ struct usb_interface *interface = usbdevice->config->interface;
+
+ e->dwCardType = card_type;
+ e->dwAction = 1;
+ e->dwEventId = 109;
+ e->u.Usb.dwUniqueID = 110;
+ e->matchTables[0].VendorId = usbdevice->descriptor.idVendor;
+ e->matchTables[0].ProductId = usbdevice->descriptor.idProduct;
+ e->matchTables[0].bDeviceClass = usbdevice->descriptor.bDeviceClass;
+ e->matchTables[0].bDeviceSubClass = usbdevice->descriptor.bDeviceSubClass;
+ e->matchTables[0].bInterfaceClass = interface->altsetting[0].bInterfaceClass;
+ e->matchTables[0].bInterfaceSubClass = interface->altsetting[0].bInterfaceSubClass;
+ e->matchTables[0].bInterfaceProtocol = interface->altsetting[0].bInterfaceProtocol;
+ }
+#endif
+
+#ifdef DEBUG
+ fprintf(stderr,"handle: %lu, action: %lu, status: %lu, eventid: %lu, cardtype: %lx, kplug: %lu, options: %lu, dev: %lx:%lx, unique: %lu, ver: %lu, nummatch: %lu\n", e->handle, e->dwAction, e->dwStatus, e->dwEventId, e->dwCardType, e->hKernelPlugIn, e->dwOptions, e->u.Usb.deviceId.dwVendorId, e->u.Usb.deviceId.dwProductId, e->u.Usb.dwUniqueID, e->dwEventVer, e->dwNumMatchTables);
+ for (i = 0; i < e->dwNumMatchTables; i++)
+ fprintf(stderr,"match: dev: %04x:%04x, class: %x, subclass: %x, intclass: %x, intsubclass: %x, intproto: %x\n", e->matchTables[i].VendorId, e->matchTables[i].ProductId, e->matchTables[i].bDeviceClass, e->matchTables[i].bDeviceSubClass, e->matchTables[i].bInterfaceClass, e->matchTables[i].bInterfaceSubClass, e->matchTables[i].bInterfaceProtocol);
+#endif
+
+ }
+ break;
+
+ default:
+ fprintf(stderr,"!!!Unsupported IOCTL: %x!!!\n", request);
+#ifndef NO_WINDRVR
+ ret = (*ioctl_func) (fd, request, wdioctl);
+#endif
+ break;