]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: mpt3sas: Remove scsi_dma_map() error messages
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Thu, 3 Mar 2022 14:02:03 +0000 (19:32 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Mar 2022 03:34:46 +0000 (22:34 -0500)
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.

Link: https://lore.kernel.org/r/20220303140203.12642-1-sreekanth.reddy@broadcom.com
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c

index 511726f92d9a5b768a748d5cc92b48b76b581bda..ebb61b47dc2f0f415ed862708449e66ea58b5796 100644 (file)
@@ -2593,12 +2593,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,
@@ -2705,12 +2701,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;
@@ -2853,12 +2845,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 -