From nobody Thu Oct 31 00:23:47 2024 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 2DB111BB6A4 for ; Thu, 1 Aug 2024 17:46:34 +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=1722534397; cv=none; b=aeWiFXmtjuCxUyzWxIXg1BE+PjGES5WaxC3eJ6iKMNiiCzgu7vUO95TLOabetHN7qwi1SDZvHPS5tgEQk121FhmGOSXq/pWekMBVtTZW0Ir6I4g4bOMEyLOf2FYTR1WO2N9tEH2ERsIhM0UR/lCQj+XoEWpshncgVR/KuWHApwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534397; c=relaxed/simple; bh=o+aKZkNhYSkxjsiBLxN92YZQoCjUKOLuz8fa+WUkC9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UoPjZ/zPTmLpRUJhARKKKH5sVqfmjQX+AAWcqVBop1enjlsqBs3tb8H3pHLG/Z2SdDJhWdpyTAZ9j6Kq0XT3t8jZCeAUJyUhtXdxw3oX9A76ogf9it/gL8qzp0oDAQDFlOR1nPXxY9WiuxzeWNnhvpoJOEQ2R8CQ+NzakD7J2r4= 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=DuthcMv2; 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="DuthcMv2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534394; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=DuthcMv2diw/4RrRp18hw2UtshzMmUUZKJRS4Izd/U2i7VgRFHpvE1U2ygeYNDuyif2NA2 GmrZ/moKk/FDIbGgb2NxMxxUBkNXI7TVZ6XywdWEDx45mIEC0I6SFIY4tIy3uS/ZJtDBWx PhsNN2DuDMWjw58ImAkutcRyGMmHG6E= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-qXnRntCIMHWOsXgD_kuxvQ-1; Thu, 01 Aug 2024 13:46:32 -0400 X-MC-Unique: qXnRntCIMHWOsXgD_kuxvQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a138001115so1213405a12.1 for ; Thu, 01 Aug 2024 10:46:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534392; x=1723139192; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=YYJrQ5qhQkdIbFe55B07JRTzDODOXXqGMa6Q9AY1cCtBEghtE8o+MT68yzSMrZ1lY0 TcEcmDDDn6n0+GBh049VRDuo/vcncL+NDpmPXU4Ml0Ibi3JEO7XxP8PBoowjYla3t3K7 lWjnAv5qJLudo/2FMd0NcK4WX6agyKE91E6axKAAw0MMdvwp5y+2PeoWfE3lZ/17veyD xh/tR+ThDOaQ+Zhov0B1B47bMGccsXwFfF7YOKN/vDl9dYzDG04Kyx947dXAxrE1XLwG 345r/RTnsbW3mxbk3CqMxzB4y99UuhaqTJotga3lANkW6F5ATXY75W6HW/EE9qlHpNV1 MjmQ== X-Forwarded-Encrypted: i=1; AJvYcCVbZmSMagaChwk8KwYaxIs8kWjhzA3cGkskuCk243wZy65E5fKgy+RPpRHWWhrbaLmVtDVL5vsjvOS00qL9BRAWhO7pdF7/PxFrcwbX X-Gm-Message-State: AOJu0YyKtMI/BfXAf0oAe0lRI4qWuywUrmzEZRiAHPENaLynuvDjnSqi 9tvN9+p+ogT6HmcuEAAITxqblME0tQxI1MuWr2Zw/5uSUN7D5zLzo/lxMNQRv95k85Duct/LKcC DQZ98w6ODIzmUgPrFJZmMmoNjZS3iFYLzU13T6ZzMrV98dDpVrzqZoMjT7xDK7w== X-Received: by 2002:a17:906:6a0f:b0:a7a:a763:842a with SMTP id a640c23a62f3a-a7dc50f5614mr45527866b.8.1722534391582; Thu, 01 Aug 2024 10:46:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmzEu7dmyX2RheGzSMkNqLion2YjN8vIisbzR9uosnyxCtAfZgr0MeS740wdZ5Lp8eu4Gr9Q== X-Received: by 2002:a17:906:6a0f:b0:a7a:a763:842a with SMTP id a640c23a62f3a-a7dc50f5614mr45526166b.8.1722534391188; Thu, 01 Aug 2024 10:46:31 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:30 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:01 +0200 Message-ID: <20240801174608.50592-4-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 --- 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 2a3598409eeb..c9edae8fdb04 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 d26564cebdec..18d8819f1795 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.45.2