]> git.zerfleddert.de Git - usb-driver/commitdiff
more dumps
authormichael <michael>
Thu, 22 Feb 2007 13:59:24 +0000 (13:59 +0000)
committermichael <michael>
Thu, 22 Feb 2007 13:59:24 +0000 (13:59 +0000)
usb-driver.c

index cf17890ec75ba56780d63b3ce40e4bae173f1af6..d613865f4d94ed14b3c289365928b0a36ce4d12f 100644 (file)
@@ -139,6 +139,24 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                        }
                        break;
 
+               case EVENT_REGISTER:
+                       fprintf(stderr,"EVENT_REGISTER\n");
+                       {
+                               struct event *e = (struct event*)(wdheader->data);
+                               int i;
+
+                               fprintf(stderr,"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->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: %x:%x, 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);
+
+                               ret = (*ioctl_func) (fd, request, wdioctl);
+
+                               fprintf(stderr,"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->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: %x:%x, 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);
+                       }
+                       break;
+
                case TRANSFER:
                        fprintf(stderr,"TRANSFER\n");
                        ret = (*ioctl_func) (fd, request, wdioctl);
@@ -151,7 +169,19 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
 
                case INT_WAIT:
                        fprintf(stderr,"INT_WAIT\n");
-                       ret = (*ioctl_func) (fd, request, wdioctl);
+                       {
+                               struct interrupt *it = (struct interrupt*)(wdheader->data);
+
+                               fprintf(stderr," Handle: %lu, Options: %lx, ncmds: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds);
+
+                               hexdump(wdheader->data, wdheader->size);
+                               ret = (*ioctl_func) (fd, request, wdioctl);
+                               //ret = 0;
+                               //it->dwCounter++;
+                               fprintf(stderr,"\n\n");
+                               hexdump(wdheader->data, wdheader->size);
+                               fprintf(stderr,"\n");
+                       }
                        break;
 
                case CARD_UNREGISTER:
@@ -164,11 +194,6 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                        ret = (*ioctl_func) (fd, request, wdioctl);
                        break;
 
-               case EVENT_REGISTER:
-                       fprintf(stderr,"EVENT_REGISTER\n");
-                       ret = (*ioctl_func) (fd, request, wdioctl);
-                       break;
-
                default:
                        ret = (*ioctl_func) (fd, request, wdioctl);
        }
Impressum, Datenschutz