[PATCH linux dev-4.10 v3] drivers/hwmon/occ: Add sysfs_notify on error

Patrick Williams patrick at stwcx.xyz
Sat Jul 8 04:37:20 AEST 2017

On Fri, Jul 07, 2017 at 04:06:30PM +0930, Joel Stanley wrote:
> On Fri, Jul 7, 2017 at 12:58 AM, Eddie James <eajames at linux.vnet.ibm.com> wrote:
> > From: "Edward A. James" <eajames at us.ibm.com>
> > +void occ_set_error(struct occ *occ, int error)
> > +{
> > +       occ->error_count++;
> > +       if (occ->error_count > OCC_ERROR_COUNT_THRESHOLD)
> I think this policy can live in userspace. Instead of counting the
> errors in the kernel and only reporting after some threshold, report
> all of the errors.
> Userspace can then chose to do with this information what it wants,
> according to the policy of the system.

This retry / threshold count is in the OCC specification itself and is
not considered "policy of the system".  I believe the specification
requires not considering errors under a threshold count as actual
errors and if there is a successful communication the threshold count is
suppose to be reset.  How do we coordinate that with userspace keeping a
separate error policy?

Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170707/fe04a26b/attachment.sig>

More information about the openbmc mailing list