From patchwork Fri Oct 28 09:16:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 619783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12780FA3741 for ; Fri, 28 Oct 2022 09:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiJ1JC4 (ORCPT ); Fri, 28 Oct 2022 05:02:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbiJ1JCw (ORCPT ); Fri, 28 Oct 2022 05:02:52 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE7831C5E2B for ; Fri, 28 Oct 2022 02:02:48 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id p3so4318730pld.10 for ; Fri, 28 Oct 2022 02:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ZAiJB9MKZCWn+RLBDfGT3Gbi18FcAmS7PVrHp03tcUw=; b=RcBaNav0qBw0+VAxIQiJPlmKDX0rk4QkVI9IsZDD/pVSgI8wIzoXXa+ery0/61tHSN 9wHg8OH+WQ2XDPtA3IgyX+PG/CqXkMux2DapG7eRxcFJNK8iixA/VkT4OWOC4IAwxA78 eSLsitGdLP7ygfOG66FMKMGvt2NofPCzifkW0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=ZAiJB9MKZCWn+RLBDfGT3Gbi18FcAmS7PVrHp03tcUw=; b=mGs23Xx2O91R8kbDj0RODvbDukzQUvW/n5FjZSxvEQWDRn4C6akkouy7mZGsqFNgYs 1Jqbc12xBxTtt0xs7W6Q0P7b155xinu5IMg2J66//ggxpa1jIAwpedazJ13UidYmiIUQ dNZEb/BL/WD49ysYS0FT7B39Ad/bS5+cA3qgJbAAaY7CCVJmkXoNASgOe3ygCUj2mTyf gRHJykOS0RK+AG/5s0nSywdKGJ7H54esfZ5L+T8pVVSGCQiBXN0nJqhB2w1C2B2veW04 slKWTHR00vVnr+ppaoTtVNc48TLuCOCjdmYbBhAJcgTtqbW6lBw7ySbZa4sskChnYBoE vhgA== X-Gm-Message-State: ACrzQf36yiCopoxv4Hle0KmSrs6FkWw8l2UcTy/NRUaSyEuGwmvxBxNx NyjMq0kkDXCs7TepHW3wgBTtuz1TjzD74jRzEuhPCZgTEWY0BW8LXPR3d0Qjibxb4QDvyUyxiBy Qpipn/X2g/ejY47FIu2Ub6+Jx+rsQpOPDM3KLMS8pDnOcCHlNsrBJR2kQVqZokMQNoGDKgWegjr tf+a9OJjm4 X-Google-Smtp-Source: AMsMyM7TWiryZir443KG8SCMTLIeEiNfwrhy9/Ja1KJceM4koWkHHz1ApqHrMHn7o6tZ6MWjdtedCA== X-Received: by 2002:a17:90b:1c02:b0:213:17f1:50a7 with SMTP id oc2-20020a17090b1c0200b0021317f150a7mr14766128pjb.138.1666947767661; Fri, 28 Oct 2022 02:02:47 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id a207-20020a621ad8000000b0056bd737fdf3sm2414077pfa.123.2022.10.28.02.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 02:02:47 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy Subject: [PATCH 1/1] mpt3sas: Remove usage of dma_get_required_mask api Date: Fri, 28 Oct 2022 14:46:55 +0530 Message-Id: <20221028091655.17741-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221028091655.17741-1-sreekanth.reddy@broadcom.com> References: <20221028091655.17741-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Remove the usage of dma_get_required_mask() API. Directly set the DMA mask to 63/64 if the system is a 64bit machine. Signed-off-by: Sreekanth Reddy Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 4e981ccaac41..69061545d9d2 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2992,8 +2992,7 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) struct sysinfo s; u64 coherent_dma_mask, dma_mask; - if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 || - dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32)) { + if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4) { ioc->dma_mask = 32; coherent_dma_mask = dma_mask = DMA_BIT_MASK(32); /* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */