paride: pf driver fixes
commite62aa046e1748b8ea0354951685478030392cf56
authorOndrej Zary <linux@rainbow-software.org>
Thu, 15 Nov 2007 00:59:24 +0000 (14 16:59 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:39 +0000 (14 18:45 -0800)
tree075f0698a025da5518d70ad90336d42aa09ffb52
parentba0a7f39ce8cd54a1b2f3adb03509ff251a91bde
paride: pf driver fixes

The pf driver for parallel port floppy drives seems to be broken.  At least
with Imation SuperDisk with EPAT chip, the driver calls pi_connect() and
pi_disconnect after each transferred sector.  At least with EPAT, this
operation is very expensive - causes drive recalibration.  Thus, transferring
even a single byte (dd if=/dev/pf0 of=/dev/null bs=1 count=1) takes 20
seconds, making the driver useless.

The pf_next_buf() function seems to be broken as it returns 1 always (except
when pf_run is non-zero), causing the loop in do_pf_read_drq (and
do_pf_write_drq) to be executed only once.

The following patch fixes this problem.  It also fixes swapped descriptions in
pf_lock() function and removes DBMSG macro, which seems useless.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/paride/pf.c