linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	johannes@erdfelt.com,
	USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: Re: Test Patch: 2.5.69 Interrupt Latency
Date: 16 May 2003 12:48:16 -0500	[thread overview]
Message-ID: <1053107295.2606.21.camel@toshiba> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0305161307390.1171-100000@ida.rowland.org>

On Fri, 2003-05-16 at 12:16, Alan Stern wrote:
> On 16 May 2003, Paul Fulghum wrote:
> > According to the 82371AB datasheet the controller
> > itself sets the USBCMD_FGR bit when a global RD is
> > detected. So qualifying the wakeup in software won't
> > prevent the controller itself from starting the
> > wakeup process on a false RD from an OC port. :-(
> > 
> > Hmmmm.... crap
> > Is there a way around this or are we back to
> > preventing the suspend?
> 
> It might not be that bad.  What will happen is that the controller will 
> assert FGR and interrupt the host.  The driver will see the global RD, but 
> will also see that it's present only on OC ports, so the driver will never 
> leave the SUSPENDED state and will never write a 0 to FGR and EGSM.  Hence 
> the controller will never become active -- the wakeup won't finish.
>
> Of course, it's necessary to worry about what happens if one port is OC, 
> so the controller is in this permanently-waking-up state, when a device is 
> plugged into the other port.  I think this will re-assert global RD and 
> generate another interrupt.  This time the driver will see that the RD is 
> for real, so it will complete the wakeup sequence.

Agreed, when the controller sets the FGR bit, it
starts sending the resume signal to all ports,
waking attached devices, which will send back
valid resume signals to the host controller, which
will complete the wakeup. Which takes us back
to the thrashing problem.

For the case where ports are not hardwired to OC,
we should account for the possibility that the
OC condition may clear (bad cable replaced, etc).

So if we allow suspend, and then ignore resumes
on an OC (temporary condition) port, then that port will not
be able to cause a valid resume when the OC
condition is cleared. (per port RD is already set)

So always allowing suspend, and selectively doing the
wakeup will cause:
1. thrashing for case of one port OC,
other port OK with attached device.
2. prevent port with OC from doing resume
after clearing OC condition.

For the case of all ports hardwired OC, this
will work because you suspend the whole controller
and never get a valid resume.


-- 
Paul Fulghum
paulkf@microgate.com


  reply	other threads:[~2003-05-16 17:35 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 16:12 2.5.69 Interrupt Latency Paul Fulghum
2003-05-07 19:41 ` Paul Fulghum
2003-05-07 22:28   ` Andrew Morton
2003-05-08  0:25     ` Paul Fulghum
2003-05-08 13:56     ` Paul Fulghum
2003-05-08 19:22       ` Andrew Morton
2003-05-08 19:35         ` Paul Fulghum
2003-05-08 23:20           ` Brian Gerst
2003-05-09 18:12         ` Paul Fulghum
2003-05-09 20:30           ` Paul Fulghum
2003-05-09 21:28             ` Andrew Morton
2003-05-12 13:57               ` Paul Fulghum
2003-05-12 14:06                 ` Paul Fulghum
2003-05-12 16:24                 ` Greg KH
2003-05-12 17:08                   ` Paul Fulghum
2003-05-12 17:30                     ` Greg KH
2003-05-12 17:49                       ` Paul Fulghum
2003-05-12 18:01                         ` Greg KH
2003-05-12 18:15                           ` Paul Fulghum
2003-05-13 15:26                       ` Alan Stern
2003-05-13 15:35                         ` Paul Fulghum
2003-05-13 17:30                           ` Greg KH
2003-05-13 13:01                             ` Paul Fulghum
2003-05-13 18:09                               ` Greg KH
2003-05-13 18:11                                 ` Greg KH
2003-05-13 21:35                                   ` Alan Stern
2003-05-13 21:48                                     ` Helge Hafting
2003-05-13 22:09                                       ` Alan Stern
2003-05-14 21:06                                   ` Paul Fulghum
2003-05-14 21:15                                     ` Johannes Erdfelt
2003-05-14 21:30                                     ` Greg KH
2003-05-14 21:45                                       ` Paul Fulghum
2003-05-13 20:17                           ` Bill Davidsen
2003-05-13 22:39                             ` Paul Fulghum
2003-05-14 20:52                           ` Test Patch: " Alan Stern
2003-05-15 13:45                             ` Paul Fulghum
2003-05-15 14:12                             ` Paul Fulghum
2003-05-15 21:07                               ` Alan Stern
2003-05-15 15:26                             ` Paul Fulghum
2003-05-15 18:11                               ` Alan Stern
2003-05-15 18:40                                 ` Paul Fulghum
2003-05-15 19:42                                 ` Paul Fulghum
2003-05-15 19:59                                   ` Paul Fulghum
2003-05-15 21:13                                   ` Alan Stern
2003-05-15 21:30                                     ` Paul Fulghum
2003-05-15 19:17                                       ` Paul Fulghum
2003-05-16 15:33                                         ` Alan Stern
2003-05-16 15:58                                           ` Paul Fulghum
2003-05-16 16:18                                             ` Paul Fulghum
2003-05-16 17:16                                               ` Alan Stern
2003-05-16 17:48                                                 ` Paul Fulghum [this message]
2003-05-16 18:31                                                   ` Paul Fulghum
2003-05-16 18:40                                                   ` Alan Stern
2003-05-16 19:05                                                     ` Paul Fulghum
2003-05-18  0:57                                                     ` Andrew McGregor
2003-05-16 17:20                                             ` Alan Stern
2003-05-16 17:51                                               ` Paul Fulghum
2003-05-19 16:41                                             ` Alan Stern
2003-05-19 18:20                                               ` Paul Fulghum
2003-05-19 18:49                                                 ` Alan Stern
2003-05-16 18:10                                           ` Paul Fulghum
2003-05-14 17:50               ` Paul Fulghum
2003-05-09 21:07           ` Andrew Morton
2003-05-09 21:28             ` Paul Fulghum
2003-05-08 14:47     ` Paul Fulghum

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=1053107295.2606.21.camel@toshiba \
    --to=paulkf@microgate.com \
    --cc=johannes@erdfelt.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).