Re: support for TIOCSERGETLSR in ftdi_sio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 10, 2010 at 10:23:31PM +0100, W. de Hoog wrote:
> >It uses LSR to see if the data is sent?  That's a bit strange, but ok.
> Not that strange. The comments in mos7840.c suggest that this is the
> reason why they support it as well.

Sorry, you are right, I was thinking of line settings like CTS/DTR, I
forgot that this was the actual number of characters left in the device
buffer.

> >No, that wouldn't really work.  What you need is the real TIOCSERGETLSR
> >support added to the driver, as it currently doesn't support it.
> >
> >Or you can go get a different device, as a few other usb to serial
> >devices do support TIOCSERGETLSR already.  Those would be ones
> >controlled by the io_edgeport, mos7840, and mos7720 drivers.
> I only checked mos7840 and they use the result of the
> chars_in_buffer function. The ftdi_sio has one as well.
> 
> Does this function return the number of characters in the PC buffer
> or in the ftdi usb chips buffer? So if it is 0 does it mean the data
> has been sent?

That function shows the number of characters left in the PC buffer, not
the device's buffer.  0 means the data has been sent to the device, but
the UART in the device might still not have sent the data out.

I don't know if the FTDI_SIO devices can report if their uarts are empty
or not (the io_edgeport devices can), perhaps someone else on this list
who is more familiar with that chiptype can let us know.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux