So then parport_write is probably buggy because it's losing data silenty while
the printer is off. So the below is probably a band aid. Really some printer
acts in a different way (see the LP_CAREFUL hack in 2.2.x) so it maybe that
parport_write is ok on some printer and it would need something like a
LP_CAREFUL option to work also on some other printer. Or maybe some parport
handshake is badly designed in hardware and it cannot report errors (or maybe
there's the hardware compatibility mode that cannot know about LP_CAREFUL to
workaround some printer behaviour). In such case your patch is probably the
only way to go (but almost certainly for the software compatibility mode it
should be possible to report errors via parport_write as we do in 2.2.x).
> I also only get one DMA write timeout when putting the printer in
> offline mode during sending, instead of repeated timeouts as I got
> with the previous patch.
I see, it makes sense to try to parport_write only when errors goes away, but I
think it's nicer to have lp_error or lp_check_status that loops internally in
interruptible mode if LP_ABORT isn't set via lptune. probably the code should
be restructured a bit.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/