From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47D99C433E3 for ; Tue, 23 Mar 2021 14:13:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11D1C619BB for ; Tue, 23 Mar 2021 14:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbhCWONI (ORCPT ); Tue, 23 Mar 2021 10:13:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:59016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232210AbhCWONA (ORCPT ); Tue, 23 Mar 2021 10:13:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 09AE7619A9; Tue, 23 Mar 2021 14:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616508780; bh=jKQf4rc43XmSfVAPjyFxLr/Xr4+DIDxPH4T8RixyZ14=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tI3hL+dLKo90oYgd6XTZ1bxfZN5PHzY6zQsrcCyZSZ7xLt0cdmYrfvkQXyY4eERW8 NtbHxulop8Z1GjMLnmRqmnlHH34JNRV2ogEd0JXR+AFhaXBYA6CglV7OQ4CwihYhQD INcNfScIqi6yPPfZqPwTRvqafSvhPxqIMDeCNMT8= Date: Tue, 23 Mar 2021 15:12:58 +0100 From: Greg KH To: Don Bollinger Cc: arndb@arndb.de, linux-kernel@vger.kernel.org, brandon_chuang@edge-core.com, wally_wang@accton.com, aken_liu@edge-core.com, gulv@microsoft.com, jolevequ@microsoft.com, xinxliu@microsoft.com Subject: Re: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS EEPROMS Message-ID: References: <20210215193821.3345-1-don@thebollingers.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210215193821.3345-1-don@thebollingers.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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