From patchwork Fri Mar 5 10:28:57 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: 12118305 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=-12.8 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 52CCFC4332D for ; Fri, 5 Mar 2021 10:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D00D65017 for ; Fri, 5 Mar 2021 10:30:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbhCEK3x (ORCPT ); Fri, 5 Mar 2021 05:29:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbhCEK3h (ORCPT ); Fri, 5 Mar 2021 05:29:37 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E550FC061574 for ; Fri, 5 Mar 2021 02:29:36 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id d11so1183859plo.8 for ; Fri, 05 Mar 2021 02:29:36 -0800 (PST) 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=hAMWuZLku9yQEPxZD9BV5MUIVhvt121ld1IIDoq6blw=; b=LL+pcpNOEKUFfRrJ0Pqhb4Q3kPCMskiWFTteSCE2+Ti2812qB+UuAp4uEjphNt6Cq9 JtWpCE7NKHUJpehFJpw6aWxsX9ZlA/qlRb1yFQcWm8Myd8PoOtv7sq96C0AYR/WrTVjn Juac8hiV/IAG7Ul5vHqULAfWBIeHCeyBpSC90= 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=hAMWuZLku9yQEPxZD9BV5MUIVhvt121ld1IIDoq6blw=; b=uIiWS318xXBn8HY4lXGr80pHNFNqBlNMeZ617I0ucQVeHoSv8LuhwmTKwXeWD1Adyy C7CDNNxFo3COaCZrd4psMew0Eku8WaPVcyTJ++UTfF1F160uz2P2VnSs5W2AUzLB6iyG qci9r10vvBUU9vqvnc9V36PGAGR9gyucxeudfCCQbtsZM74ots2Az6Hym5UYZYL/7ahg ybaAHeFT1qhKg/sc2RO0QGpZbHfkHOeq1NjzJLn29rIoiioJlZUJtHa2r1VuwADyuBlR XIe9Vb5pKMqkcCxT/TadvkYSDjYT1AtiWEMQUMEglAe33ap8MaRvOFbFdhydOa5/cXqv Y0xA== X-Gm-Message-State: AOAM532vzfGsKhPz965IOqeR+LJ9MUe7V0gKzVPPR0hk/ZU4vV4Oqvat auiuiD1RLXQg/GP4WiQgjNox9W2W6LB0ufXUOH58rF2GGl6QfDmUFM6FoVWshy1cp5l8qitJ8fe bzgYgjhsibHwTHnBWN5PAWF1RSyxzdoiieYm3rps/PhauQv9B5KzLabH8UbNiwD0Xbyj0kJRW9r mks9nHcowBhvXEZLQdf8iT X-Google-Smtp-Source: ABdhPJw0q4CSx4bpiMVczQAw38qux0z//K4NWIzZ19HQ34U2+zufjV3eLo8d2ghbIjGEzrz2Ig6jyQ== X-Received: by 2002:a17:902:c009:b029:e5:d01d:5bb1 with SMTP id v9-20020a170902c009b02900e5d01d5bb1mr8157435plx.28.1614940175445; Fri, 05 Mar 2021 02:29:35 -0800 (PST) Received: from dhcp-10-123-20-76.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id v15sm2015983pgl.44.2021.03.05.02.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 02:29:34 -0800 (PST) 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: Fri, 5 Mar 2021 15:58:57 +0530 Message-Id: <20210305102904.7560-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. 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(-)