Hi,

        I'm trying to cleanup and optimise the current Linux IrDA-USB
dongle driver. Everything going well so far, apart from the issue of
turnaround time.

        Currently, after the link is turnaround, the driver do a busy
wait of the amount of the specified turnaround time, like this :
                -> Rx RR frame
                        int_off;
                        busy_wait(turnaround);
                        send_over_usb(irlap_frame);
                        int_on;
                <- Tx frame
        As you can imagine, this busy wait is killing the computer.

        I was reading carefully the USB spec 1.0 and I found this gem :
----------------------------
A USB IrDA Bridge device uses two bulk endpoints (one in and one out)
to exchange IrLAP frames between the host and an IrDA device. Thus,
the half duplex IrLAP protocol is actually transmitted over what
appears to be a full duplex communications channel. Due to this fact,
the USB IrDA Bridge device optimizes turn-around time between itself
and the IrDA device. IrLAP frames are exchanged based on USB bus
availability rather than forcing the USB driver client to track IrDA
device turn-around time.
                        (This is chapter 4 at page 6)
----------------------------
        The way I read it (but I might be wrong), the USB dongle does
the link turnaround delay for us and we should not wait in the driver
but just send it the frame in advance.
        That sounds too good to be true.

        As there is absolutely no command from user space to set this
link turnaround delay, I must assume that the USB dongle would be
clever enough to parse the IrLAP connection and QoS parameters to
figure out the partner turnaround time.
        That's possible, but I was not assuming that much high level
intelligence in the dongle.
        Anyway, I also know for a fact that USB dongles are very
liberal in their interpretation on the spec.

        So, does anybody knows what the current USB dongles do in the
respect ? Are they anywhere close to do that ?

        Bonus question : most USB dongles have an extra interrupt pipe
(inward). Does anybody knows what it is used for and how to use it ?
By any chance, would it be what the driver is supposed to use to do
the turnaround time properly ?

        Thanks very much for taking the time to read my stuff...

        Jean
_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to