Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2202257rwl; Thu, 6 Apr 2023 07:11:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZY1QZLCFn559V8lcvrWT1+P2mubejoMA6mVbcEu/Z0DuKHBDSErrIltA2OVjqZMznoz2lr X-Received: by 2002:a17:907:80c:b0:949:64d1:ef87 with SMTP id wv12-20020a170907080c00b0094964d1ef87mr6448467ejb.55.1680790305843; Thu, 06 Apr 2023 07:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680790305; cv=none; d=google.com; s=arc-20160816; b=Q4aGYV0Cc7UlksFEL2fBpJcIsNZisNKqA+pWSvJK55UqctlyIfBcVgR3TPoMF9spJ/ YVdOHQYjilOvnue3tviugG0HoXqrOPm3ezQCRYEEimp77ObLCeER/1BzLwKVxe/eXj4g eHQbP7KS7YrTkuosxNlYyxuiF9mZjxW/ZLCFNHTa7D3THzoYAEoVY+Uq+hNVzX9vJYWi AoOAE+teUksHfr0UJ/9y6ZKa69NxtP0ucaOCw76xR0aHLsF+vLy+JsTYro0/Nu4NDrM0 v7ZgttrGULm+rJ9EX1IfyYD6lNGDRrI1CAiYBRB93EivLE07EHyfxFp06Y0EP+q1UWHi CTXg== 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=G4nuJcd5AfkMWWoRDvdvNvpxfbVN9zYnFiB5IonV9R4=; b=tVmNJcRhB4x5xTNHSy75KPPzAiEdCLkBBa8Ekn3bcUoeb8gCSiVqqX5S08crmg6pIk pMf+zyWjNwWlP+RC/fCsq2RY6A7OXGzZ15vQrwpfTLw5f0W867oB4vBHbaNdICY1HxLC 1ho3Ao6OMaG5tbezigkzlqRjupG95QLVaodOSPvrAF0+iv2T9hVo9ebMQxiKt25wh5qz tPcP2gcDXmg9baXdwFA1FgUlaPriWxFoYLQv1OPe8+0A3VovkWeNrYwHDR9EYm5wSYrf zLXi9rsgELyMI8Vsd4eLNK+AFylkxAsIxla45CDFs5/y6uly7QhdG6JEC8bzmquGVA2g efgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZPPa0C0a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me20-20020a170906aed400b009485b4b4e7csi1180564ejb.856.2023.04.06.07.11.17; Thu, 06 Apr 2023 07:11:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZPPa0C0a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238682AbjDFOH1 (ORCPT + 99 others); Thu, 6 Apr 2023 10:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239030AbjDFOG7 (ORCPT ); Thu, 6 Apr 2023 10:06:59 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E86B1AF13; Thu, 6 Apr 2023 07:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=G4nuJcd5AfkMWWoRDvdvNvpxfbVN9zYnFiB5IonV9R4=; b=ZPPa0C0aUl2YsTOMEmCxixeqeA AWpQbKdrF/xvgjzQ+8tx1cMnnTqG2ifwZHpRyiWpp7VcxtHepPNTze3lhfhN2nNp6dhCTdjQn68fV 3M8H4pGqYxv77IZ3MolD8ce/ZTdLuzJGQ+kU7x2WE8bNZe8rROnAT9qYVSh3MlDW/13Q=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pkQFg-009dNo-K7; Thu, 06 Apr 2023 16:06:12 +0200 Date: Thu, 6 Apr 2023 16:06:12 +0200 From: Andrew Lunn To: Ivan Bornyakov Cc: netdev@vger.kernel.org, linux@armlinux.org.uk, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: Re: [PATCH net v2 2/2] net: sfp: avoid EEPROM read of absent SFP module Message-ID: References: <20230406130833.32160-1-i.bornyakov@metrotek.ru> <20230406130833.32160-3-i.bornyakov@metrotek.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406130833.32160-3-i.bornyakov@metrotek.ru> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2023 at 04:08:33PM +0300, Ivan Bornyakov wrote: > If SFP module is not present, it is sensible to fail sfp_module_eeprom() > and sfp_module_eeprom_by_page() early to avoid excessive I2C transfers > which are garanteed to fail. > > Suggested-by: Andrew Lunn > Signed-off-by: Ivan Bornyakov Reviewed-by: Andrew Lunn Andrew