From nobody Mon Nov 25 18:23:36 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 62749166F23 for ; Fri, 25 Oct 2024 15:00:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868450; cv=none; b=ZYnc2q+q+8Esp7lmbAVE+lenuEUIKOGaC0cryXuvkOr5ZgG6pgaNLuMogit7cYO/o9rPolpx7PHN4OCxJW1WBei48Kk5+Ia4c14PJT2aNfTOOU+wr0Z7H64sH7uP74GtVu4tqn/+V/1TlVUSUrv9T33bkOzF8z7QnwWNVx8Xcss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868450; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=baEkGvho+XjQHDjNQg7RVvjxnbXIvqgIe2z/8/cDkGlPJZpzSb0A9JwpyANIfIGUeo+xkRkLhNYfuIOAmrVg40ptWbTBNqUa/7ellbJpY3UNJ1qR7z92PTrrOW19tkLYBDk3IOoyNQty9P4iRxpfsI9lN10LkQowYgZOmrfUSXQ= 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=KA6neiaP; arc=none smtp.client-ip=170.10.133.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="KA6neiaP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868444; 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=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=KA6neiaPBqnoRKFTAcRAYcFH+6JOEEpN0zwJqx1xLw13CwhzwHGwkYX5r5O7kggy6e6pNp ZImS6zBaS+ntVdOWu6KUcTQnWlVSD6puwTGL7vqyit3aX9Bm7LDaRuAn/F14FBMqHhOajy ZUmw5qNfkhvcFmdCtcQ0Neclq01aa7k= 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-54-XTJwOMmyOCGeMMpDql2rxw-1; Fri, 25 Oct 2024 11:00:43 -0400 X-MC-Unique: XTJwOMmyOCGeMMpDql2rxw-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d5116f0a6so1025064f8f.0 for ; Fri, 25 Oct 2024 08:00:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868442; x=1730473242; 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=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=GshWkM/1Hvqso47s1GO2QH/fDGuKy3p8JIVORWRN9bxH9GWG2hiHZhGvxzuTQP0tuQ fOSAjD2WR0oBZdQdaWAYg1r5OrHkYTJcxHMbhxCUNcKpTo83PwO5wMMfve7xAColXiSD WBI8+xP4wgDL5G6Hmmgj5r0/T4i3eo45y2yvRj8zpO2bn39XmHBtENwIdgDPdUQMKOvZ ikpWz62X3RJw+73HRBKThkKASRYWR7r4t0+ZsEgCMMNR9oqJ9WDfKwE8LbhsHGby7Hp4 fKyOtLOP+5is/Wci64b2Ksm9QpVDOp2vM5nBRejxL85IKoCnTzQrGdt4hh8ydVWdC71y Xn4g== X-Forwarded-Encrypted: i=1; AJvYcCW0kmTJl4JvjTb8kzD2ZzwPTxxrcYqSbvNfXOAYr7g0HcqkzgDceEwlHU18UEUw9jG5xjeuNNZfWKbJobA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+HNDwdCjhajTlec24ytz1GyGeldkaxINduIpmKPMj8iccrc/e 1RsXHHxQn8aVSt3spnKFUuexRfPN+0NKQqpFGKp0Gy9Dj2UlWoKoP5UttyId8XKQDjIwwkpC575 L0jJN5kLQy+ZQSXTxa7eKZ2SjIR8jiR1GKGak8b4XPWrFUyqF5GVGXoXd4Nr8PA== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047611f8f.26.1729868442462; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFseA1GnH6pKk4l885xPTSVzTwbgSgavQh+OieTeQi98Ek+SEn6EQGbHopZP84s8uTkOnT8ug== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047433f8f.26.1729868440625; Fri, 25 Oct 2024 08:00:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:40 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= 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 03/10] crypto: qat - replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:46 +0200 Message-ID: <20241025145959.185373-4-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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 11 ++++++++--- drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c b/drivers/crypto/= intel/qat/qat_420xx/adf_drv.c index f49818a13013..788a11cdb34b 100644 --- a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c @@ -129,16 +129,21 @@ static int adf_probe(struct pci_dev *pdev, const stru= ct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask =3D pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; =20 - ret =3D pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret =3D pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } =20 i =3D 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar =3D &accel_pci_dev->pci_bars[i++]; - bar->virt_addr =3D pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr =3D pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret =3D -ENOMEM; + goto out_err; + } } =20 pci_set_master(pdev); diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c b/drivers/crypto/i= ntel/qat/qat_4xxx/adf_drv.c index 659905e45950..115eabfd1f6b 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c @@ -131,16 +131,21 @@ static int adf_probe(struct pci_dev *pdev, const stru= ct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask =3D pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; =20 - ret =3D pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret =3D pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } =20 i =3D 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar =3D &accel_pci_dev->pci_bars[i++]; - bar->virt_addr =3D pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr =3D pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret =3D -ENOMEM; + goto out_err; + } } =20 pci_set_master(pdev); --=20 2.47.0