From patchwork Sun Oct 14 15:59:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10640719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D4B213AD for ; Sun, 14 Oct 2018 16:00:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A1DB29E19 for ; Sun, 14 Oct 2018 16:00:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E46829E29; Sun, 14 Oct 2018 16:00:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B17EB29E19 for ; Sun, 14 Oct 2018 16:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727623AbeJNXmY (ORCPT ); Sun, 14 Oct 2018 19:42:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46978 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbeJNXmY (ORCPT ); Sun, 14 Oct 2018 19:42:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/zq34sgiSN7e6W/te4huL7SuMUtxa7VDIpiDF/nhyJQ=; b=ZTORzqgsgISsmphZs/H7R1DPi oSdfq7IBBNtoFlcXK96mbXTRlRIApnSjgnPhHPDyb7Ql5nZ+LEw9y+DNxk0evwBA1clE94BuI8XFD h+N4N4yEDhMekPaITutvVCfnScgA3H8HXPpYy/P3jYiU0JDApPy4e+W2jeShPpebYdI8efedne6qe NE/9/hzoZlVMp1r/kCItqXvu4UOtCNzlCb0/bgaSKzfqgcYcyHVzOjY0HWQLUOKX6MHOCU1tC6NAh 6gia5D7BDyTaiSCNGmGwjFvwtkfWZNWCeskqZeE/MKOxpLjHDW+4u5iIangi7lchcW+7sakt8AIrR NLdtvjQ+A==; Received: from 089144199123.atnat0008.highway.a1.net ([89.144.199.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBip5-00031o-VC for linux-scsi@vger.kernel.org; Sun, 14 Oct 2018 16:00:56 +0000 From: Christoph Hellwig To: linux-scsi@vger.kernel.org Subject: [PATCH 19/28] qedf: fully convert to the generic DMA API Date: Sun, 14 Oct 2018 17:59:53 +0200 Message-Id: <20181014160002.8383-20-hch@lst.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181014160002.8383-1-hch@lst.de> References: <20181014160002.8383-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 0a5dd5595dd3..d5a4f17fce51 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2855,12 +2855,12 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf) QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n", qedf->num_queues); - qedf->p_cpuq = pci_alloc_consistent(qedf->pdev, + qedf->p_cpuq = dma_alloc_coherent(&qedf->pdev->dev, qedf->num_queues * sizeof(struct qedf_glbl_q_params), - &qedf->hw_p_cpuq); + &qedf->hw_p_cpuq, GFP_KERNEL); if (!qedf->p_cpuq) { - QEDF_ERR(&(qedf->dbg_ctx), "pci_alloc_consistent failed.\n"); + QEDF_ERR(&(qedf->dbg_ctx), "dma_alloc_coherent failed.\n"); return 1; } @@ -2929,7 +2929,7 @@ static void qedf_free_fcoe_pf_param(struct qedf_ctx *qedf) if (qedf->p_cpuq) { size = qedf->num_queues * sizeof(struct qedf_glbl_q_params); - pci_free_consistent(qedf->pdev, size, qedf->p_cpuq, + dma_free_coherent(&qedf->pdev->dev, size, qedf->p_cpuq, qedf->hw_p_cpuq); }