Re: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS EEPROMS

From: Greg KH
Date: Tue Mar 23 2021 - 10:13:36 EST


On Mon, Feb 15, 2021 at 11:38:21AM -0800, Don Bollinger wrote:
> optoe is an i2c based driver that supports read/write access to all
> the pages (tables) of MSA standard SFP and similar devices (conforming
> to the SFF-8472 spec), MSA standard QSFP and similar devices (conforming
> to the SFF-8636 spec) and CMIS and similar devices (conforming to the
> Common Management Interface Specfication).

Given this thread, I think that using the SFP interface/api in the
kernel already seems like the best idea forward.

That being said, your api here is whack, and I couldn't accept it
anyway.

Not for the least being it's not even documented in Documentation/ABI/
like all sysfs files have to be :)

And it feels like you are abusing sysfs for things it was not ment for,
you might want to look into configfs?

But really, these are networking devices, so they should be controllable
using the standard networking apis, not one-off sysfs files. Moving to
the Linux-standard tools is a good thing, and will work out better in
the end instead of having to encode lots of device-specific state in
userspace like this "raw" api seems to require.

thanks,

greg k-h