From patchwork Thu Sep 29 15:53:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Reed X-Patchwork-Id: 1684542 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=YheFjDnT; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MddF55l5tz1yql for ; Fri, 30 Sep 2022 01:53:29 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1odvqk-0001eh-DE; Thu, 29 Sep 2022 15:53:22 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1odvqd-0001cc-MW for kernel-team@lists.ubuntu.com; Thu, 29 Sep 2022 15:53:15 +0000 Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 88259410D3 for ; Thu, 29 Sep 2022 15:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1664466795; bh=eh+0SzaDoT4S9TBjF/sgIzNuviKn+RJCE39y3t8kgIU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YheFjDnTkKAIwb6e5Ku010/XCXoYu+FAMZmlh46csNfisZataUD9lBG/KpimV4XKh 5JygOIZ/JELlcK219bI9DRL1y+VNwGbcAYIOWXRlfd1VNL3WPLGYkqqSNs0tWpEn30 JhH1o6eptmdd2sGd1rs3txKPWFNP00lTBRHPGVWKwDOIqdggea1iSxZ0cqbiaoQl1u zPaRSzj45m4g0LhLYX27+Y0qfR0mPabUrr4/Hn0ugAGLhSH2UqsZHx47xnSdHK+GAy GfmZEhHbeC6fjNalUHADADMD6zFUVIrXsYGR/65LmS/nzDj3BZLULS8MMrHpbXjsoe 2rnehdIF/ZwUA== Received: by mail-io1-f70.google.com with SMTP id x22-20020a6bda16000000b006a123cb02beso973718iob.18 for ; Thu, 29 Sep 2022 08:53:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=eh+0SzaDoT4S9TBjF/sgIzNuviKn+RJCE39y3t8kgIU=; b=v0F5s5l55vg1Hz2PJ57tdj4Ke/p4LWafjBw/13tOolwB//AdRjS7eTNts2RQ5P9U/f C0cG/FKoy9BwPOPMlhglsQLh1MqTba3yxI4zkvW4B5v0AXkZ7t29UEQ3L2e0Cij3DvKI I57SbwElLvFpGAAT/fWqFxCEoZVRw0iHwqPi2u+oW/anW0DirLbjLdhitzcr2umZkJKm fBz4I4RKX9qls1AwMZ1M0HiV4q/Kvj3IQ9ACEcsLBNED5ZbEJUw/y4o7MHBuG3RJG4c0 SbHDVjggV2V/3mNw1JE/w8fJ5kGGDG3IDUBlFEmJ5b38knCWCVlB/V23VsHUZWE1jUiN wnig== X-Gm-Message-State: ACrzQf1bnJAmC6n46A8mx7jf5OaXxHBr57h+hFZYRGC+xGchlbKN6Q1S 2GH35EobFA/QpumbemqIhTprWptHZ0GnKK1ozJokYFq1pXMjCZzQnbKN9izJ558oLh2ekXEUI3R z2GYdVS9l9xUnznZq3xbMGJrbgCJHBLn1O0Z582lDmw== X-Received: by 2002:a05:6638:418c:b0:35b:69fe:c6d9 with SMTP id az12-20020a056638418c00b0035b69fec6d9mr2102312jab.193.1664466794086; Thu, 29 Sep 2022 08:53:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TMlX5gtrPTNN+E1C1M5zpBtnXKc61d0DoaWEyjR6C3Nhvl5CbyRKo3vI9DmxWE0GzKlOBNw== X-Received: by 2002:a05:6638:418c:b0:35b:69fe:c6d9 with SMTP id az12-20020a056638418c00b0035b69fec6d9mr2102303jab.193.1664466793755; Thu, 29 Sep 2022 08:53:13 -0700 (PDT) Received: from localhost ([2600:1700:1d0:5e50:e87e:b353:998f:301e]) by smtp.gmail.com with ESMTPSA id x6-20020a02ac86000000b0035a75dd62afsm3135291jan.20.2022.09.29.08.53.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 08:53:13 -0700 (PDT) From: Michael Reed To: kernel-team@lists.ubuntu.com Subject: [SRU][J][PATCH 1/2] scsi: mpt3sas: Remove scsi_dma_map() error messages Date: Thu, 29 Sep 2022 10:53:07 -0500 Message-Id: <20220929155308.16481-2-michael.reed@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220929155308.16481-1-michael.reed@canonical.com> References: <20220929155308.16481-1-michael.reed@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Sreekanth Reddy When scsi_dma_map() fails by returning a sges_left value less than zero, the amount of logging produced can be extremely high. In a recent end-user environment, 1200 messages per second were being sent to the log buffer. This eventually overwhelmed the system and it stalled. These error messages are not needed. Remove them. BugLink: https://bugs.launchpad.net/bugs/1965927 Link: https://lore.kernel.org/r/20220303140203.12642-1-sreekanth.reddy@broadcom.com Suggested-by: Christoph Hellwig Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen (cherry picked from commit 0c25422d34b4726b2707d5f38560943155a91b80) Signed-off-by: Michael Reed --- drivers/scsi/mpt3sas/mpt3sas_base.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index c38e68943205..ab4dfbfbf082 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2594,12 +2594,8 @@ _base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, /* Get the SG list pointer and info. */ sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return 1; - } /* Check if we need to build a native SG list. */ if (!base_is_prp_possible(ioc, pcie_device, @@ -2706,12 +2702,8 @@ _base_build_sg_scmd(struct MPT3SAS_ADAPTER *ioc, sg_scmd = scsi_sglist(scmd); sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return -ENOMEM; - } sg_local = &mpi_request->SGL; sges_in_segment = ioc->max_sges_in_main_message; @@ -2854,12 +2846,8 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc, sg_scmd = scsi_sglist(scmd); sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return -ENOMEM; - } sg_local = &mpi_request->SGL; sges_in_segment = (ioc->request_sz -