paride-pf-driver-fixes
commit33b856cf44f96d26e31c3f9c88f70e959e0b4aa6
authorOndrej Zary <linux@rainbow-software.org>
Thu, 8 Nov 2007 22:05:20 +0000 (8 22:05 +0000)
committerMatthias Urlichs <smurf@hera.kernel.org>
Wed, 14 Nov 2007 11:11:27 +0000 (14 11:11 +0000)
treef0fc53a57b06e48d4f34c89a81bcfaecbfe0c784
parentb651e038c50f53c6a7597d93a33f79544ffbfd62
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>
drivers/block/paride/pf.c