Skip to content

Commit

Permalink
scsi: vmw_pvscsi: Silence dma mapping errors
Browse files Browse the repository at this point in the history
These errors typically occur with swiotlb when the swiotlb buffer is full.
But they are transient and would typically unnecessarily worry a user.
Instead of errors, print debug messages.

Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Jim Gill <[email protected]>
Signed-off-by: Thomas Hellstrom <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
thomashvmw authored and martinkpetersen committed Dec 20, 2019
1 parent f465275 commit d8dd7d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/scsi/vmw_pvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static int pvscsi_map_buffers(struct pvscsi_adapter *adapter,
int segs = scsi_dma_map(cmd);

if (segs == -ENOMEM) {
scmd_printk(KERN_ERR, cmd,
scmd_printk(KERN_DEBUG, cmd,
"vmw_pvscsi: Failed to map cmd sglist for DMA.\n");
return -ENOMEM;
} else if (segs > 1) {
Expand All @@ -392,7 +392,7 @@ static int pvscsi_map_buffers(struct pvscsi_adapter *adapter,
ctx->dataPA = dma_map_single(&adapter->dev->dev, sg, bufflen,
cmd->sc_data_direction);
if (dma_mapping_error(&adapter->dev->dev, ctx->dataPA)) {
scmd_printk(KERN_ERR, cmd,
scmd_printk(KERN_DEBUG, cmd,
"vmw_pvscsi: Failed to map direct data buffer for DMA.\n");
return -ENOMEM;
}
Expand Down Expand Up @@ -725,7 +725,7 @@ static int pvscsi_queue_ring(struct pvscsi_adapter *adapter,
cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE,
DMA_FROM_DEVICE);
if (dma_mapping_error(&adapter->dev->dev, ctx->sensePA)) {
scmd_printk(KERN_ERR, cmd,
scmd_printk(KERN_DEBUG, cmd,
"vmw_pvscsi: Failed to map sense buffer for DMA.\n");
ctx->sensePA = 0;
return -ENOMEM;
Expand Down

0 comments on commit d8dd7d7

Please sign in to comment.