HP3550 USB Printer and CUPS
John Wendel
john.wendel at metnet.navy.mil
Thu Apr 1 19:21:56 UTC 2004
On Thursday 01 April 2004 10:41 am, Andy Green wrote:
> Hi folks -
>
> I am having some unexpected trouble setting up an HP3550 USB printer on a
> box with fairly current development packages (it is about two weeks out of
> date since I could not find any mirror that had a complete set of headers
> and files since then). My parents have ordered the same printer and this
> Sunday I planned to hook it up to their similarly configured Fedora laptop
> and show them how to use The Gimp enough to print photos. So today I was
> hooking up mine so it would go smoothly at my parents.
>
> The printer is recognized fine by hotplug and the usblp module is inserted
> and correctly creates /dev/usb/lp0. I was able to print the CUPS test page
> okay from system-config-printer too. So I thought I was doing okay.
>
> I noticed in system-config-printer, and in the CUPS administration page,
> the printer status is reported as having its media tray empty, when this is
> not so. I saw in the archives a guy with this problem being told it was a
> fake error message and could be ignored.
>
> http://www.redhat.com/archives/fedora-list/2003-November/msg01768.html
>
> The main problem comes with subsequent attempts to print, basically nothing
> happens. I have been able to cancel print jobs from the CUPS admin
> webpage, but I notice processes that seems to be hung lying around, for
> example right now in ps -Af:
>
> root 2981 1341 1 18:14 ? 00:00:53 usb:/dev/usb/lp0 85 agreen
> (stdin) 1 cpi=12 lpi=7 page-bottom=86 page-left=57 page-right=57
> page-top=72 scaling=100 wrap /var/spool/cups/d00085-001
>
> This process seems to be sleeping most all the time, it is not taking any
> CPU to speak of. This hung process seems to then block all other attempts
> to print, it does not respond to kill -9 as root, and ignored the job being
> cancelled in CUPS. The first param and the last filepath are referring to
> this job being #85, which as far as CUPS is concerned is cancelled. It was
> an attempt to print a jpg in The Gimp.
>
> Does anyone have any advice or suggestions to get further debugging
> information?
>
> -Andy
>
> --
> Find your answer without waiting for replies....
> Searchable list archives at
> http://marc.theaimsgroup.com/?l=fedora-list&r=1&w=2
Google for "patch usblp". This patch fixed my printer problem, which seemed
similar to yours, of course YMMV.
Regards,
John
--- drivers/usb/class/usblp.c.orig 2004-03-05 17:09:00.412189056 +0000
+++ drivers/usb/class/usblp.c 2004-03-05 17:10:30.121551160 +0000
@@ -609,8 +609,10 @@ static ssize_t usblp_write(struct file *
while (writecount < count) {
if (!usblp->wcomplete) {
barrier();
- if (file->f_flags & O_NONBLOCK)
+ if (file->f_flags & O_NONBLOCK) {
+ writecount += transfer_length;
return writecount ? writecount : -EAGAIN;
+ }
timeout = USBLP_WRITE_TIMEOUT;
add_wait_queue(&usblp->wait, &wait);
@@ -670,7 +672,8 @@ static ssize_t usblp_write(struct file *
usblp->writeurb->transfer_buffer_length = transfer_length;
- if (copy_from_user(usblp->writeurb->transfer_buffer, buffer + writecount,
transfer_length)) {
+ if (copy_from_user(usblp->writeurb->transfer_buffer,
+ buffer + writecount, transfer_length)) {
up(&usblp->sem);
return writecount ? writecount : -EFAULT;
}
More information about the fedora-test-list
mailing list