From patchwork Thu Mar 18 09:11:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 12147637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_NO_TEXT,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB068C433E0 for ; Thu, 18 Mar 2021 09:13:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9D5464F33 for ; Thu, 18 Mar 2021 09:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbhCRJMZ (ORCPT ); Thu, 18 Mar 2021 05:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhCRJMF (ORCPT ); Thu, 18 Mar 2021 05:12:05 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3D7CC06174A for ; Thu, 18 Mar 2021 02:12:05 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id o2so969757plg.1 for ; Thu, 18 Mar 2021 02:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=5LMLMVJmPnO72BFPKwLMdAGyE5oeNq+0s3LDkmWCmjk=; b=PUTj4K1DBDlRUdf3FmykkmMLvVGlof4VdUP8o3AAmVEpA68wVyObVzoS0L6TWiYcq9 uRES2LO4Pchxepb39P1Q9p3rTFSGCED6kWJ2N25qEGh9GnSnIvzvXL5pSg3tXPpic8p/ YF5TwQ0VsCP2jHdVj+uLzTi9cexpGUvRUcjqA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=5LMLMVJmPnO72BFPKwLMdAGyE5oeNq+0s3LDkmWCmjk=; b=HySbOwm2X1rwg9WW6eFC8hDScG/3pVqLhtTDcxRpFVZs3akk/e1QBdKPF0cchrqCov LC2RmQMoKdiYdm1Hz503uSri4surZJKcLv1qSScWNxj80Uda9328AsRkbTrTwLAftGjY bg+gBQwLIxg/wMWrl83NFCz9QsDyKsBE7JzC8ha44hMIrbPQjsiF3djvppbLfZ4ET412 6HWNxVjAoLuKcXwGT/b1Skec+WYeUSGWD+8QFVNH+1D2V3vCBtkiGP8yjHLjFX7mPH+h z3Lo82C0KyJfSfnPLubfln8TRn8T+y6pAfssrQNrKDYv/jqF4enEOS61aTCeFPoVf/Lz 8Liw== X-Gm-Message-State: AOAM5320ZoCnx+N3UDzB3xmSBhZVBrABnia6wv/aUVV/d4H8YwgTs3ch SPT5bRFTmd9GbgFPcCeF6Oj5jZHmuFgVo1PmIzWv8V8XezVuf4v8TvZlgb/8YeHzGV5TFM/E13C vSYsm5486QCQNNJtNiiGJuajcuFA48JIqvGqF2nxyslZQEB7zuIkZNlNy0XsdWBtY9jCipO4l6Z RuREQLmX6IB8+rD55QGja+ X-Google-Smtp-Source: ABdhPJwHLrSjWlZ0uPF+rhQLRmdDve3fFYRaCxYNkh/jKMn3nr7iADTUqWeCnhKpPMHp4S2Mghhh3w== X-Received: by 2002:a17:90a:e298:: with SMTP id d24mr3260550pjz.171.1616058724454; Thu, 18 Mar 2021 02:12:04 -0700 (PDT) Received: from dhcp-10-123-20-76.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 11sm1413350pgt.83.2021.03.18.02.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 02:12:03 -0700 (PDT) From: Suganath Prabu S To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S Subject: [PATCH 0/7] Handle DMA allocations in same 4G region. Date: Thu, 18 Mar 2021 14:41:44 +0530 Message-Id: <20210318091151.39349-1-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org According to MPI Specification PCIe SGL, Sense pool, Chain pool, reply pool, reply post pool & reply post array buffers should not cross 4GB boundary. So while allocating these buffers, if any of these pool buffer crosses the 4GB boundary then, * Release the already allocated memory pools and * Reallocate them by changing the DMA coherent mask to 32 bit. Patch V2: Fixed inconsistent indenting warning in patch 0002 Suganath Prabu S (7): mpt3sas: Handle PCIe sgl's in same 4G region. mpt3sas: Handle chain buffer DMA allocations in same 4G region mpt3sas: Handle sense buffer DMA allocations in same 4G region mpt3sas: Handle reply pool DMA allocations in same 4G region mpt3sas: Handle Reply post queue DMA allocations in same 4G region mpt3sas: Handle reply post array DMA allocations in same 4G region mpt3sas : Update driver version to 37.101.00.00 drivers/scsi/mpt3sas/mpt3sas_base.c | 503 ++++++++++++++++++---------- drivers/scsi/mpt3sas/mpt3sas_base.h | 5 +- 2 files changed, 332 insertions(+), 176 deletions(-)