Alan,

Please apply to 2.4.0-test1-acLatest.

Thanks,
~Randy


Stephen-
I can reproduce the error easily with the file that you sent to me
using my Epson SC 740 and the stcany driver.  I haven't tried any
other drivers yet.

You had some valuable info in your email (which I can't see right
now for some reason)...about the printer not seeing any errors
and retval == 0.  It turns out that usblp_read_status() didn't
check the "I have an error" bit correctly since it's a low-true
(negative logic) bit.  The attached patch corrects this, so now
I get lots of "out of paper" errors in my kernel log file (maybe
too many).  (The rest of the patch is cosmetic.)

I expect that more patches are still required in this area, but
I'm out of time today.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- printer.c.org       Sun Jun 18 12:01:49 2000
+++ printer.c   Sun Jun 18 15:35:40 2000
@@ -138,7 +138,7 @@
                return -EIO;
        }
 
-       if (status & LP_PERRORP) {
+       if (~status & LP_PERRORP) {
                if (status & LP_POUTPA) {
                        info("usblp%d: out of paper", usblp->minor);
                        return -ENOSPC;
@@ -200,11 +200,11 @@
        struct usblp *usblp = file->private_data;
 
        usblp->used = 0;
-                       
+
        if (usblp->dev) {
                if (usblp->bidir)
-                       usb_unlink_urb(&usblp->readurb);
-               usb_unlink_urb(&usblp->writeurb);
+                       usb_unlink_urb(&usblp->readurb);
+               usb_unlink_urb(&usblp->writeurb);
                return 0;
        }
 
@@ -270,7 +270,7 @@
                                if (signal_pending(current))
                                        return writecount ? writecount : -EINTR;
 
-                               timeout = interruptible_sleep_on_timeout(&usblp->wait, 
timeout);        
+                               timeout = interruptible_sleep_on_timeout(&usblp->wait, 
+timeout);
                        }
                }
 
@@ -288,14 +288,14 @@
                        usblp->writeurb.transfer_buffer_length = 0;
                } else {
                        if (!(retval = usblp_check_status(usblp))) {
-                               err("usblp%d: error %d writing to printer",
-                                       usblp->minor, usblp->writeurb.status);
+                               err("usblp%d: error %d writing to printer (retval=%d)",
+                                       usblp->minor, usblp->writeurb.status, retval);
                                return -EIO;
                        }
 
                        return retval;
                }
-       
+
                if (writecount == count)
                        continue;
 
@@ -326,7 +326,7 @@
                while (usblp->readurb.status == -EINPROGRESS) {
                        if (signal_pending(current))
                                return -EINTR;
-                       interruptible_sleep_on(&usblp->wait);   
+                       interruptible_sleep_on(&usblp->wait);
                }
        }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to