lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips
> +	/* hwmon interface needs to access 16bit registers in atomic way to
> + * guarantee coherency of the diagnostic monitoring data. If it is not
> + * possible to guarantee coherency because EEPROM is broken in such way
> + * that does not support atomic 16bit read operation then we have to
> + * skip registration of hwmon device.
> + */
> + if (sfp->i2c_block_size < 2) {
> + dev_info(sfp->dev, "skipping hwmon device registration "
> + "due to broken EEPROM\n");
> + dev_info(sfp->dev, "diagnostic EEPROM area cannot be read "
> + "atomically to guarantee data coherency\n");
> + return;
> + }

This solves hwmon. But we still return the broken data to ethtool -m.
I wonder if we should prevent that?

Andrew

\
 
 \ /
  Last update: 2021-01-07 03:03    [W:0.188 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site