Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2605692pxj; Mon, 10 May 2021 06:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT71gzK7nc2SmjBT/ohS0Jg3xPyL+nWuejft25H/JZMt+eK0Thw0GNs/OREJ/Qq90qBksn X-Received: by 2002:a17:907:7216:: with SMTP id dr22mr26016880ejc.185.1620654795225; Mon, 10 May 2021 06:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620654795; cv=none; d=google.com; s=arc-20160816; b=h2IQYXlgN4lAIEizeZHq7L4D2QKIRBTKtQuDOWX5Rc1j9a441g2fZCx4QNsgPo+/hc P3nP5dOph+tpRKWD2i3cV3QloXESmqmXKpx+UQGJu3hINUvOr4Edea/FTLuMHTTwKsWZ C6Hf3f2+FGm3Xpmg73UvGUqQOAadaRMh2WsYXbez3DkMARCx3ULi8MudUe1UwY9VBaTm ytSTKI3fZthdrptOpZjZLWTUwPS63FKBtKb5n9JYxk6iWyOsawOtKbSey+IC2pHeJzdu hQiqeDRaG2yKsMB1erPOVy7YfzBTZOuUHx/DDict+0pJo/dDJZsmsoc3Ab2S2gST8CIA vDOw== 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; bh=wCtb98HaOUD3Q8FtJSDCvwoupJaW/TeX5uY8mFwMyeQ=; b=0zTlgy+b1PZqXSVN9kJ8eqrzBM3E8XoKQ0yirCYmZlc7SaVw3Kag1fJy/SI51KPqWr hXDFOQywSUyJbUSswRWF94jVBHfQk64KX7qxFMZ2+tK5Mc1/dWD0Pw4Njel/8NCx3Aik BCkpBdxB6gDvSFKDkyEyLtgXg7k/t/V2ZbyivSDALj01t2vITOyMdaIbZSqjCPQLS3Ps mUAeUh7jDvPF2g810GVnY9JoUcuNLAg+dQuY6xlmvCNNOs73uSQz0bOOYBUnFHbLKAyG k1xvqr/MCsq/Dayad43oVVxmwKb8BLMi8o2uiHe10vonkZKyHBxbOnX8I/oTpzCQrUCW q/rw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si13220736eja.710.2021.05.10.06.52.50; Mon, 10 May 2021 06:53:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232357AbhEJNvH (ORCPT + 99 others); Mon, 10 May 2021 09:51:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243348AbhEJNq4 (ORCPT ); Mon, 10 May 2021 09:46:56 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 260F3C06138F for ; Mon, 10 May 2021 06:29:09 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lg5xz-0001Ay-Gx; Mon, 10 May 2021 15:28:59 +0200 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:80ab:77d5:ac71:3f91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 25AAE6215A7; Mon, 10 May 2021 13:28:55 +0000 (UTC) Date: Mon, 10 May 2021 15:28:54 +0200 From: Marc Kleine-Budde To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Oliver Hartkopp , Tong Zhang , Vincent Mailhol , Wolfgang Grandegger , Zhang Qilong , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 2/3] can: c_can: add ethtool support Message-ID: <20210510132854.mrqag7vjzqdvfh7j@pengutronix.de> References: <20210509124309.30024-1-dariobin@libero.it> <20210509124309.30024-3-dariobin@libero.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ombjtqvc7trra5hf" Content-Disposition: inline In-Reply-To: <20210509124309.30024-3-dariobin@libero.it> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ombjtqvc7trra5hf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09.05.2021 14:43:08, Dario Binacchi wrote: > With commit 132f2d45fb23 ("can: c_can: add support to 64 message objects") > the number of message objects used for reception / transmission depends > on FIFO size. > The ethtools API support allows you to retrieve this info. Driver info > has been added too. > +static const struct ethtool_ops c_can_ethtool_ops =3D { > + .get_drvinfo =3D c_can_get_drvinfo, > + .get_channels =3D c_can_get_channels, > +}; I think you're filling the wrong information here. I think channels is for independent RX/TX channels. I think you want to implement get_ringparam. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --ombjtqvc7trra5hf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmCZNRMACgkQqclaivrt 76lfqAf9HARu8Ohru3bnD+mX1WDpmANN9GJkTmFclbth4mZR1+g6Y7TabDYnSzPK hSmf5Q90pg/M7of+r8//chVZ9s9wTwJg7vh0ZPJfS2C7GzPMTpV2BoDrV0J5Tj8i qIappCKonVowqiODLp+9yGwB3W91uiFjWPzcqo6fU8gEdvCHUpp1tvSy2OqGyTwQ zcIaLCQ+cJPIMaaaZXi6XSTIxv2SYo/aqepuLu+iNu7/GaoR7jr+R4L7gzTEuADb mYyrC6fpEa2S6O35oHnasGujAob2r9LeMm9obMX6/jK/HINdTOn929vlwXippx+w oSe/9yrBVBAImSRaktpIu6EyBmBM3Q== =qxxQ -----END PGP SIGNATURE----- --ombjtqvc7trra5hf--