Re: [linux-usb-devel] USB device losing power

2007-02-26 Thread Guilherme Salgado
Hi Alan, On 2/26/07, Alan Stern <[EMAIL PROTECTED]> wrote: [...] > > That looks fine. Below is that actual patch I propose for 2.6.20. Can > you please try it out and make sure that it really does fix the problem? > Be sure to remove the test patch first, since this wants to go on top of > plain

Re: [linux-usb-devel] USB device losing power

2007-02-26 Thread Alan Stern
On Sun, 25 Feb 2007, Guilherme Salgado wrote: > On 2/25/07, Alan Stern <[EMAIL PROTECTED]> wrote: > > On Sun, 25 Feb 2007, Guilherme Salgado wrote: > > > > > I had some problems with the 2.6.20 kernel on my distribution and so I > > > wasn't able to test the patch for some time. Fortunately, every

Re: [linux-usb-devel] USB device losing power

2007-02-25 Thread Guilherme Salgado
On 2/25/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Sun, 25 Feb 2007, Guilherme Salgado wrote: > > > I had some problems with the 2.6.20 kernel on my distribution and so I > > wasn't able to test the patch for some time. Fortunately, everything > > is working now and I'm running 2.6.20 with the

Re: [linux-usb-devel] USB device losing power

2007-02-24 Thread Alan Stern
On Sun, 25 Feb 2007, Guilherme Salgado wrote: > I had some problems with the 2.6.20 kernel on my distribution and so I > wasn't able to test the patch for some time. Fortunately, everything > is working now and I'm running 2.6.20 with the patch you provided, and > the "can't resume" problem is gon

Re: [linux-usb-devel] USB device losing power

2007-02-24 Thread Guilherme Salgado
Hi, On 2/14/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 13 Feb 2007, Guilherme Salgado wrote: [...] > > so I did the > > changes manually and used upper case characters on the message passed > > to dev_info(), to make sure the new module was loaded correctly, and I > > seem to have got th

Re: [linux-usb-devel] USB device losing power

2007-02-14 Thread Alan Stern
On Tue, 13 Feb 2007, Guilherme Salgado wrote: > Hi Alan, > > Below is a revised version of the diagnostic patch. Try using it instead > > of the earlier one and let's see what happens. > > > > This revised version didn't apply cleanly into my tree, Maybe because you didn't remove the original

Re: [linux-usb-devel] USB device losing power

2007-02-13 Thread Guilherme Salgado
Hi Alan, On 2/13/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Mon, 12 Feb 2007, Guilherme Salgado wrote: > > > > On Thu, 11 Jan 2007, Jon Smirl wrote: > > > > > [...] > > > > > > Here we see a resume that failed. The key indicator is the 0x1000 bit in > > > the portsc value; it means the port i

Re: [linux-usb-devel] USB device losing power

2007-02-13 Thread Alan Stern
On Mon, 12 Feb 2007, Guilherme Salgado wrote: > > On Thu, 11 Jan 2007, Jon Smirl wrote: > > > [...] > > > > Here we see a resume that failed. The key indicator is the 0x1000 bit in > > the portsc value; it means the port is still suspended even after it was > > supposed to have resumed. This is

Re: [linux-usb-devel] USB device losing power

2007-02-12 Thread Guilherme Salgado
> On Thu, 11 Jan 2007, Jon Smirl wrote: > [...] > > Here we see a resume that failed. The key indicator is the 0x1000 bit in > the portsc value; it means the port is still suspended even after it was > supposed to have resumed. This is the Intel hardware-resume bug I > described earlier. I have

Re: [linux-usb-devel] USB device losing power

2007-01-14 Thread Jon Smirl
I tried the device with USBCV. Under WinXP the device behavior is flaky and I can't get USBCV to work on it at all. On the other hand, the device functions without problem on Win2K. I'd say there is something wrong with the resume implementation on the device. The device does not have updatable fi

Re: [linux-usb-devel] USB device losing power

2007-01-12 Thread Alan Stern
On Fri, 12 Jan 2007, Jon Smirl wrote: > On 1/12/07, Alan Stern <[EMAIL PROTECTED]> wrote: > > On Fri, 12 Jan 2007, Jon Smirl wrote: > > > > > Attachment is too big for the list. > > > It seems to be stuck in a resume loop with your debug patch installed. > > > > > > Device is plugged into a USB 1.

Re: [linux-usb-devel] USB device losing power

2007-01-12 Thread David Brownell
On Thursday 11 January 2007 9:21 pm, Jon Smirl wrote: > So why does the device work when plugged into a powered hub? Do the > ports on the powered hub not do suspend/resume? All USB hubs (root and otherwise) are supposed to support suspend/resume, and you'd probably observe they're using it during

Re: [linux-usb-devel] USB device losing power

2007-01-12 Thread Jon Smirl
On 1/12/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Fri, 12 Jan 2007, Jon Smirl wrote: > > > Using 2.6.20-rc4 on a system with an ICH4, it fails the same way as > > the device did on the ICH5. This is starting to point to a broken > > resume capability in the device. I have more systems around b

Re: [linux-usb-devel] USB device losing power

2007-01-12 Thread Alan Stern
On Fri, 12 Jan 2007, Jon Smirl wrote: > Using 2.6.20-rc4 on a system with an ICH4, it fails the same way as > the device did on the ICH5. This is starting to point to a broken > resume capability in the device. I have more systems around but they > are all ICH4/5. > > So why does the device work

Re: [linux-usb-devel] USB device losing power

2007-01-12 Thread Alan Stern
On Thu, 11 Jan 2007, Jon Smirl wrote: > On 1/11/07, Jon Smirl <[EMAIL PROTECTED]> wrote: > > The default Ubuntu kernel, 2.6.17-10-generic has CONFIG_USB_SUSPEND=y. > > I plugged the device into the laptop and it powered on fine at boot. > > When the build finishes I'll try with 2.6.20-rc4 and verb

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
Using 2.6.20-rc4 on a system with an ICH4, it fails the same way as the device did on the ICH5. This is starting to point to a broken resume capability in the device. I have more systems around but they are all ICH4/5. So why does the device work when plugged into a powered hub? Do the ports on th

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
On 1/11/07, Jon Smirl <[EMAIL PROTECTED]> wrote: > The default Ubuntu kernel, 2.6.17-10-generic has CONFIG_USB_SUSPEND=y. > I plugged the device into the laptop and it powered on fine at boot. > When the build finishes I'll try with 2.6.20-rc4 and verbose USB > debug. Ubuntu 2.6.17 kernels with CO

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
On 1/11/07, Alan Stern <[EMAIL PROTECTED]> wrote: > Have you got a different computer to try this on? I just kicked off a kernel build with the right config for my laptop which has an ICH4. I have a few other computers I can try if we need to. The default Ubuntu kernel, 2.6.17-10-generic has CONF

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Alan Stern
On Thu, 11 Jan 2007, Jon Smirl wrote: > In this log I booted with it plugged in and let the usbhid drivers load. > I then successively modprobe/rmmod them. > > There were only two ways I could get the device working once it went > into suspend: > rmmod/modprobe uhci_hcd;modprobe usbhid > usbreset

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
On 1/11/07, Alan Stern <[EMAIL PROTECTED]> wrote: Probably the new driver wasn't loaded. On my system (FC6) uhci-hcd is loaded as part of the initrd image, not through the usual sort of on-demand loading. You may need to rmmod uhci-hcd and then load the modified driver. I see now it is on ini

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Alan Stern
On Thu, 11 Jan 2007, Jon Smirl wrote: > It doesn't appear to have hit your debug code but I am sure I built it > into the driver. The debug code did not run, but it should have. Probably the new driver wasn't loaded. On my system (FC6) uhci-hcd is loaded as part of the initrd image, not through

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
It doesn't appear to have hit your debug code but I am sure I built it into the driver. -- Jon Smirl [EMAIL PROTECTED] dmesg1 Description: Binary data - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.n

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Alan Stern
On Thu, 11 Jan 2007, Jon Smirl wrote: > Attached dmesg may explain what is happening. I don't think so. > I renamed all my sound and usb input modules so that they wouldn't > load at boot. I then manually modprobe'd usbhid in. > > The device implements two profiles, sound and hid. How is error

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Jon Smirl
Attached dmesg may explain what is happening. I renamed all my sound and usb input modules so that they wouldn't load at boot. I then manually modprobe'd usbhid in. The device implements two profiles, sound and hid. How is error processing going to work if both of these modules attach to the dev

Re: [linux-usb-devel] USB device losing power

2007-01-11 Thread Alan Stern
On Wed, 10 Jan 2007, Jon Smirl wrote: > > What happened to the HID interface before the reset? > > How can I check it? The controls cause events, is there some way to see them? Well, earlier you wrote: > This doesn't help but it is complicated because the PSC805 also > includes a USBHID compo

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Jon Smirl
On 1/10/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Wed, 10 Jan 2007, Jon Smirl wrote: > > > I just rebooted and all of the drivers loaded automatically but the > > device didn't work. > > Doing a usbreset of the device fixed everything. > > > > My best guess is that the "usb 2-1: usb auto-resum

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Alan Stern
On Wed, 10 Jan 2007, Jon Smirl wrote: > I just rebooted and all of the drivers loaded automatically but the > device didn't work. > Doing a usbreset of the device fixed everything. > > My best guess is that the "usb 2-1: usb auto-resume" failed to enable > power to the device. The dmesg log for

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Jon Smirl
I just rebooted and all of the drivers loaded automatically but the device didn't work. Doing a usbreset of the device fixed everything. My best guess is that the "usb 2-1: usb auto-resume" failed to enable power to the device. Note that the failure only happens when the device is plugged into a

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Jon Smirl
On 1/10/07, Alan Stern <[EMAIL PROTECTED]> wrote: > There is no way to prevent a USB device without a driver from being > suspended. Perhaps we need one. On the other hand, USB devices _are_ > supposed to be able to suspend and resume with no ill effects -- it's part > of the spec. > > I still wo

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Alan Stern
Brief summary: After being suspended and resumed, Jon's USB sound device remains in a useless powered-off state (the LEDs don't turn back on). Clemens, if you have any ideas that might be relevant, please let us know. On Tue, 9 Jan 2007, Jon Smirl wrote: > Something has a refcount set into snd

Re: [linux-usb-devel] USB device losing power

2007-01-10 Thread Alan Stern
On Tue, 9 Jan 2007, Jon Smirl wrote: > I tried to unbind/bind with the device in the not working state: > snd-usb-audio 2-1:1.0: usb_probe_interface > snd-usb-audio 2-1:1.0: usb_probe_interface - got id > USB device is in the shutdown state, cannot create a card instance > snd-usb-audio: probe of

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
I turned off CONFIG_USB_SUSPEND and everything is working. -- Jon Smirl [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opi

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > I tried to unbind/bind with the device in the not working state: > > snd-usb-audio 2-1:1.0: usb_probe_interface > > snd-usb-audio 2-1:1.0: usb_probe_interface - got id > > USB device is in the shutdown sta

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > > > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > > > > > Is there some tool or sys variable that can toggle power to the > > > > device? That will let me se

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Alan Stern
On Tue, 9 Jan 2007, Jon Smirl wrote: > On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > > > Is there some tool or sys variable that can toggle power to the > > > device? That will let me see if it is in sleep mode when it shouldn't > > > be. > > > > I

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > Is there some tool or sys variable that can toggle power to the > > device? That will let me see if it is in sleep mode when it shouldn't > > be. > > If you turn on CONFIG_PM_SYSFS_DEPRECATED then you can

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
On 1/9/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 9 Jan 2007, Jon Smirl wrote: > > > Is there some tool or sys variable that can toggle power to the > > device? That will let me see if it is in sleep mode when it shouldn't > > be. > > If you turn on CONFIG_PM_SYSFS_DEPRECATED then you can

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Alan Stern
On Tue, 9 Jan 2007, Jon Smirl wrote: > Is there some tool or sys variable that can toggle power to the > device? That will let me see if it is in sleep mode when it shouldn't > be. If you turn on CONFIG_PM_SYSFS_DEPRECATED then you can suspend your device by doing: echo -n 2 >/sys/bus/u

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Alan Stern
On Mon, 8 Jan 2007, Jon Smirl wrote: > On 1/8/07, Alan Stern <[EMAIL PROTECTED]> wrote: > > What shows up in dmesg? > dmesg is the same when it works and when it doesn't I bet if you compare a working and a non-working dmesg log now that you have CONFIG_USB_DEBUG turned on, you'll find a differen

Re: [linux-usb-devel] USB device losing power

2007-01-09 Thread Jon Smirl
On 1/8/07, Jon Smirl <[EMAIL PROTECTED]> wrote: > >What happens if you unplug the device and then plug it directly into > the computer? Is there some tool or sys variable that can toggle power to the device? That will let me see if it is in sleep mode when it shouldn't be. -- Jon Smirl [EMAIL PR

Re: [linux-usb-devel] USB device losing power

2007-01-08 Thread Jon Smirl
On 1/8/07, Alan Stern <[EMAIL PROTECTED]> wrote: What shows up in dmesg? dmesg is the same when it works and when it doesn't What happens if you unplug the device and then plug it directly into the computer? it works. As far as I can tell the problem only occurs on boot What do you get if

Re: [linux-usb-devel] USB device losing power

2007-01-08 Thread Alan Stern
On Mon, 8 Jan 2007, Jon Smirl wrote: > I have a Philips PSC805 external audio device. It is powered via USB. > This device used to work plugged directly into my desktop. Now it is > coming up, initializing, and then shutting down once user space > starts. This happens about 90% of the time but not

[linux-usb-devel] USB device losing power

2007-01-08 Thread Jon Smirl
I have a Philips PSC805 external audio device. It is powered via USB. This device used to work plugged directly into my desktop. Now it is coming up, initializing, and then shutting down once user space starts. This happens about 90% of the time but not always. If I move the device to a powered h