From patchwork Mon Aug 5 08:01:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753219 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 83C401547E9 for ; Mon, 5 Aug 2024 08:02:15 +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=1722844937; cv=none; b=KwkQPaQ1nFGkxP32y/SHEvy2bmj+D14fAxjW3TvPaWf1w0VkoMEWGwCzfzy6OmdWZ0qXOwtCNV4hjVMOwCt/vT8b3DOKLsaA1CvcFrynEuoH4rcwianEqZOAwm4kTq4xLt2nzQJnQ8FcqVG93tomKWCXtwp0lPZSdVc7gbI8uy0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844937; c=relaxed/simple; bh=o+aKZkNhYSkxjsiBLxN92YZQoCjUKOLuz8fa+WUkC9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e/wXmk3kWvu6apL6wThQ8q0Csgdt5SJTBE8jfakJBgC63USsQy5mydQ1fQsBDQOR7npLREIYky36RwcHXbFGVHsXJ0qAeNa/G+byHmloPf9Jm5jB3/O25muqUZNnq1VZlgE4AoU3i+9pYpd0RUL6t7DwfeAzP78NFIlO4kYYkrY= 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=bBvFrqMc; 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="bBvFrqMc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=bBvFrqMcGGy/9R8wrhyxCdwIcIa1enqVHQOigZ0/ddxMB7UNY1MoDOXMeMfZvcYy7u13Tt 5R52Kym+Rm3QVgPMSnmmlzezHGKTAU7xOgBvC7H11JB+EmIymO1N7q7kwOa4wsWmmNfkb2 8T6JJGhewws32rrNlSr+/No7ethWtA8= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-547-DbYtUI4JMEq1q-wVQzhJlw-1; Mon, 05 Aug 2024 04:02:11 -0400 X-MC-Unique: DbYtUI4JMEq1q-wVQzhJlw-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f89aa7019so1007860e87.2 for ; Mon, 05 Aug 2024 01:02:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844929; x=1723449729; 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=TgvxrXLEjiV8PrFDlwikrhd456LbEdviok8gHr82FXONw14wrEOhnLMTIs+o3CWK09 InIGjhcBCp2RZrfghtBI1CqiNm2bvJDCtRDSkNCqUpeaJz3kW80NTOkbjPT8Y+qeAS10 kLz/LMlCwXPdAtStrUZWz2gBzET4hqOpg2i6z3afJMY3L0A5q/LEQOYa2z0jC3I+J0ep KX3oC2yqxYJFEt3oRHlK+RJK97y947UGDTXz+3nb83bR+5e7r/aKW5kV7mopo2eLOfsi cknE6dlZjXC0gaNUzM1k5F9lelk+fLNjYJgLGYIQB/W+pgq9Ma0jvZQuBalHJW9bA91I rKSw== X-Forwarded-Encrypted: i=1; AJvYcCUmkLgbz20vTFCIxEx6x6/2FMdOemUhnbkoEtE9DiWYGFzp5UWCeaoYmBM5ROt5g7gDc72cfCKcSzGqMA==@vger.kernel.org X-Gm-Message-State: AOJu0Yx6oW8bJcWJFjifI+pNYLwm6+K2zLfcwg4b5OouHbwShOgNnR0P EB/MHIbWNqybHLCo9TnrCkm36Cnt/L0upxzKuh56lKdQtcSiwSaVqX8qYi880o0WtTsaZOJeGr3 izbZe2slV9YeWuEKxRwKhehuevs6Lpq2yhr1x0npSwXHpult0o1fzi3YObh6z X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610706e87.3.1722844929280; Mon, 05 Aug 2024 01:02:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZSQjMt/3VkbWFUtV5g6ia/+URDLy3tOpCumDaNeyTb8b7/S19GgTcmw6UBXa+EC6uh4peLA== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610684e87.3.1722844928639; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:08 -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_Kleine-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_J=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 v2 03/10] crypto: qat - replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:30 +0200 Message-ID: <20240805080150.9739-5-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = 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; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev); diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c b/drivers/crypto/intel/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 struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = 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; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev);