Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp645585pxf; Thu, 25 Mar 2021 10:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxeT8mb7HCZ5U5iuBeG0EtEJZbDI9g1Wsgeylu/GW35W20RyDjzvNDtVU+ia+toFuFS70S X-Received: by 2002:a05:6402:19a:: with SMTP id r26mr10274449edv.44.1616694064319; Thu, 25 Mar 2021 10:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616694064; cv=none; d=google.com; s=arc-20160816; b=O30gB1/iUluBNT816r5zR9WWNmftzrHRWhONKZo5yuxPL3qPM67/9xz2i9KpR3A657 jlKChPUEvzJ6dleLmCy5OYQbOAG4ElLgmfANmYsoW7BmkEJ0Bh40Pv6vx1y1LCgB2p2O p0/gWtidm+LA/eKff3jsRR4woGj+bX0XpggFDKuS5iNxaS2NWHq+AqV9AR0Dqlc6Ta6w 2cJ2wCZPQJgMGP3eD/5SvfP++E8RhHx5786Ki6CqFuu9/DLhVjk5USBVmxN+8bLpzhvp pOqQe32Q5uCy8ZK9+xqzry+17ULkRB1gTxRxuojF0WT5mP+RVElo4PoNiKdMn2ejdukw Y0QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=oS6ErvaJTedtTZRt2m8IhPzbV+Ixts/qYw+C62aafiA=; b=XRFC8GauKgICxo2eHVUY+Ku54E4zln+KyNJeaKAUhbRrEnmUsX2JaMV8zYgZzgekAR K7gGkJAUnHBZcrTEe6pWh0qt9V0YyrjZry2k5gmh7wv964jCCTIWsCggGriwWoQdKy1U MNO9EdFyARoapCF0TRLFtM+q3ijv21uhHhOlrdkAv25Du0eLf1JMTmQaIbM879cTUO+/ 0HlAEEBlxLMVtTSeedyZV6rjD2cr2d9DBc9oRlu/zHqBvM9XGy9mi9oHKGS7aUrGzjb6 2Krrnh3z2X6Oh/PIbMOkL8FfRzqI3Qp134oACuW168PbKksHfHvO8FRzKVbbLI0tLORO 1DCg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do7si5014564ejc.307.2021.03.25.10.40.40; Thu, 25 Mar 2021 10:41:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbhCYRjn (ORCPT + 99 others); Thu, 25 Mar 2021 13:39:43 -0400 Received: from mga03.intel.com ([134.134.136.65]:27389 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbhCYRjV (ORCPT ); Thu, 25 Mar 2021 13:39:21 -0400 IronPort-SDR: eCMT3yTW2EGZfcHUZ2cznwuD39V1r3Wv8rWYBODxCpbcZsPd8dLMaJUQBDcigvG3+HOb4pWxD+ oOH07vNPzr7g== X-IronPort-AV: E=McAfee;i="6000,8403,9934"; a="191016762" X-IronPort-AV: E=Sophos;i="5.81,278,1610438400"; d="scan'208";a="191016762" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 10:39:20 -0700 IronPort-SDR: 0TVUNNIh1zGMOZkz9T8MOMTbvezKxkBGMPrRwvQYfSYl3crsztv7KNCfOsmDbicfxRs66uxUql uPdv8m+t/djg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,278,1610438400"; d="scan'208";a="416112200" Received: from climb.png.intel.com ([10.221.118.165]) by orsmga008.jf.intel.com with ESMTP; 25 Mar 2021 10:39:16 -0700 From: Voon Weifeng To: "David S . Miller" , Maxime Coquelin Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jose Abreu , Jakub Kicinski , Giuseppe Cavallaro , Andrew Lunn , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Ong Boon Leong , Voon Weifeng , Wong Vee Khee Subject: [PATCH v2 net-next 0/5] net: stmmac: enable multi-vector MSI Date: Fri, 26 Mar 2021 01:39:11 +0800 Message-Id: <20210325173916.13203-1-weifeng.voon@intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency, enabling multi MSI interrupt will automatically select the interrupt mode configuration INTM=1. When INTM=1, the TX/RX transfer complete signal will only asserted on corresponding sbd_perch_tx_intr_o[] or sbd_perch_rx_intr_o[] without asserting signal on the common sbd_intr_o. Hence, for each TX/RX interrupts, only the corresponding ISR will be triggered. Every vendor might have different MSI vector assignment. So, this patchset only includes multi-vector MSI assignment for Intel platform. Changes: v1 -> v2 patch 2/5 -Remove defensive check for invalid dev pointer patch 3/5 - Refactor out a huge if statement into separate subfunctions. - Removed the netdev_info for every successful request of IRQs. - Return 0 for each successful request of IRQs. patch 4/5 - Moved the msi tx/rx base vector check before alloc irq - Restuctured the clean up code after fail to alloc irq and fail to probe - Unprepared and unregistered the stmmac-clk if fail to alloc irq patch 5/5 -Moved the readl and writel into the if statement as it is only executed when multi msi is enabled Ong Boon Leong (4): net: stmmac: introduce DMA interrupt status masking per traffic direction net: stmmac: make stmmac_interrupt() function more friendly to MSI net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX stmmac: intel: add support for multi-vector msi and msi-x Wong, Vee Khee (1): net: stmmac: use interrupt mode INTM=1 for multi-MSI drivers/net/ethernet/stmicro/stmmac/common.h | 21 + .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 120 ++++- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 24 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 7 + .../net/ethernet/stmicro/stmmac/dwmac4_dma.h | 24 +- .../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 30 +- .../net/ethernet/stmicro/stmmac/dwmac_dma.h | 22 +- .../net/ethernet/stmicro/stmmac/dwmac_lib.c | 8 +- .../net/ethernet/stmicro/stmmac/dwxgmac2.h | 6 + .../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 8 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 16 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 499 +++++++++++++++--- include/linux/stmmac.h | 9 + 14 files changed, 697 insertions(+), 99 deletions(-) -- 2.17.1