Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4726964pxf; Tue, 23 Mar 2021 19:26:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz18+WNSv4CR1xQkLRCiVHzj8ewwOlD8z8Gr5WG9NyfWNSXY26tYshzyjdO319pa/RYkZ7N X-Received: by 2002:aa7:da46:: with SMTP id w6mr986933eds.40.1616552803949; Tue, 23 Mar 2021 19:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616552803; cv=none; d=google.com; s=arc-20160816; b=xkeqg740d9ioQuO5mxcQFQmNWaLCTS2whKo/sVduJFep2YtuHgkjoWQAlaZCTpzUQB jFaBV5Shj4F1q+zapTYZ7AFTq79I8innEdzhqe9UkoRmVkGiSPOXqqYXZUV9Odc6IBXD pxSr6DavfGCgUFwaW9/PWp2Ine+fLGE4I2175dmtWKMx8KloW7vKYnVpdQKaBteODI0U vZ+BpylH/mhJMzDvOqPY+BntSTQuQAodxcbTM0o1ofrYGslE8hOmE/3BsMTrUMcabLWy B29Wzwe6lX29qAkClzVToLiYBTPKGhMAnGsSQfGX30Y9va646qh/v3JVwn6deQkNtJ1g gh8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OTxsMKbqS3j6HyoSnpgS7Zl2dAFcPdUJXdTf3F10aqs=; b=iG+q27CgT1oBhqVGoraGKMi0IE3OtoG5TOHW6HwI9I+f6KADOXJRSf+ZHdVqUfiN8T /k7ujY9oYVoa/yUSaPD+wgiCEOFo5KQ3LRAjuXLesF30v76UPAtrnerm9xBZKKLcl0S+ Y8RGzW+VBawQ9wWIJdvT0d60aoVBMEFXwUSKeIMhbwlqnS7/vsO2tkOWUrY0032R0V96 oaBoW31T/9SK/rGSnILlemjMe2k0CN9sCzirtvwn4IQeEjrhPtZm7F2dxSEbPm3MO9NA AaAjqHnVQ/42DzvB+9obJVnOq2V+lBqh9Fx9FF15uepWzS07IoBKOb1+7gtp3TQQBYue 7MBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tI3hL+dL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si594755edp.531.2021.03.23.19.26.21; Tue, 23 Mar 2021 19:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tI3hL+dL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbhCWONH (ORCPT + 99 others); Tue, 23 Mar 2021 10:13:07 -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