Hi there, I have a usb smart card reader DT3500 and the driver I wrote can run on kernel 2.6.11. Now I port it to kernel 2.6.14. Some exception occur. usb_bulk_msg returns EILSEQ.
ret = read(SmartCard[readerNum].fd, buffer, sizeof(buffer)); PRINTFD("read %d\n", ret); if (ret != 4) return IFD_COMMUNICATION_ERROR; The above snippet which returns -1 will call the function "skel_read" in the kernel module driver DT3500.c which returns -84. In fact, the error occurs when "usb_bulk_msg" is called in skel_read. I check errno.h and find that 84 is the error number of #define EILSEQ 84 /* Illegal byte sequence */ The snippet in skel_read is : ...... /* do a blocking bulk read to get data from the device */ retval = usb_bulk_msg(dev->udev, usb_rcvbulkpipe(dev->udev, dev->bulk_in_endpointAddr), dev->bulk_in_buffer, //min(dev->bulk_in_size, count), dev->bulk_in_size, &count, HZ*10); err("retval of skel_read %d", retval); ...... Reading Documentation/usb/error-codes.txt, I find that: a) CRC mismatch b) no response packet received within the prescribed bus turn-around time c) unknown USB error How to make sure what the matter really is? I still can't understand why the same code can run on kernel 2.6.11 but fail on kernel 2.6.14. :( Thanks in advanced. Best Regards, TowerGee ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel