Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3139208rdh; Thu, 28 Sep 2023 04:03:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGprEJLSgVfnkgSVXNShhBntHMsfPbQ6eJPrZc2DKdX82b2auP80+vEL3hgtawlEUntAkCV X-Received: by 2002:a05:6a00:1d0b:b0:68f:b986:ff69 with SMTP id a11-20020a056a001d0b00b0068fb986ff69mr1453230pfx.6.1695898993622; Thu, 28 Sep 2023 04:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695898993; cv=none; d=google.com; s=arc-20160816; b=IzbO0mwuqQsJoibYSH2m06gCgE+zheVXSyGHbegZEweRaw6dTfh1ufIF12mij7nFXm 85LV6Ag9ri25g5scdWh7jPT7p4zrOUBTfxZBIHznu9csYGB2CbmkXnv9nuE0jaonXPBY S06TAVi8YXtn2sGrW15mAKX+lcpSR9IAZSnvhVAO3NOy7DgGzkLvN0yBfPBbPnREFlmQ C9ZBSG7wSTG+q7B1tWvKbmCKQP7CmsiVn9G7ElM9/xF+unBvE1f8EPCex+Jez1ViBudk z4DEWQa4aHOcZQLK45doC5on1dlb51D52gcom8+4xqEBN2pQBlwaOvqxbxaQ4J76UIg2 meNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1uvomS+gcthKehJ+O7uzwr/Kq7vtR4nZkOIontK3hzw=; fh=J4St9tMjBInT3r1VVHSF1O7f2qS3KxSaZBHCVggmRHk=; b=rkjI2fKwE7iCGNIscQaikn0IUEx9PCQA8IrRZxns1W91CJ2fCtcijEb3UzSuf+YMBG hYbjScYnk75P66aJNvYK6nNGrY8v8qpQ0yvrZuf4zSVq8QxE/VElOMGm7uUAhl/nL8oJ ZCY0JUMJOszJNUGk4D5S3Fxv1sgnHyRpN22K27S7iu98r5oNWS662XIqPdIRNXagyFgQ DSpgXd05Q41DpCT7dPu6Mr/NZ/61MRf3ath5MWLBJesR1WE47PWuNjSSwqI/1FHUK08v jVSvu1JInsYc0JXVGSMYW4tla2993eoysHamJk/h57m2QMEs844A7FeGIEKDBq5+SfQv osDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a3-20020a63cd43000000b00573f89ac5a1si18005507pgj.102.2023.09.28.04.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4B3C08329A2A; Thu, 28 Sep 2023 03:50:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbjI1KuF (ORCPT + 99 others); Thu, 28 Sep 2023 06:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231386AbjI1KuC (ORCPT ); Thu, 28 Sep 2023 06:50:02 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF9DE180; Thu, 28 Sep 2023 03:49:58 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 38SAnRqC53692462, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 38SAnRqC53692462 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Sep 2023 18:49:27 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Thu, 28 Sep 2023 18:49:28 +0800 Received: from RTDOMAIN (172.21.210.160) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 28 Sep 2023 18:49:27 +0800 From: Justin Lai To: CC: , , , , , , , , Justin Lai Subject: [PATCH net-next v9 00/13] Add Realtek automotive PCIe driver Date: Thu, 28 Sep 2023 18:49:07 +0800 Message-ID: <20230928104920.113511-1-justinlai0215@realtek.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.210.160] X-ClientProxiedBy: RTEXH36506.realtek.com.tw (172.21.6.27) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 03:50:48 -0700 (PDT) Add Realtek automotive PCIe driver This series includes adding realtek automotive ethernet driver and adding rtase ethernet driver entry in MAINTAINERS file. This ethernet device driver for the PCIe interface of Realtek Automotive Ethernet Switch,applicable to RTL9054, RTL9068, RTL9072, RTL9075, RTL9068, RTL9071. v1 -> v2: - Remove redundent debug message. - Modify coding rule. - Remove other function codes not related to netdev. v2 -> v3: - Remove SR-IOV function - We will add the SR-IOV function together when uploading the vf driver in the future. - Remove other unnecessary code and macro. v3 -> v4: - Remove function prototype - Our driver does not use recursion, so we have reordered the code and removed the function prototypes. - Define macro precisely - Improve macro code readability to make the source code cleaner. v4 -> v5: - Modify ethtool function - Remove some unnecessary code. - Don't use inline function - Let the compiler decide. v5 -> v6: - Some old macro definitions have been removed and replaced with the lastest usage. - Replace s32 with int to ensure consistency. - Clearly point out the objects of the service and remove unnecessary struct. v6 -> v7: - Split this driver into multiple patches. - Reorganize this driver code and remove redundant code to make this driver more concise. v7 -> v8: - Add the function to calculate time mitigation and the function to calculate packet number mitigation. Users can use these two functions to calculate the reg value that needs to be set for the mitigation value they want to set. - This device is usually used in automotive embedded systems. The page pool api will use more memory in receiving packets and requires more verification, so we currently do not plan to use it in this patch. v8 -> v9: - Declare functions that are not extern as static functions and increase the size of the character array named name in the rtase_int_vector struct to correct the build warning noticed by the kernel test robot. Justin Lai (13): net:ethernet:realtek:rtase: Add pci table supported in this module net:ethernet:realtek:rtase: Implement the .ndo_open function net:ethernet:realtek:rtase: Implement the rtase_down function net:ethernet:realtek:rtase: Implement the interrupt routine and rtase_poll net:ethernet:realtek:rtase: Implement hardware configuration function net:ethernet:realtek:rtase: Implement .ndo_start_xmit function net:ethernet:realtek:rtase: Implement a function to receive packets net:ethernet:realtek:rtase: Implement net_device_ops net:ethernet:realtek:rtase: Implement pci_driver suspend and resume function net:ethernet:realtek:rtase: Implement ethtool function net:ethernet:realtek:rtase: Add a Makefile in the rtase folder net:ethernet:realtek: Update the Makefile and Kconfig in the realtek folder MAINTAINERS: Add the rtase ethernet driver entry MAINTAINERS | 7 + drivers/net/ethernet/realtek/Kconfig | 17 + drivers/net/ethernet/realtek/Makefile | 1 + drivers/net/ethernet/realtek/rtase/Makefile | 10 + drivers/net/ethernet/realtek/rtase/rtase.h | 343 +++ .../net/ethernet/realtek/rtase/rtase_main.c | 2492 +++++++++++++++++ 6 files changed, 2870 insertions(+) create mode 100644 drivers/net/ethernet/realtek/rtase/Makefile create mode 100644 drivers/net/ethernet/realtek/rtase/rtase.h create mode 100644 drivers/net/ethernet/realtek/rtase/rtase_main.c -- 2.34.1