From patchwork Fri May 10 20:42:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 13661929 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5132E44393 for ; Fri, 10 May 2024 20:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715373761; cv=none; b=BD/BPSWkkCFmbgPKRH5WrUHhfT9uIXdmNJ74ucmSbn90xIA0lhx6dCq6RFjmrZ+ZDZP8tRCSAqqtPSAxo3ysQE7KFvBsZ8FhdfFtrwaqKJg2SI7VidaCF6qKn2kqjAlCw1a2Km/RddVibi570f1tlM+hNicdPZ8V6G9KrRJ0Irg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715373761; c=relaxed/simple; bh=v8wAR8zg4c9IFHTvA7TVeLLkxNRg1+SyRib34Hf+sQU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=kV364512sPvtF0OSfYOYnhztFX/j/Wu/8Mlh2k577NMPWYUk0IbdC64h99Xnxve2nm4s9Hh47fuyILDbl9WxBhnO0gBjcslD9Tcf2CsYrCNLkbvRBa27CcBxOhbBwEpr4V6xtTx2hAZeKaOoWr5lfD2ftjTPY3x2BqC/IYdO26o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=TRP7+lxF; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="TRP7+lxF" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1e50a04c317so14924175ad.1 for ; Fri, 10 May 2024 13:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1715373760; x=1715978560; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Y/XOrl0n6naV2uG1p28SuP1zUoq1H2FD/kA9/XSaHw0=; b=TRP7+lxFGLkQf5aUScdgLNzWPiuz1K8CLh84hOneMePnl1oq2jrixW5Y4hM8UCppb2 iTHWK6euzpEz5DYDNSaFHr8mTBYZpfEcceEnw55Fm6hv6FIUrGJd57GULL9BNllnPORA tAoOgfRhSYmpixzsP8tcFlkxU9n7PaKKajYA0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715373760; x=1715978560; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Y/XOrl0n6naV2uG1p28SuP1zUoq1H2FD/kA9/XSaHw0=; b=g/ePFPT/IiXCqgZK0ihPvhVcxWCHJ73Au06ICaoW1em54OEMhxVNPNT68l/F8TRwVR 4W2CLeHdk5YCyELsNT54R03ylD/0/i1cVWqNy2aHGyonjvRHW5ndPP+1ORNj/ZJakIb0 lYdzjtmR/6D6KYAVhYc8WIY9vtVDRZjHttqDh3UyGbmABwiIUxeniCFEL1L3esPJjZhG O77nwQoidPpJfNTqpeRey6sCwIpTpdYnRpGTKpxj08YANytaky+Kho4ieWm+OUCz9OCs uUsYk4bGvquRAwXgMHAdcQnltWfihrKA3Om8e2CEC3/Ci1Mh9ohPLkB9fr6qKbUCKp+Z bbwA== X-Forwarded-Encrypted: i=1; AJvYcCUNwR9apewTlYjHm2I0c2zKEyHmi3ZpoGO/R2WYjgkyKGdzvwPsbbh6Vi7+TnxU0mNOn5ugX0YwsrNLGNUHUn1tpnZVne7S X-Gm-Message-State: AOJu0YySbWyURpSPXnetbQZbYS1OH+WmmvDf+9088Br17efk6BcLAGjG UhG0M22kemxGCCIWg6obIdYP59BcO/OYTj1W+HayaT+kJYe/mKb48R1e6TTJxg== X-Google-Smtp-Source: AGHT+IGb9Vokm8ewgmTpbGdKAvq7aV7ooGtD0+DopqXeXNZraD7ITMR125Q0YvgP6U/7Kbp2OJkPVQ== X-Received: by 2002:a17:902:b903:b0:1eb:144f:63b7 with SMTP id d9443c01a7336-1ef44058348mr40583795ad.56.1715373759691; Fri, 10 May 2024 13:42:39 -0700 (PDT) Received: from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bad5f0esm36589135ad.67.2024.05.10.13.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 13:42:38 -0700 (PDT) From: Ajit Khaparde To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: andrew.gospodarek@broadcom.com, michael.chan@broadcom.com, kuba@kernel.org, davem@davemloft.net, Andy Gospodarek Subject: [PATCH] pci: Add ACS quirk for Broadcom BCM5760X NIC Date: Fri, 10 May 2024 13:42:28 -0700 Message-Id: <20240510204228.73435-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The Broadcom BCM5760X NIC may be a multi-function device. While it does not advertise an ACS capability, peer-to-peer transactions are not possible between the individual functions. So it is ok to treat them as fully isolated. Add an ACS quirk for this device so the functions can be in independent IOMMU groups and attached individually to userspace applications using VFIO. Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek --- drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index eff7f5df08e2..3d8aa3f709e2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5099,6 +5099,10 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs }, /* Amazon Annapurna Labs */ { PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },