All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@myrealbox.com>
To: Felipe W Damasio <felipewd@terra.com.br>,
	Francois Romieu <romieu@fr.zoreil.com>
Cc: Andy Lutomirski <luto@myrealbox.com>, netdev@oss.sgi.com
Subject: Re: [PATCH r8169] ethtool support and sane speed selection/detection
Date: Wed, 28 Apr 2004 08:50:35 -0700	[thread overview]
Message-ID: <408FD2CB.6000102@myrealbox.com> (raw)
In-Reply-To: <408FA6B3.1000805@terra.com.br>



Felipe W Damasio wrote:

>> +static int rtl8169_get_settings(struct net_device *dev,
>> +                   struct ethtool_cmd *cmd)
>> +{
>> +    struct rtl8169_private *tp = dev->priv;
>> +    void *ioaddr = tp->mmio_addr;
>> +    u8 status = RTL_R8(PHYstatus);
> 
> 
>     IMHO you should hold the device lock here (tp->lock).

Why?  Isn't reading the PHYstatus atomic w.r.t. writing it?  I think the 
lock just needs to be held for writes.

Oh -- there is a race if set_settings is called between the PHYstatus 
read and the rest of the code.  I can't imagine that happening, but it 
wouldn't hurt to take the lock.

Francois, do you want a new patch, or should I wait until you finish 
whatever you're doing?

--Andy

  parent reply	other threads:[~2004-04-28 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-24  5:08 [PATCH r8169] ethtool support and sane speed selection/detection Andy Lutomirski
2004-04-24 10:44 ` Francois Romieu
2004-04-24 15:05   ` Andy Lutomirski
2004-04-24 15:01     ` Francois Romieu
2004-04-24 19:44     ` Jon D Mason
2004-04-24 19:13       ` Francois Romieu
2004-04-24 20:02       ` Andy Lutomirski
2004-04-24 20:18         ` Jon D Mason
2004-04-25 21:09 ` Jon D Mason
2004-04-26 17:41   ` Andy Lutomirski
2004-04-26 17:41   ` Andy Lutomirski
2004-04-28 12:42 ` Felipe W Damasio
2004-04-28 15:24   ` Jeff Garzik
2004-04-28 15:50   ` Andy Lutomirski [this message]
2004-04-28 15:51     ` Francois Romieu

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=408FD2CB.6000102@myrealbox.com \
    --to=luto@myrealbox.com \
    --cc=felipewd@terra.com.br \
    --cc=netdev@oss.sgi.com \
    --cc=romieu@fr.zoreil.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.