From: Greg KH <greg@kroah.com>
To: Daniel Robbins <drobbins@gentoo.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.3-bk9 QA testing: firewire good, USB printing dead
Date: Fri, 27 Feb 2004 22:44:50 -0800 [thread overview]
Message-ID: <20040228064448.GB3040@kroah.com> (raw)
In-Reply-To: <1077937052.14653.40.camel@wave.gentoo.org>
On Fri, Feb 27, 2004 at 07:57:32PM -0700, Daniel Robbins wrote:
>
> With 2.6.3-bk9, I also had a block of two mainboard USB ports simply
> stop functioning -- to the point of even no longer sending power to the
> USB hub that I was using.
That's not good. Are these real usb 2.0 printers? Can you run them in
1.1 mode instead (just don't load the ehci-hcd driver)?
If that also fails, here's the only usblp patch in 2.6.3-bk9. If you
revert it, does that solve the problem?
thanks,
greg k-h
diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Fri Feb 27 22:42:31 2004
+++ b/drivers/usb/class/usblp.c Fri Feb 27 22:42:31 2004
@@ -603,7 +603,7 @@
{
DECLARE_WAITQUEUE(wait, current);
struct usblp *usblp = file->private_data;
- int timeout, err = 0;
+ int timeout, err = 0, transfer_length;
size_t writecount = 0;
while (writecount < count) {
@@ -654,19 +654,13 @@
continue;
}
- writecount += usblp->writeurb->transfer_buffer_length;
- usblp->writeurb->transfer_buffer_length = 0;
+ transfer_length=(count - writecount);
+ if (transfer_length > USBLP_BUF_SIZE)
+ transfer_length = USBLP_BUF_SIZE;
- if (writecount == count) {
- up (&usblp->sem);
- break;
- }
+ usblp->writeurb->transfer_buffer_length = transfer_length;
- usblp->writeurb->transfer_buffer_length = (count - writecount) < USBLP_BUF_SIZE ?
- (count - writecount) : USBLP_BUF_SIZE;
-
- if (copy_from_user(usblp->writeurb->transfer_buffer, buffer + writecount,
- usblp->writeurb->transfer_buffer_length)) {
+ if (copy_from_user(usblp->writeurb->transfer_buffer, buffer + writecount, transfer_length)) {
up(&usblp->sem);
return writecount ? writecount : -EFAULT;
}
@@ -683,6 +677,8 @@
break;
}
up (&usblp->sem);
+
+ writecount += transfer_length;
}
return count;
next prev parent reply other threads:[~2004-02-28 6:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 2:01 2.6.3-bk9 QA testing: firewire good, USB printing dead 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 [this message]
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
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=20040228064448.GB3040@kroah.com \
--to=greg@kroah.com \
--cc=drobbins@gentoo.org \
--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