Re:

From: Oliver Neukum
Date: Tue May 20 2008 - 08:41:13 EST


Am Dienstag 20 Mai 2008 14:34:23 schrieb Lukas Hejtmanek:
> <stern@xxxxxxxxxxxxxxxxxxx>, Greg KH <greg@xxxxxxxxx>
> Bcc:
> Subject: Re: [Bug #10630] USB devices plugged into dock are not discoverred
> until reload of ehci-hcd
> Reply-To:
> In-Reply-To: <200805201327.34678.oliver@xxxxxxxxxx>
> X-echelon: NSA, CIA, CI5, MI5, FBI, KGB, BIS, Plutonium, Bin Laden, bomb
>
> On Tue, May 20, 2008 at 01:27:34PM +0200, Oliver Neukum wrote:
> > > done.
> > > http://bugzilla.kernel.org/show_bug.cgi?id=10630
> >
> > Aha. Thanks.
> > Please recompile without CONFIG_USB_SUSPEND
>
> Hm, without USB_SUSPEND it works. So what next, considered fixed or any
> further investigation is needed?

It is by no means fixed!

Now we find out what exactly doesn't work. Please apply this patch
and provide "dmesg -c" before you plug in the device and after that.

Regards
Oliver

---

--- linux-2.6.25/drivers/usb/host/ehci-hcd.c 2008-05-20 10:07:45.585199135 +0200
+++ alt/drivers/usb/host/ehci-hcd.c 2008-05-20 11:11:53.614580823 +0200
@@ -712,11 +712,15 @@ static irqreturn_t ehci_irq (struct usb_
unsigned i = HCS_N_PORTS (ehci->hcs_params);
pcd_status = status;

+ printk(KERN_ERR"Detected PCD bit set\n");
/* resume root hub? */
- if (!(ehci_readl(ehci, &ehci->regs->command) & CMD_RUN))
+ if (!(ehci_readl(ehci, &ehci->regs->command) & CMD_RUN)) {
+ printk(KERN_ERR"About to resume root hub due to PCD\n");
usb_hcd_resume_root_hub(hcd);
+ }

while (i--) {
+ printk(KERN_ERR"Checking motherboard port %d\n", i);
int pstatus = ehci_readl(ehci,
&ehci->regs->port_status [i]);

@@ -730,6 +734,7 @@ static irqreturn_t ehci_irq (struct usb_
* and make khubd collect PORT_STAT_C_SUSPEND to
* stop that signaling.
*/
+ printk(KERN_ERR"Starting timer for port %d\n", i);
ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
--- linux-2.6.25/drivers/usb/core/hcd.c 2008-05-20 10:07:45.583199804 +0200
+++ alt/drivers/usb/core/hcd.c 2008-05-20 11:12:23.506597140 +0200
@@ -589,6 +589,8 @@ void usb_hcd_poll_rh_status(struct usb_h
hcd->poll_pending = 1;
}
spin_unlock_irqrestore(&hcd_root_hub_lock, flags);
+ } else {
+ printk(KERN_ERR"hub_status_data() returned 0\n");
}

/* The USB 2.0 spec says 256 ms. This is close enough and won't
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/