Andrea Arcangeli (arcangeli@mbox.queen.it)
Fri, 26 Jun 1998 21:04:33 +0200 (CEST)
On Thu, 25 Jun 1998, Andrea Arcangeli wrote:
>On Thu, 25 Jun 1998, Henrik Storner wrote:
>
>>Polled mode printing works fine for me with this patch applied. Interrupt
>
>Good, so I' ll start sending you some debugging patches. Everybody is
>interested in this process (for testing or developing a fix) can ask to
>me and will be included in To:.
Here the fix (thanks to Henrik Storner for the testing!). This patch has
nothing to do with my lp workaround logic in 107 and so now that polling
mode returned to work for all (I hope ;-) also the interrupt mode started
to work also for people that never got it working.
Patch against 107. I' d like to hear some other succesfully report before
forward the patch to Linus.
Andrea[s] Arcangeli
--- linux/drivers/char/lp.c 1998/06/20 13:09:57 1.1
+++ linux/drivers/char/lp.c 1998/06/26 10:37:15
@@ -74,9 +74,9 @@
* BUSY _________ _______
* |____________|
*
- * I discovered this using the printer scanner:
+ * I discovered this using the printer scanner that you can find at:
*
- * http://www.cs.unibo.it/~arcangel/pscan/pscan-0.4.tar.gz
+ * ftp://e-mind.com/pub/linux/pscan/
*
* 11 May 98, Andrea Arcangeli
*/
@@ -326,8 +326,7 @@
lp_table[minor].irq_detected = 0;
lp_table[minor].irq_missed = 0;
- if (!LP_POLLED(minor))
- w_ctr(minor, LP_PSELECP | LP_PINITP | LP_PINTEN);
+ w_ctr(minor, LP_PSELECP | LP_PINITP);
do {
bytes_written = 0;
@@ -335,7 +334,7 @@
if (copy_from_user(lp->lp_buffer, buf, copy_size))
{
- w_ctr(minor, LP_PINITP);
+ w_ctr(minor, LP_PSELECP | LP_PINITP);
return -EFAULT;
}
@@ -357,7 +356,7 @@
if (signal_pending(current))
{
- w_ctr(minor, LP_PINITP);
+ w_ctr(minor, LP_PSELECP | LP_PINITP);
if (total_bytes_written + bytes_written)
return total_bytes_written + bytes_written;
else
@@ -370,7 +369,7 @@
if (lp_check_status(minor))
{
- w_ctr(minor, LP_PINITP);
+ w_ctr(minor, LP_PSELECP | LP_PINITP);
return rc ? rc : -EIO;
}
@@ -414,7 +413,7 @@
} while (count > 0);
- w_ctr(minor, LP_PINITP);
+ w_ctr(minor, LP_PSELECP | LP_PINITP);
return total_bytes_written;
}
-- 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 Wed 30 Dec 1998 - 10:17:53 EST