Help!

2.6.17: dmesg flooded with "ohci_hcd 0000:00:02.0: wakeup"

 
  

Goto page Previous  1, 2
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel (archive) RSS
Next:  [PATCHSET] Announce: High-res timers, tickless/dy..  
Author Message
David Brownell
External


Since: Mar 16, 2005
Posts: 463



PostPosted: Tue Nov 14, 2006 10:00 pm    Post subject: Re: [Bulk] Re: [linux-usb-devel] 2.6.19-rc5 regression: can't disable OHCI wakeup via sysfs [Login to view extended thread Info.]
Archived from groups: linux>kernel (more info?)

On Tuesday 14 November 2006 12:48 pm, Andrey Borzenkov wrote:
> On Monday 13 November 2006 22:58, Alan Stern wrote:
> > Andrey:
> >
> > Try this patch for 2.6.19-rc5. Although it doesn't make all the changes
> > Dave and I have discussed, it ought to fix your problem.
> >
>
> It did. Thank you

Then this should get merged into 2.6.19-rc ASAP ...

- Dave


> -andrey
>
> > Alan Stern
> >
> >
> > Index: 2.6.19-rc5/drivers/usb/host/ohci-hub.c
> > ===================================================================
> > --- 2.6.19-rc5.orig/drivers/usb/host/ohci-hub.c
> > +++ 2.6.19-rc5/drivers/usb/host/ohci-hub.c
> > @@ -422,7 +422,8 @@ ohci_hub_status_data (struct usb_hcd *hc
> > ohci->autostop = 0;
> > ohci->next_statechange = jiffies +
> > STATECHANGE_DELAY;
> > - } else if (time_after_eq (jiffies,
> > + } else if (device_may_wakeup(&hcd->self.root_hub->dev)
> > + && time_after_eq(jiffies,
> > ohci->next_statechange)
> > && !ohci->ed_rm_list
> > && !(ohci->hc_control &
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
David Brownell
External


Since: Mar 16, 2005
Posts: 463



PostPosted: Tue Nov 14, 2006 10:20 pm    Post subject: Re: [linux-usb-devel] 2.6.19-rc5 regression: can't disable OHCI wakeup via sysfs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Monday 13 November 2006 9:15 am, Alan Stern wrote:
> On Mon, 13 Nov 2006, David Brownell wrote:
>
> > It's a *driver model* API, which is also accessible from sysfs ... to support
> > per-device policies, for example the (a) workaround. The mechanism exists
> > even on kernels that don't include sysfs ... although on such systems, there
> > is no way for users to do things like say "ignore the fact that this mouse
> > claims to issue wakeup events, its descriptors lie".
>
> Yes, it is separate from sysfs -- but it is _tied_ to the sysfs API.

I can't agree. If you deconfigure sysfs, it still works.
Since it's independent like that, there's no way it's "tied".


> > > and therefore administrative
> > > in nature, but now you say it's also being used to record hardware quirks.
> >
> > No; I'm saying the driver model is used to record that the hardware mechanism
> > isn't available. The fact that it's because of an implementation artifact
> > (bad silicon, or board layout, etc) versus a design artifact (silicon designed
> > without that feature) is immaterial ... in either case, the system can't use
> > the mechanism.
>
> But the information is being recorded in the wrong spot. The correct test
> should use device_can_wakeup, not device_may_wakeup. The can_wakeup flag
> is the one which records whether or not the hardware mechanism is actually
> available.

Go look again. "may" implies (i) can , and (ii) should. So if there's a
hardware quirk registered, (i) always fails. And in the not-uncommon case
where the device misbehavior isn't known to the kernel, userspace has the
option of making (ii) kick in (the workaround mentioned above). This is a
generic approach, it works on all wakeup-capable devices.

So "may" is correct, and "can" is insufficient.



> Okay. I'll write a patch to eliminate autostop and those routines when
> CONFIG_PM is off.
>
> But that doesn't answer the question above: Should autostop check
> device_can_wakeup rather than device_may_wakeup?

See above, and the definition of may_wakeup().


> Also: Does the quirk/bug detection logic clear can_wakeup, as it should?
> Or does it only affect may_wakeup?

See above. Quirks directly recognized by the kernel clear can_wakeup.
Ones that are reported via userspace clear should_wakeup. Either suffices
to ensure that the may_wakeup() predicate fails.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Alan Stern
External


Since: May 20, 2006
Posts: 376



PostPosted: Tue Nov 14, 2006 10:50 pm    Post subject: Re: [linux-usb-devel] 2.6.19-rc5 regression: can't disable OHCI wakeup via sysfs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 14 Nov 2006, David Brownell wrote:

> On Monday 13 November 2006 9:15 am, Alan Stern wrote:
> > On Mon, 13 Nov 2006, David Brownell wrote:
> >
> > > It's a *driver model* API, which is also accessible from sysfs ... to support
> > > per-device policies, for example the (a) workaround. The mechanism exists
> > > even on kernels that don't include sysfs ... although on such systems, there
> > > is no way for users to do things like say "ignore the fact that this mouse
> > > claims to issue wakeup events, its descriptors lie".
> >
> > Yes, it is separate from sysfs -- but it is _tied_ to the sysfs API.
>
> I can't agree. If you deconfigure sysfs, it still works.
> Since it's independent like that, there's no way it's "tied".

We could carry on this argument indefinitely. Yes, the device_may_wakeup
stuff does work without sysfs. But it doesn't do anything significant; it
amounts to no more than device_can_wakeup(). AFAIK there's no way to
change the setting of the may_wakeup flag other than via sysfs. That's
what I meant by "tied".

> > > No; I'm saying the driver model is used to record that the hardware mechanism
> > > isn't available. The fact that it's because of an implementation artifact
> > > (bad silicon, or board layout, etc) versus a design artifact (silicon designed
> > > without that feature) is immaterial ... in either case, the system can't use
> > > the mechanism.
> >
> > But the information is being recorded in the wrong spot. The correct test
> > should use device_can_wakeup, not device_may_wakeup. The can_wakeup flag
> > is the one which records whether or not the hardware mechanism is actually
> > available.
>
> Go look again. "may" implies (i) can , and (ii) should. So if there's a
> hardware quirk registered, (i) always fails. And in the not-uncommon case
> where the device misbehavior isn't known to the kernel, userspace has the
> option of making (ii) kick in (the workaround mentioned above). This is a
> generic approach, it works on all wakeup-capable devices.
>
> So "may" is correct, and "can" is insufficient.

Things work differently in uhci-hcd. I still haven't submitted the patch
to add device_may_wakeup support (although it was written quite a while
ago and may have been posted to linux-usb-devel; I can't remember).

However even when it is added and may_wakeup is off, autostop will still
function. It won't rely on interrupts or other wakeup events, though --
instead the root-hub status polling mechanism will be used.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel (archive) All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum