[Ftdi-usb-sio-devel] Bug in ftdi_sio driver. Re: low_latency flag for ftdi_sio
Brought to you by:
bryder
From: Boris Z. <bs_...@ya...> - 2007-04-01 13:50:00
|
Hello, Well I've found how I could possibly reduce latency: writing to latency_timer file under sysfs. BUT reading/writing this file crashes the kernel. It happens because these lines struct usb_serial_port *port = to_usb_serial_port(dev); struct ftdi_private *priv = usb_get_serial_port_data(port); in all sysfs attribute callbacks produce wrong pointer to usb_serial_port, because "struct device" pointer passed to device_create_file in "create_sysfs_attrs" doesn't points to "struct device" embedded in usb_serial_port.(In my case above "priv" pointer turned out to be NULL and was trapped by kernel producing Oops, but kernel could crash even earlier while dereferencing "port" pointer). This happens with FC6's kernel 2.6.20. best regards, Boris Boris Zingerman <bs_...@ya...> wrote: Hello, I have some device that uses ftdi chip to communicate with host computer. I set low latency flag in this manner struct serial_struct serial_info; ioctl(m_fd, TIOCGSERIAL, &serial_info) ; serial_info.flags |= ASYNC_LOW_LATENCY; ioctl(m_fd, TIOCSSERIAL, &serial_info) ; setserial reports that low_latency flag is indeed set, but round-trip time for short commands is about 15 msec. This device has also regular RS232 input and the same code produces 1.5msec roundtrip time for the same commands (ten times faster !!). Is low_latency flag has no effect on ftdi_sio driver ? If so how can I improve latency. Best regards, Boris Zingerman --------------------------------- Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. --------------------------------- 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut. |