public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	Bernhard Froemel <froemel@vmars.tuwien.ac.at>
Subject: Re: [PATCH 2/2] apple_gmux: Add support for newer hardware
Date: Mon, 13 Aug 2012 17:03:30 -0500	[thread overview]
Message-ID: <20120813220330.GK24088@thinkpad-t410> (raw)
In-Reply-To: <20120813213607.GB27838@srcf.ucam.org>

On Mon, Aug 13, 2012 at 10:36:07PM +0100, Matthew Garrett wrote:
> On Mon, Aug 13, 2012 at 04:04:44PM -0500, Seth Forshee wrote:
> > > +
> > > +	while (i && (gwr & 0x01)) {
> > > +		inb(gmux_data->iostart + GMUX_PORT_READ);
> > > +		gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> > > +		msleep(100);
> > 
> > Wouldn't it make more sense if the msleep was before reading the port
> > again? Otherwise there's no substantial dely between the first and
> > second times we read it.
> 
> Mm. I'm doing the same as the ACPI implementation - it may be that 
> reading GMUX_PORT_READ triggers the update of GMUX_PORT_WRITE? Hard to 
> know without the docs.

Indeed. I do find the structure of the loop to be odd, but I suppose the
safest approach is to follow the only known working implementation we
have. In that case ...

Acked-by: Seth Forshee <seth.forshee@canonical.com>


  reply	other threads:[~2012-08-13 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 20:20 [PATCH 1/2] gmux: Add generic write32 function Matthew Garrett
2012-08-13 20:20 ` [PATCH 2/2] apple_gmux: Add support for newer hardware Matthew Garrett
2012-08-13 21:04   ` Seth Forshee
2012-08-13 21:36     ` Matthew Garrett
2012-08-13 22:03       ` Seth Forshee [this message]
2012-08-13 20:49 ` [PATCH 1/2] gmux: Add generic write32 function Seth Forshee
2012-08-13 21:32   ` Matthew Garrett
2012-08-13 20:55 ` Seth Forshee

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=20120813220330.GK24088@thinkpad-t410 \
    --to=seth.forshee@canonical.com \
    --cc=froemel@vmars.tuwien.ac.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /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