From patchwork Wed Nov 13 12:41:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13873595 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF74C2036F8 for ; Wed, 13 Nov 2024 12:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731501765; cv=none; b=Fo/EgYzSp6aD4aFFIrlvWFZtcT5V8xZi6F1mSKbiEEFdIFDFzmRj8le1H4UtfUM+NpwJ6XT/YPsTMC1Ddca5hxz/pT2q6fSIYP7KL/GHoCYRs3vig5/dxPVlQFXI/HSP+GAbEtSR3cLWQ45Ea+2RXdoAgXzbJKb7Rd0qeL3rUJI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731501765; c=relaxed/simple; bh=FwPT6FGBHOp4TzyWZ+h6yZzXXEFY9IxzClXNmK7SQw8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fUvLOmOO7C8pFVU6i0LMflJKhiPGSJRvxUkSWRqK5VuVaZ4p0ntgS+wUUtZ2sYq6HtAO4nf/ABcN6yORsr12ujXy78B1vpOuKzCMB0U8CdvKlMMb0WX1g1uULNCdI3UT9kzOxIwXiDXkZOXbqdTRFll+Wv3qQlDr7mQENWaERBI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JUBUb2sJ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JUBUb2sJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731501762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gh5xBESPiuO8YtWqrs+YzUNc8fkB81YlCR9KwN+kONI=; b=JUBUb2sJ6lmLtjD2P+zpgM/hMKmQgPxZ4LkmPmnHXriC5evhoMxhguZvZCUSzt5LXTBkMV kxS0VS4tADjKCdYYzfzQjpg3kd1zAcYOQvrFl2xFPXEMciBavlInIrQ5SfxS5+wkxzRi1D xCrriWhrIBToFTdElOFVSdjBfCPDOSI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-r3bGFzr_OYSrKeeQK-b9GQ-1; Wed, 13 Nov 2024 07:42:40 -0500 X-MC-Unique: r3bGFzr_OYSrKeeQK-b9GQ-1 X-Mimecast-MFC-AGG-ID: r3bGFzr_OYSrKeeQK-b9GQ Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-381d0582ad3so5343674f8f.0 for ; Wed, 13 Nov 2024 04:42:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731501759; x=1732106559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gh5xBESPiuO8YtWqrs+YzUNc8fkB81YlCR9KwN+kONI=; b=Hy0FKu3Fr3qlnXf659SKEIiSdPghs4FyBtlae/mp8t4bAJvrvNmaUCYgG+tlKrpIOz +fkfh3882xM7boUhZUCkN5xQ7eCo87KfCYtcvV1RY+HvjWFxfgPBK8CUBc0Cqfms4hxT D46qcViFt3c3QNwWPAvBd425LvusRFVLyddJoAZqynk/JPFL5mi5KwdzAVG4GzIFzA14 n/35j9zRHey81bO5PH7KjUDGoNhUjcE/Qe4LwTOruKlg+EFiEOsZ8G5u1Mzeu7U2dA5z Nsx28aigVt3VUY3rmAo+96zVXyJd5TPen/hJC1/GhkCtZy8f+ZZAlfCDoEM1jZ/maDzk ZIFg== X-Forwarded-Encrypted: i=1; AJvYcCW+WVkdI6yjJA7lTOrscwo8oKriPMY4wbMlBAJ9TYT/tX2q7oXdaSmAn1RHKo9q3hWvae1vLWw=@vger.kernel.org X-Gm-Message-State: AOJu0YzEMEftHvOLv/WmdHm2jGpvNixuBeuLczDHpPktpRGxWZZFAiAI EPmObj4q2I3elJ6UtlsKqDxkIYbqqIZhmjTfGcmiZxGsdUrGhJamrGgNi2ZS8EjvRG002hVP313 dlgdcDZk+uNvnhxdEzoImxa8hW41BY1np4EK3hUh5yCOBNE0OrjaAiQ== X-Received: by 2002:a05:6000:1868:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-381f1871ae1mr21127465f8f.25.1731501759546; Wed, 13 Nov 2024 04:42:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjSkicOa2vHaglKeMl2d4NOiMMxDq6ITRAVtvhVhWcLJvAFiM/FAEZ/6qNVryGFEz3sYUTmQ== X-Received: by 2002:a05:6000:1868:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-381f1871ae1mr21127442f8f.25.1731501759149; Wed, 13 Nov 2024 04:42:39 -0800 (PST) Received: from eisenberg.redhat.com (nat-pool-muc-u.redhat.com. [149.14.88.27]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed99aa18sm18023528f8f.61.2024.11.13.04.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 04:42:38 -0800 (PST) From: Philipp Stanner To: Damien Le Moal , Niklas Cassel , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Philipp Stanner , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , Mostafa Saleh , Andy Shevchenko , Jason Gunthorpe , Yi Liu , Kunwu Chan , Ankit Agrawal , Christian Brauner , Reinette Chatre , Eric Auger , Ye Bin Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [PATCH v2 04/11] net/ntb: Use never-managed version of pci_intx() Date: Wed, 13 Nov 2024 13:41:52 +0100 Message-ID: <20241113124158.22863-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113124158.22863-2-pstanner@redhat.com> References: <20241113124158.22863-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. hw/amd and how/intel enable their PCI-Device with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Signed-off-by: Philipp Stanner Acked-by: Shyam Sundar S K #for ntb_hw_amd.c Acked-by: Dave Jiang # for ntb_hw_gen1.c --- drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ++-- drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c index d687e8c2cc78..b146f170e839 100644 --- a/drivers/ntb/hw/amd/ntb_hw_amd.c +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c @@ -791,7 +791,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev, err_msi_enable: /* Try to set up intx irq */ - pci_intx(pdev, 1); + pci_intx_unmanaged(pdev, 1); rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED, "ndev_irq_isr", ndev); @@ -831,7 +831,7 @@ static void ndev_deinit_isr(struct amd_ntb_dev *ndev) if (pci_dev_msi_enabled(pdev)) pci_disable_msi(pdev); else - pci_intx(pdev, 0); + pci_intx_unmanaged(pdev, 0); } } diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c index 079b8cd79785..9ad9d7fe227e 100644 --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c @@ -445,7 +445,7 @@ int ndev_init_isr(struct intel_ntb_dev *ndev, /* Try to set up intx irq */ - pci_intx(pdev, 1); + pci_intx_unmanaged(pdev, 1); rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED, "ndev_irq_isr", ndev);