[Ftdi-usb-sio-devel] FIONREAD ioctl (0x54b1)
Brought to you by:
bryder
From: [Carlos H.] <ca...@gm...> - 2007-09-24 14:55:39
|
Hello all, We've recently switched to the following FTDI chip: Bus 5 Device 3: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0403 Future Technology Devices International, Ltd idProduct 0x6001 8-bit FIFO bcdDevice 6.00 iManufacturer 1 FTDI iProduct 2 FT232R USB UART iSerial 3 A2001DYM bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 90mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 2 FT232R USB UART Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered) I have legacy software which makes use of the FIONREAD (0x54b1) ioctl to see how many bytes are available on the FIFO, but by using the ftdi_sio module on kernel 2.6.19 I'm getting the following error (took from debug output). Sep 24 11:05:44 carlos kernel: drivers/usb/serial/ftdi_sio.c: ftdi_ioctl cmd 0x541b Sep 24 11:05:44 carlos kernel: drivers/usb/serial/ftdi_sio.c: ftdi_ioctl arg not supported - it was 0x541b - check /usr/include/asm/ioctls.h Is this really not implemented? Could it be done easily? Thanks in advance for any hints. -- []'s Carlos H. |