public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.5.5-pre1 rmmod usb-uhci hangs
       [not found] ` <fa.dsb79pv.on84ii@ifi.uio.no>
@ 2002-02-24  2:54   ` Dan Hopper
  2002-02-24  6:21     ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Hopper @ 2002-02-24  2:54 UTC (permalink / raw)
  To: Greg KH; +Cc: Patrick Mochel, Pierre Rousselet, lkml, linux-usb-devel

Greg KH <greg@kroah.com> remarked:
> 
> On Fri, Feb 15, 2002 at 10:22:05AM -0800, Patrick Mochel wrote:
> > 
> > On Fri, 15 Feb 2002, Patrick Mochel wrote:
> > 
> > > 
> > > > no, it doesn't solve the problem. i would like to test it whith 
> > > > preemtible kernel not set but it doesn't boot.
> > > 
> > > While Greg's patch did fix part of the problem, the rest of it was on my 
> > > end. Could you try this patch, and see if helps?
> > 
> > Actually, the patch that I sent is against my current tree, which includes 
> > some changes that I've already pushed to Linus. If you're using BK, you 
> > should be able to pull his current tree (if you're into that kinda thing). 
> > Or, wait until -pre2. Sorry about that.
> 
> Your current tree, + this patch, + my patch solves all of the unloading,
> removing, and loading problems that I had been seeing.
> 
> Thanks for finding this.

I wonder if anyone might look at doing the same sort of fix to
the 2.4.18 working tree?  I experience the same sort of behavior
with usb-uhci on my KT266A board (VT82C586B USB) on 2.4.18-rc1 (and
previous 2.4.x kernels, too).  I'd do it myself, but the patch from
Patrick on inode.c makes me too nervous to do it, since I have
no experience with the filesystem drivers.

Thanks,
Dan Hopper

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24  2:54   ` 2.5.5-pre1 rmmod usb-uhci hangs Dan Hopper
@ 2002-02-24  6:21     ` Greg KH
  2002-02-24  6:39       ` Dan Hopper
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2002-02-24  6:21 UTC (permalink / raw)
  To: Dan Hopper, Patrick Mochel, Pierre Rousselet, lkml,
	linux-usb-devel

On Sat, Feb 23, 2002 at 08:54:11PM -0600, Dan Hopper wrote:
> 
> I wonder if anyone might look at doing the same sort of fix to
> the 2.4.18 working tree?  I experience the same sort of behavior
> with usb-uhci on my KT266A board (VT82C586B USB) on 2.4.18-rc1 (and
> previous 2.4.x kernels, too).  I'd do it myself, but the patch from
> Patrick on inode.c makes me too nervous to do it, since I have
> no experience with the filesystem drivers.

These patches will not apply for the 2.4 tree, even if you tried :)

What problems are you having with 2.4.18-rc1 and previous?  Any oops
messages?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24  6:21     ` Greg KH
@ 2002-02-24  6:39       ` Dan Hopper
  2002-02-24  6:49         ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Hopper @ 2002-02-24  6:39 UTC (permalink / raw)
  To: Greg KH; +Cc: Patrick Mochel, Pierre Rousselet, lkml, linux-usb-devel

Greg KH <greg@kroah.com> remarked:
> These patches will not apply for the 2.4 tree, even if you tried :)
> 
> What problems are you having with 2.4.18-rc1 and previous?  Any oops
> messages?

Hi,

Well, basically if I use usb-uhci instead of uhci, the computer
locks during the shutdown process.  I believe I've used the stock
Mandrake 8.1 kernel as well as 2.4.17 and 2.4.18-rc1 with similar
results.  Mandrake even seems to make a note of the issue:

http://www.linux-mandrake.com/en/errata.php3

"Error scenario: The computer locks up when shutting down or when
  stopping the usb service.
Why: In certain cases, the usb-uhci module is broken for some usb
  devices. 
Solution: Modify your /etc/modules.conf file and change the line
  "alias usb-interface usb-uhci" to "alias usb-interface uhci". The
  change will take effect after the next shutdown and will prevent the
  usb service from locking up the computer."


I have a Brother HL-1450 Postscript printer and an HP Scanjet 6300C
attached, FWIW.

The reason I'd like to switch back to usb-uhci instead of uhci is
twfold:  Vmware seems to want to only use usb-uhci and not uhci
(dummies!).  And uhci seems to be unable to get the scanner going
such that it doesn't "stutter" all the way down the page.  usb-uhci
seems to be able to keep up so that it just sweeps on down the page.

I saw the thread on usb-uhci on 2.5, and it looked so similar that I
(incorrectly) assumed them to be one and the same problem.

Thanks,
Dan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24  6:39       ` Dan Hopper
@ 2002-02-24  6:49         ` Greg KH
  2002-02-24 17:37           ` Dan Hopper
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2002-02-24  6:49 UTC (permalink / raw)
  To: Dan Hopper, Patrick Mochel, Pierre Rousselet, lkml,
	linux-usb-devel

On Sun, Feb 24, 2002 at 12:39:15AM -0600, Dan Hopper wrote:
> 
> The reason I'd like to switch back to usb-uhci instead of uhci is
> twfold:  Vmware seems to want to only use usb-uhci and not uhci
> (dummies!).  And uhci seems to be unable to get the scanner going
> such that it doesn't "stutter" all the way down the page.  usb-uhci
> seems to be able to keep up so that it just sweeps on down the page.

I noticed that Vmware does that, and was wondering why.

If you get a chance, can you try the uhci patches that were posted on
linux-usb-devel last week, or all of them rolled up at:
	http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/linux-2.4.18-rc2-gregkh-1.patch.gz
and let me know if that solves your problem with uhci or not?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24  6:49         ` Greg KH
@ 2002-02-24 17:37           ` Dan Hopper
  2002-02-24 17:50             ` [linux-usb-devel] " Johannes Erdfelt
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Hopper @ 2002-02-24 17:37 UTC (permalink / raw)
  To: Greg KH; +Cc: Patrick Mochel, Pierre Rousselet, lkml, linux-usb-devel

Greg KH <greg@kroah.com> remarked:
> On Sun, Feb 24, 2002 at 12:39:15AM -0600, Dan Hopper wrote:
> > 
> > The reason I'd like to switch back to usb-uhci instead of uhci is
> > twfold:  Vmware seems to want to only use usb-uhci and not uhci
> > (dummies!).  And uhci seems to be unable to get the scanner going
> > such that it doesn't "stutter" all the way down the page.  usb-uhci
> > seems to be able to keep up so that it just sweeps on down the page.
> 
> I noticed that Vmware does that, and was wondering why.
> 
> If you get a chance, can you try the uhci patches that were posted on
> linux-usb-devel last week, or all of them rolled up at:
> 	http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/linux-2.4.18-rc2-gregkh-1.patch.gz
> and let me know if that solves your problem with uhci or not?

Well, that was interesting.  I upgraded to rc2 and applied that
patch.  uhci still behaved the same (can't keep up with scanner). 
But usb-uhci now doesn't lock up the system on a shutdown.  And it
was the patch that did it, not rc2, because I tried a pristine rc2
build, too, and it still locks up.  I note that there's nothing in
the patch that directly touches usb-uhci, so it must be a side
affect of some other fix.

(I'd still like to eventually get uhci working, since the docs
indicate it's the newer, cooler driver.  And the ipaq driver
indicates uhci is preferred over the usb-uhci driver.)

Thanks, Greg!  That was quite useful.

Dan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24 17:37           ` Dan Hopper
@ 2002-02-24 17:50             ` Johannes Erdfelt
  2002-02-24 18:49               ` Dan Hopper
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Erdfelt @ 2002-02-24 17:50 UTC (permalink / raw)
  To: Dan Hopper, Greg KH, Patrick Mochel, Pierre Rousselet, lkml,
	linux-usb-devel

On Sun, Feb 24, 2002, Dan Hopper <dbhopper@austin.rr.com> wrote:
> Greg KH <greg@kroah.com> remarked:
> > On Sun, Feb 24, 2002 at 12:39:15AM -0600, Dan Hopper wrote:
> > > 
> > > The reason I'd like to switch back to usb-uhci instead of uhci is
> > > twfold:  Vmware seems to want to only use usb-uhci and not uhci
> > > (dummies!).  And uhci seems to be unable to get the scanner going
> > > such that it doesn't "stutter" all the way down the page.  usb-uhci
> > > seems to be able to keep up so that it just sweeps on down the page.
> > 
> > I noticed that Vmware does that, and was wondering why.
> > 
> > If you get a chance, can you try the uhci patches that were posted on
> > linux-usb-devel last week, or all of them rolled up at:
> > 	http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/linux-2.4.18-rc2-gregkh-1.patch.gz
> > and let me know if that solves your problem with uhci or not?
> 
> Well, that was interesting.  I upgraded to rc2 and applied that
> patch.  uhci still behaved the same (can't keep up with scanner). 
> But usb-uhci now doesn't lock up the system on a shutdown.  And it
> was the patch that did it, not rc2, because I tried a pristine rc2
> build, too, and it still locks up.  I note that there's nothing in
> the patch that directly touches usb-uhci, so it must be a side
> affect of some other fix.

Hmm, that is interesting. I wonder what is going on with it. Are you
using the scanner kernel driver?

JE


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24 17:50             ` [linux-usb-devel] " Johannes Erdfelt
@ 2002-02-24 18:49               ` Dan Hopper
  2002-02-25  3:41                 ` Johannes Erdfelt
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Hopper @ 2002-02-24 18:49 UTC (permalink / raw)
  To: Johannes Erdfelt
  Cc: Greg KH, Patrick Mochel, Pierre Rousselet, lkml, linux-usb-devel

Johannes Erdfelt <johannes@erdfelt.com> remarked:
> Hmm, that is interesting. I wonder what is going on with it. Are you
> using the scanner kernel driver?

Yes.  And sane 1.0.5.  FWIW, the command I'm using that stutters
with uhci and not usb-uhci is:

scanimage --mode lineart --resolution 600 -x 203.2 -y 271.0 \
	--contrast 0 --brightness 0  > /tmp/copy.pbm

That results in a 3848837 byte file in about 37 seconds with
usb-uhci.  Not exactly pushing the USB 1.1 bandwidth.  (unless
there's a significant discrepancy between the bits coming from the
scanner and those scanimage dumps to the file, I suppose)

(Incidentally, I still haven't worked out how to get it to properly
autoload the scanner driver at startup.  It loads the USB printer
driver fine, but not the scanner, which I have to manually modprobe
myself.  I've started fiddling with post-install scripts with
sleeps, but haven't worked out the magic yet.)

Dan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-24 18:49               ` Dan Hopper
@ 2002-02-25  3:41                 ` Johannes Erdfelt
  2002-02-26  3:22                   ` Dan Hopper
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Erdfelt @ 2002-02-25  3:41 UTC (permalink / raw)
  To: Dan Hopper, lkml, linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

On Sun, Feb 24, 2002, Dan Hopper <dbhopper@austin.rr.com> wrote:
> Johannes Erdfelt <johannes@erdfelt.com> remarked:
> > Hmm, that is interesting. I wonder what is going on with it. Are you
> > using the scanner kernel driver?
> 
> Yes.  And sane 1.0.5.  FWIW, the command I'm using that stutters
> with uhci and not usb-uhci is:
> 
> scanimage --mode lineart --resolution 600 -x 203.2 -y 271.0 \
> 	--contrast 0 --brightness 0  > /tmp/copy.pbm
> 
> That results in a 3848837 byte file in about 37 seconds with
> usb-uhci.  Not exactly pushing the USB 1.1 bandwidth.  (unless
> there's a significant discrepancy between the bits coming from the
> scanner and those scanimage dumps to the file, I suppose)

Can you give this patch a whirl? It's relative to 2.4.18-rc2-gregkh-1

JE


[-- Attachment #2: uhci-2.4.18-rc2-gregkh-1-fsbr.patch --]
[-- Type: text/plain, Size: 2106 bytes --]

diff -ur linux-2.4.18-rc2-gregkh-1.orig/drivers/usb/uhci.c linux-2.4.18-rc2-gregkh-1/drivers/usb/uhci.c
--- linux-2.4.18-rc2-gregkh-1.orig/drivers/usb/uhci.c	Sun Feb 24 15:13:59 2002
+++ linux-2.4.18-rc2-gregkh-1/drivers/usb/uhci.c	Sun Feb 24 15:14:43 2002
@@ -57,7 +57,6 @@
 
 #include <linux/pm.h>
 
-
 /*
  * Version Information
  */
@@ -65,7 +64,6 @@
 #define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber"
 #define DRIVER_DESC "USB Universal Host Controller Interface driver"
 
-
 /*
  * debug = 0, no debugging messages
  * debug = 1, dump failed URB's except for stalls
@@ -100,6 +98,7 @@
 
 /* If a transfer is still active after this much time, turn off FSBR */
 #define IDLE_TIMEOUT	(HZ / 20)	/* 50 ms */
+#define FSBR_DELAY	(HZ / 20)	/* 50 ms */
 
 #define MAX_URB_LOOP	2048		/* Maximum number of linked URB's */
 
@@ -766,7 +765,7 @@
 	if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
 		urbp->fsbr = 0;
 		if (!--uhci->fsbr)
-			uhci->skel_term_qh->link = UHCI_PTR_TERM;
+			uhci->fsbrtimeout = jiffies + FSBR_DELAY;
 	}
 
 	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
@@ -2021,6 +2020,12 @@
 
 		u->transfer_flags |= USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED;
 		uhci_unlink_urb(u);
+	}
+
+	/* Really disable FSBR */
+	if (!uhci->fsbr && uhci->fsbrtimeout && time_after_eq(jiffies, uhci->fsbrtimeout)) {
+		uhci->fsbrtimeout = 0;
+		uhci->skel_term_qh->link = UHCI_PTR_TERM;
 	}
 
 	/* enter global suspend if nothing connected */
diff -ur linux-2.4.18-rc2-gregkh-1.orig/drivers/usb/uhci.h linux-2.4.18-rc2-gregkh-1/drivers/usb/uhci.h
--- linux-2.4.18-rc2-gregkh-1.orig/drivers/usb/uhci.h	Sun Feb 24 15:13:59 2002
+++ linux-2.4.18-rc2-gregkh-1/drivers/usb/uhci.h	Sun Feb 24 14:46:38 2002
@@ -309,6 +309,7 @@
 	spinlock_t frame_list_lock;
 	struct uhci_frame_list *fl;		/* P: uhci->frame_list_lock */
 	int fsbr;				/* Full speed bandwidth reclamation */
+	unsigned long fsbrtimeout;		/* FSBR delay */
 	int is_suspended;
 
 	/* Main list of URB's currently controlled by this HC */

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-25  3:41                 ` Johannes Erdfelt
@ 2002-02-26  3:22                   ` Dan Hopper
  2002-02-26  3:39                     ` Johannes Erdfelt
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Hopper @ 2002-02-26  3:22 UTC (permalink / raw)
  To: Johannes Erdfelt; +Cc: lkml, linux-usb-devel

Johannes Erdfelt <johannes@erdfelt.com> remarked:
> Can you give this patch a whirl? It's relative to 2.4.18-rc2-gregkh-1

Sorry, didn't make any difference to the scanner.  

Now, in case it wasn't clear, the scanner does work, it just bumps
and grinds it's way down the page in the process with uhci, taking
considerably longer than with usb-uhci.  Very curious.

Thanks for the patch, though!

Dan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.5-pre1 rmmod usb-uhci hangs
  2002-02-26  3:22                   ` Dan Hopper
@ 2002-02-26  3:39                     ` Johannes Erdfelt
  0 siblings, 0 replies; 10+ messages in thread
From: Johannes Erdfelt @ 2002-02-26  3:39 UTC (permalink / raw)
  To: Dan Hopper, lkml, linux-usb-devel

On Mon, Feb 25, 2002, Dan Hopper <dbhopper@austin.rr.com> wrote:
> Johannes Erdfelt <johannes@erdfelt.com> remarked:
> > Can you give this patch a whirl? It's relative to 2.4.18-rc2-gregkh-1
> 
> Sorry, didn't make any difference to the scanner.  
> 
> Now, in case it wasn't clear, the scanner does work, it just bumps
> and grinds it's way down the page in the process with uhci, taking
> considerably longer than with usb-uhci.  Very curious.

I understand what you're talking about, but I'm not sure what is causing
it.

The patch I sent fixed a performance problem where FSBR would turn off
too much. It could cause problems with devices like your scanner where
it would stutter.

> Thanks for the patch, though!

Hmm, I'll do a once over of the scanner.c source and see if I can find
anything.

JE


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-02-26  3:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fa.n7cofbv.1him3j@ifi.uio.no>
     [not found] ` <fa.dsb79pv.on84ii@ifi.uio.no>
2002-02-24  2:54   ` 2.5.5-pre1 rmmod usb-uhci hangs Dan Hopper
2002-02-24  6:21     ` Greg KH
2002-02-24  6:39       ` Dan Hopper
2002-02-24  6:49         ` Greg KH
2002-02-24 17:37           ` Dan Hopper
2002-02-24 17:50             ` [linux-usb-devel] " Johannes Erdfelt
2002-02-24 18:49               ` Dan Hopper
2002-02-25  3:41                 ` Johannes Erdfelt
2002-02-26  3:22                   ` Dan Hopper
2002-02-26  3:39                     ` Johannes Erdfelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox