• James Smart's avatar
    scsi: lpfc: Fix too many sg segments spamming in kernel log · 5e0e2318
    James Smart authored
    This issue is specific to SLI-3 adapters, specifically when DIF is used.
    
    Once seen, this message floods the logs:
    9064 BLKGRD: lpfc_scsi_prep_dma_buf_s3: Too many sg segments from
      dma_map_sg
    
    The driver, upon detecting an error such as too many elements in an sglist,
    misrepresents the error by treating it as a temporary resource issue by
    returning MLQUEUE_HOST_BUSY.  In these cases, no retry will fix it and it
    should have been a hard error. The repeated retry was causing the spamming
    of the log.
    
    As for the initial reason of why an I/O encountered this issue at all is
    not clear as parameters set by the driver should have avoided this.  The
    dm multipath maintainer has been notified of the issue.
    
    Fix by changing the return code for the dma mapping routines to indicate
    cases that are not retryable and return DID_ERROR on those cases.
    Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    5e0e2318
lpfc_scsi.c 174 KB