public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Matthew Garrett <mjg@redhat.com>
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 16:04:44 -0500	[thread overview]
Message-ID: <20120813210444.GJ24088@thinkpad-t410> (raw)
In-Reply-To: <1344889232-3907-2-git-send-email-mjg@redhat.com>

On Mon, Aug 13, 2012 at 04:20:32PM -0400, Matthew Garrett wrote:
> +static int gmux_index_wait_ready(struct apple_gmux_data *gmux_data)
> +{
> +	int i = 200;
> +	u8 gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> +
> +	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.

> +static int gmux_index_wait_complete(struct apple_gmux_data *gmux_data)
> +{
> +	int i = 200;
> +	u8 gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> +
> +	while (i && (gwr & 0x01)) {
> +		gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> +		msleep(100);

Likewise.


  reply	other threads:[~2012-08-13 21:04 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 [this message]
2012-08-13 21:36     ` Matthew Garrett
2012-08-13 22:03       ` Seth Forshee
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=20120813210444.GJ24088@thinkpad-t410 \
    --to=seth.forshee@canonical.com \
    --cc=froemel@vmars.tuwien.ac.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --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