Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9012575rwr; Thu, 11 May 2023 08:53:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51lbzS4G7gQBFBahxcGDx0GLSNDs+RBqvDXYjo2/QLA9h2nZVPFg+7vs0FW6sgHrbWzwrY X-Received: by 2002:a05:6a21:6d88:b0:f2:7c00:fe7a with SMTP id wl8-20020a056a216d8800b000f27c00fe7amr27502172pzb.10.1683820387988; Thu, 11 May 2023 08:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683820387; cv=none; d=google.com; s=arc-20160816; b=YEnm2wAuNkN4xgwypoluAKylVKz+HQcbCURZbDoiE+YDVj911RRuGZLfT56piq/gua EVedloaJ2LtRG3XsMWVwwE/PNXj7NRrbJI3DEjYoc7D5l4z4bGyL66lcPnPg6WImXHyq JLteKYtp0LW9GcWck3Jvnn+TkptRikXKEzBzCyplRpKVzNc0yIzqMGCtkstO9pY97YxI 4Lo9Cbw80yzZLU+Poc7n0mlBPZvXPFoyYc3ZTe1Y0N8K8HLL1WlGtXx1K7MY28hxuC8W S6pt86UQaFQUVipRiSBUG+CAbBcgxf+fTz7IAoV6YCmn4VYmFGRpw2Z7SsefGdwcIpd5 x1iA== 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=E7i+xfg7Zmreb4Vww4EYKdJmkpv928hvjj/hafEYQT0=; b=Zwplgmidkd2kSI8Ki/fdgHPzXQPNnWwNPN1wgCsFWsGXQyVtSOUVE5JV74594gqT/L /P5t2CPNSHiNQk9MSuiNlSXgMt0iEA//GiiRAKxIvvsLzYPd2wFNMl2PnMuVr/2L840P EQIlbZb+MoTlq2rF6jqxPy9y2u4UTlInoqYFe49fCxdw57fAzy7LIVDf0KCavSDykk+Y bzNggREQyY59PFWm9Pw70GuqZfhVP0xdmiPQbSqpJWGYuozdTPnfyPbyzFJgHmrCA9db wYgXvKR+oWQSQfHGYONc0yU4XCSs6qwwBH4VAhy5nawYTMzFBlbVewuXFqGv0P7CKstL cV0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1M5qqDtA; 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 t64-20020a638143000000b0050b508f68d8si6858497pgd.206.2023.05.11.08.52.55; Thu, 11 May 2023 08:53:07 -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=1M5qqDtA; 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 S238485AbjEKPuM (ORCPT + 99 others); Thu, 11 May 2023 11:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238364AbjEKPt4 (ORCPT ); Thu, 11 May 2023 11:49:56 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CBEC4C3F; Thu, 11 May 2023 08:49:22 -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=E7i+xfg7Zmreb4Vww4EYKdJmkpv928hvjj/hafEYQT0=; b=1M5qqDtAkcn+e6iqllMITj2Nmy U756c5EXwyGGyFDZlxHj9uDncFUTsXS7nQbZgXV8HxqdWcquRn7z9S0aRiIN/wNqbqfmobsA6UzcY ZwDulJZWQ/d6D9Y+7Y5p59yV531pEJb5aNNP1oQ8mvRs0uhFCTKosjuCtP55wP/XXr2k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1px8XW-00CZd1-2A; Thu, 11 May 2023 17:49:10 +0200 Date: Thu, 11 May 2023 17:49:10 +0200 From: Andrew Lunn To: Pranavi Somisetty Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, linux@armlinux.org.uk, palmer@dabbelt.com, git@amd.com, michal.simek@amd.com, harini.katakam@amd.com, radhey.shyam.pandey@amd.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH net-next v2 2/2] net: macb: Add support for partial store and forward Message-ID: <3a3c6241-2134-42d0-8dd3-0c96d8e7300b@lunn.ch> References: <20230511071214.18611-1-pranavi.somisetty@amd.com> <20230511071214.18611-3-pranavi.somisetty@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230511071214.18611-3-pranavi.somisetty@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 > + if (GEM_BFEXT(PBUF_CUTTHRU, gem_readl(bp, DCFG6))) { > + if (bp->caps & MACB_CAPS_PARTIAL_STORE_FORWARD) { > + retval = of_property_read_u16(bp->pdev->dev.of_node, > + "rx-watermark", > + &bp->rx_watermark); > + > + /* Disable partial store and forward in case of error or > + * invalid watermark value > + */ > + wtrmrk_rst_val = (1 << (GEM_BFEXT(RX_PBUF_ADDR, gem_readl(bp, DCFG2)))) - 1; > + if (retval || bp->rx_watermark > wtrmrk_rst_val || !bp->rx_watermark) { > + if (bp->rx_watermark > wtrmrk_rst_val) { > + dev_info(&bp->pdev->dev, "Invalid watermark value\n"); > + bp->rx_watermark = 0; Please return -EINVAL. We want the DT author to fix their error. > + } > + dev_info(&bp->pdev->dev, "Not enabling partial store and forward\n"); The DT property is optional? So when it is missing, retval will be -EINVAL. Please don't spam the logs in this case. Andrew