Tim Waugh (tim@cyberelk.demon.co.uk)
Sat, 8 May 1999 09:34:34 +0100 (GMT)
On Sat, 8 May 1999, Thomas Sailer wrote:
> Well yes, most of the time. But how does lp0 find its port?
> It enumerates them and then?
> Hopefully by number and not by io address
The first time lp_attach gets called, the parport is bound to lp0, etc.
> > I don't know about USB; is there no way of aborting when the FIFO has
> > data? For instance, if the peripheral just refuses to accept data that's
> > in the USB FIFO, what happens?
>
> If it's still in the host controller queues, its less of a problem
> (although removing transfer descriptors from a hc queue racelessly
> is quite difficult). If it's already in the USB->Parport chip,
> then I don't know a method to get the "residue" count.
Okay. Once it's in that chip, what happens if you then try accessing one
of the registers? Does it clear out the FIFO?
If the FIFO is cleared out in that case, can you at least find out if
there is data in there? If so, it may be easier to make change_mode block
until then and invent some mechanism for get_fifo_residue to fail
(-EINVAL, for instance). Then, when change_mode times out and returns
busy, it's up to the driver to decide whether or not to try again.
If the FIFO isn't cleared, get_fifo_residue is easy: return zero.
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Sat 08 May 1999 - 04:54:51 EDT