Message ID | 20241025145959.185373-8-pstanner@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-pci+bounces-15324-incoming=patchwork.ozlabs.org@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LOywyQZ1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=linux-pci+bounces-15324-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XZmJr2HtVz1xtp for <incoming@patchwork.ozlabs.org>; Sat, 26 Oct 2024 02:04:12 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EC6F4B219B4 for <incoming@patchwork.ozlabs.org>; Fri, 25 Oct 2024 15:04:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E72E231CBE; Fri, 25 Oct 2024 15:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LOywyQZ1" X-Original-To: linux-pci@vger.kernel.org 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 6B16920F3D1 for <linux-pci@vger.kernel.org>; Fri, 25 Oct 2024 15:00:56 +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=1729868460; cv=none; b=RbbL3NM1TWPSMsbSDE8P9R/cua+6ccmkxfxHj/BALSF/XXJ1kPVMQA6JAMydrRLkv7xWMAp2hM471o/ok5skshi6U4eS+2lX1tii8DcVFnw0YZIx44eP1JJa6beyuHLk4CAkNGw8dwRe9rBk8Y4EFc8xfKTP+QCpAijwuhxmBVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868460; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lDZs7RPfeuYfSVucZ+IarpfezSyvRd2ptiQ9vgL3+NHCo9rxE4SgDCNefw7VPKw5iM5NaBJ/6BJet+31m+zFEPHOtcWE/zOoKhTWcNswMTLxzC1Rr90Nwapsjsrae+E5SZB1SQ80EGZh6t5yDlsURykOlPMLtfnlTsPIQo4npRc= 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=LOywyQZ1; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868455; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=LOywyQZ1sD4gDPE2dQBZ7Hi30IQfsoQ+F/soThyYusPA8sIZvwr5JF10FFM+rieUBKK2i6 af4L3ssHSAvOzZfEuQJAl4ge+ulXwFLsB8XRug0L5HsPw8xvlbXLffAfUrh2oBD6RBDpRQ AoGxFE/YAuUd2tvwXSr3bwlkLEARtqg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-351-zWVJpcUPP3Cqi7jjNDbwUg-1; Fri, 25 Oct 2024 11:00:54 -0400 X-MC-Unique: zWVJpcUPP3Cqi7jjNDbwUg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43159c07193so20002885e9.0 for <linux-pci@vger.kernel.org>; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868453; x=1730473253; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=jQbsv+dqycGtrQfJp3uH6FB4FwB1LDVA95sLiROhrdM9aDX9bEP5WwThoztqdT10I0 moHO2Cdw+7MWV7MiYs3rLtPJaKWKdg9anGYW94qh5Emqmi2JkG3RsxO0NaDXhWpyid6N FFMvqyZXZuhL1WUY3JfOHvMs0M2Uz4yJJgzJb7vxlqYcY4cwP46FjF1gHMFhREmwoKNv e/3EbpBoZdmhMZk3Z3uOyKncwNdXk1A1fz9mopbNvnSf1n4GfLsCdlwQtt/tqGdxvSX0 8fBp384LGCmGsU4ur2HPTaMnjfJ/yg1AYpziiIT88YlgfgCrKy+07VPFnpShJa7xa64z 8gZg== X-Forwarded-Encrypted: i=1; AJvYcCUHEMESPJZWUo7Xa3STSpaQ06SCjKxBhs3Mui2iuBEd5pqddCQgF7iIprpdAOeo94diOAcu5hAza+E=@vger.kernel.org X-Gm-Message-State: AOJu0Yxok7LFdF62yC5zHu1+q70l6aM9qfXlNVubpc83G8Nttpl0MkWs NcsAkrShs5gUwaa8MhjQEqc2j7eR7B2fqs+JcBuLxNtDPScBSowEyr7jVFq0wnIeo1IQbb+pg8t VyS6+WefbHYJZv9N09LdZw5fGu0gPvt/TQPjKFjudaary121qZbQzJiTQ9g== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8040139f8f.2.1729868452188; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1JzvMg8cr6yZm3DrYA37QNNdDoszBRAqVfY9P7gwJlqkM8x7H1LKy5SQs7DHzYJeG4eaDSg== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039706f8f.2.1729868448084; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:47 -0700 (PDT) From: Philipp Stanner <pstanner@redhat.com> To: Jonathan Corbet <corbet@lwn.net>, Damien Le Moal <dlemoal@kernel.org>, Niklas Cassel <cassel@kernel.org>, Giovanni Cabiddu <giovanni.cabiddu@intel.com>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, Boris Brezillon <bbrezillon@kernel.org>, Arnaud Ebalard <arno@natisbad.org>, Srujana Challa <schalla@marvell.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Miri Korenblit <miriam.rachel.korenblit@intel.com>, Kalle Valo <kvalo@kernel.org>, Serge Semin <fancer.lancer@gmail.com>, Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>, Allen Hubbe <allenbh@gmail.com>, Bjorn Helgaas <bhelgaas@google.com>, Kevin Cernekee <cernekee@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>, David Lechner <dlechner@baylibre.com>, Philipp Stanner <pstanner@redhat.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Jie Wang <jie.wang@intel.com>, Tero Kristo <tero.kristo@linux.intel.com>, Adam Guerin <adam.guerin@intel.com>, Shashank Gupta <shashank.gupta@intel.com>, Przemek Kitszel <przemyslaw.kitszel@intel.com>, Bharat Bhushan <bbhushan2@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, Johannes Berg <johannes.berg@intel.com>, Emmanuel Grumbach <emmanuel.grumbach@intel.com>, Gregory Greenman <gregory.greenman@intel.com>, Benjamin Berg <benjamin.berg@intel.com>, Yedidya Benshimol <yedidya.ben.shimol@intel.com>, Breno Leitao <leitao@debian.org>, Florian Fainelli <florian.fainelli@broadcom.com>, =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= <ilpo.jarvinen@linux.intel.com> Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 07/10] ntb: idt: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:50 +0200 Message-ID: <20241025145959.185373-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: <linux-pci.vger.kernel.org> List-Subscribe: <mailto:linux-pci+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pci+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
Remove pcim_iomap_regions_request_all()
|
expand
|
diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c index 6fc9dfe82474..544d8a4d2af5 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c @@ -2671,15 +2671,20 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) */ pci_set_master(pdev); - /* Request all BARs resources and map BAR0 only */ - ret = pcim_iomap_regions_request_all(pdev, 1, NTB_NAME); + /* Request all BARs resources */ + ret = pcim_request_all_regions(pdev, NTB_NAME); if (ret != 0) { dev_err(&pdev->dev, "Failed to request resources\n"); goto err_clear_master; } - /* Retrieve virtual address of BAR0 - PCI configuration space */ - ndev->cfgspc = pcim_iomap_table(pdev)[0]; + /* ioremap BAR0 - PCI configuration space */ + ndev->cfgspc = pcim_iomap(pdev, 0, 0); + if (!ndev->cfgspc) { + dev_err(&pdev->dev, "Failed to ioremap BAR 0\n"); + ret = -ENOMEM; + goto err_clear_master; + } /* Put the IDT driver data pointer to the PCI-device private pointer */ pci_set_drvdata(pdev, ndev);