Skip to content

Commit

Permalink
Revert "scsi: mpt3sas: Remove scsi_dma_map() error messages"
Browse files Browse the repository at this point in the history
There were some doubts, that theses errors could be ignored, so don't
disable them. The next commit will add a ratelimit.

This reverts commit edad99d.
  • Loading branch information
donald authored and pmenzel committed Jul 19, 2023
1 parent 415b450 commit 6d44c56
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions drivers/scsi/mpt3sas/mpt3sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2594,8 +2594,12 @@ _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)
if (sges_left < 0) {
sdev_printk(KERN_ERR, scmd->device,
"scsi_dma_map failed: request for %d bytes!\n",
scsi_bufflen(scmd));
return 1;
}

/* Check if we need to build a native SG list. */
if (!base_is_prp_possible(ioc, pcie_device,
Expand Down Expand Up @@ -2702,8 +2706,12 @@ _base_build_sg_scmd(struct MPT3SAS_ADAPTER *ioc,

sg_scmd = scsi_sglist(scmd);
sges_left = scsi_dma_map(scmd);
if (sges_left < 0)
if (sges_left < 0) {
sdev_printk(KERN_ERR, scmd->device,
"scsi_dma_map failed: request for %d bytes!\n",
scsi_bufflen(scmd));
return -ENOMEM;
}

sg_local = &mpi_request->SGL;
sges_in_segment = ioc->max_sges_in_main_message;
Expand Down Expand Up @@ -2846,8 +2854,12 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,

sg_scmd = scsi_sglist(scmd);
sges_left = scsi_dma_map(scmd);
if (sges_left < 0)
if (sges_left < 0) {
sdev_printk(KERN_ERR, scmd->device,
"scsi_dma_map failed: request for %d bytes!\n",
scsi_bufflen(scmd));
return -ENOMEM;
}

sg_local = &mpi_request->SGL;
sges_in_segment = (ioc->request_sz -
Expand Down

0 comments on commit 6d44c56

Please sign in to comment.