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 5FFA4C433EF for ; Tue, 4 Jan 2022 15:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232552AbiADPlj (ORCPT ); Tue, 4 Jan 2022 10:41:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiADPlj (ORCPT ); Tue, 4 Jan 2022 10:41:39 -0500 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 21C88C061761 for ; Tue, 4 Jan 2022 07:41:39 -0800 (PST) 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 1n4lwP-0000zl-Jb for linux-can@vger.kernel.org; Tue, 04 Jan 2022 16:41:37 +0100 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id BC4496D102A for ; Tue, 4 Jan 2022 15:41:36 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 666736D1026 for ; Tue, 4 Jan 2022 15:41:36 +0000 (UTC) Received: from blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 140fc168 for ; Tue, 4 Jan 2022 15:41:35 +0000 (UTC) From: Marc Kleine-Budde To: linux-can@vger.kernel.org Subject: [PATCH v2 1/3] can: flexcan: change RX-FIFO feature at runtime Date: Tue, 4 Jan 2022 16:41:30 +0100 Message-Id: <20220104154133.848784-1-mkl@pengutronix.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-can@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org Hello, this picks up Dario's work. Changes since RFC: - move driver into subdir - rename flexcan_main.c -> flexcan-core.c (mcp251xfd and tcan4x5x driver have the same naming scheme) - use copyright notice from flexcan.c in flexcan.h - add private flag support to set rx-fifo - remove drvinfo, the kernel will fall back to the default implementation Show available private flags: | $ sudo ethtool --show-priv-flags can0 | Private flags for can0: | rx-fifo: on Change private flag: | $ sudo ethtool --set-priv-flags can0 rx-fifo off | netlink error: Device or resource busy ...does not work if interface is up. Shut down interface and change "rx-fifo": | $ sudo ip link set dev can0 down | $ sudo ethtool --set-priv-flags can0 rx-fifo off | $ sudo ethtool --show-priv-flags can0 | Private flags for can0: | rx-fifo: off | | $ sudo ip link set dev can0 up | $ sudo ethtool --show-priv-flags can0 | Private flags for can0: | rx-fifo: off Is the name "rx-fifo" acceptable? Can you think of a better name? What about adding a new quirk to the driver, only if that quirk is that, it is allowed to change between rx-fifo and rx-mailbox mode? What to you think? regards, Marc