mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Justin Piszcz <jpiszcz@lucidpixels.com>,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] 3.10: Intel HWMON/NIC temperature sensor question
Date: Wed, 3 Jul 2013 17:08:38 +0200	[thread overview]
Message-ID: <20130703170838.326894c6@endymion.delvare> (raw)
In-Reply-To: <20130703144845.GB10323@roeck-us.net>

On Wed, 3 Jul 2013 07:48:45 -0700, Guenter Roeck wrote:
> 82575 and 82599. Doesn't matter much, though, since they don't export the "name"
> attribute from their driver, meaning the sensors command won't find the sensors.
> Also, they enerate the hwmon device first and then create the attributes, which
> is the wrong order and creates a potential race condition with demons.

Yes and no. For devices which are only implementing hwmon features,
hwmon is just a link and the attributes belong to the device. So we can
create the attributes first and the hwmon device second.

However for devices which are primarily something else and only
register a hwmon device as a side object, the hwmon attributes are
attached to the hwmon class device and not the main device. In that
case the hwmon device has to be created first and the attributes
second. Yes, this is racy. The only clean way around it AFAIK is to
implement all the attributes as proper class attributes rather than
creating them manually - but it would take a whole redesign of the
hwmon core module.

A workaround may be to create the name attribute last.

> Someone who has a board will have to fix that at some point.

-- 
Jean Delvare

  reply	other threads:[~2013-07-03 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <002401ce77e9$da6524b0$8f2f6e10$@lucidpixels.com>
2013-07-03 14:48 ` Guenter Roeck
2013-07-03 15:08   ` Jean Delvare [this message]
2013-07-03 16:25     ` Guenter Roeck

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=20130703170838.326894c6@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=jpiszcz@lucidpixels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.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

all inboxes | Powered by JetHome®