From: Mike <Mike@kordik.net>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: 2.6.3-bk9 QA testing: firewire good, USB printing dead
Date: Mon, 01 Mar 2004 22:01:18 -0500 [thread overview]
Message-ID: <pan.2004.03.02.03.01.15.267828@kordik.net> (raw)
In-Reply-To: <20040301074348.GA7646@ip68-4-255-84.oc.oc.cox.net>
On Sun, 29 Feb 2004 23:43:48 -0800, Barry K. Nathan wrote:
> Does this patch (following my signature) fix the printer hangs? (It does
> for me.)
>
> BTW, it's also an attachment on OSDL bugzilla #2221:
> http://bugme.osdl.org/show_bug.cgi?id=2221
>
> -Barry K. Nathan <barryn@pobox.com>
>
> diff -ruN linux-2.6.3-bk2/drivers/usb/class/usblp.c
> linux-2.6.3-bk2-bkn1/drivers/usb/class/usblp.c ---
> linux-2.6.3-bk2/drivers/usb/class/usblp.c 2004-02-29 23:18:26.000000000
> -0800 +++ linux-2.6.3-bk2-bkn1/drivers/usb/class/usblp.c 2004-02-29
> 23:17:24.000000000 -0800 @@ -603,7 +603,7 @@
> {
> DECLARE_WAITQUEUE(wait, current);
> struct usblp *usblp = file->private_data;
> - int timeout, err = 0, transfer_length; + int timeout, err = 0,
> transfer_length = 0;
> size_t writecount = 0;
>
> while (writecount < count) {
> @@ -654,6 +654,16 @@
> continue;
> }
>
> + /* We must increment writecount here, and not at the + * end of the
> loop. Otherwise, the final loop iteration may + * be skipped, leading
> to incomplete printer output. + */
> + writecount += transfer_length;
> + if (writecount == count) {
> + up (&usblp->sem);
> + break;
> + }
> +
> transfer_length=(count - writecount); if (transfer_length >
> USBLP_BUF_SIZE)
> transfer_length = USBLP_BUF_SIZE;
> @@ -677,8 +687,6 @@
> break;
> }
> up (&usblp->sem);
> -
> - writecount += transfer_length;
> }
>
> return count;
I also applied this patch to 2.6.4-rc1-mm1 and my printer problem seems to
be solved. This is the first time in two weeks that printing has worked
properly for me. Thx :)
next prev parent reply other threads:[~2004-03-02 3:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 2:01 Daniel Robbins
2004-02-28 2:10 ` Greg KH
2004-02-28 2:57 ` Daniel Robbins
2004-02-28 3:39 ` Kevin P. Fleming
2004-02-28 6:44 ` Greg KH
2004-02-28 21:22 ` Mike
2004-02-29 9:51 ` Jens Axboe
2004-03-01 7:43 ` [PATCH] " Barry K. Nathan
2004-03-01 8:02 ` Jens Axboe
2004-03-02 3:01 ` Mike [this message]
2004-03-02 13:09 ` Paulo Marques
2004-03-02 15:18 ` firewire good, USB printing fixed, CD-ROM block device IO errors near end of media Daniel Robbins
2004-03-02 19:26 ` [PATCH] Re: 2.6.3-bk9 QA testing: firewire good, USB printing dead Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pan.2004.03.02.03.01.15.267828@kordik.net \
--to=mike@kordik.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®