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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C81EBEE49AE for ; Tue, 22 Aug 2023 17:51:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjHVRvu (ORCPT ); Tue, 22 Aug 2023 13:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjHVRvn (ORCPT ); Tue, 22 Aug 2023 13:51:43 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14466196; Tue, 22 Aug 2023 10:51:41 -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=ntj7K6XXlQwLgtMfVD+ZqplWIe/c7G12xO0Z+/57Prw=; b=kQwYTqnqqO7imz3poYmNGtCO5R PNfzxDEQRvqz9SWTu15F4NhOyp6tSUWTJa4tpLs1sT+rw90QrSdxwPaup7YK4fdBYYmEP5n5rSVJO USfYqIaiUfD+MuYH0EAcxvmDe9c2488CT4H8Est5jYUC72C9lAmby6euWBM0yhqLTMfY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qYVXN-004o2v-Su; Tue, 22 Aug 2023 19:51:29 +0200 Date: Tue, 22 Aug 2023 19:51:29 +0200 From: Andrew Lunn To: Justin Lai Cc: kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, jiri@resnulli.us Subject: Re: [PATCH net-next v6 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code Message-ID: References: <20230822031805.4752-1-justinlai0215@realtek.com> <20230822031805.4752-2-justinlai0215@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230822031805.4752-2-justinlai0215@realtek.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int rtase_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause) > +{ > + const struct rtase_private *tp = netdev_priv(dev); > + u16 value = RTL_R16(tp, CPLUS_CMD); > + > + value &= ~(FORCE_TXFLOW_EN | FORCE_RXFLOW_EN); > + > + if (pause->tx_pause) > + value |= FORCE_TXFLOW_EN; > + > + if (pause->rx_pause) > + value |= FORCE_RXFLOW_EN; > + > + RTL_W16(tp, CPLUS_CMD, value); > + return 0; > +} I'm pretty sure i said if pause->autoneg is true, you should return -EOPNOTUSPP. Andrew