Commit 51f52a47 authored by Anton Blanchard's avatar Anton Blanchard Committed by James Bottomley

[SCSI] ipr: Rate limit DMA mapping errors

I noticed a stream of errors from the IPR driver while doing
IOMMU fault injection. Rate limit the errors so we don't clog
up the console and logfiles.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Bottomley <jbottomley@parallels.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent fda38518
......@@ -5200,7 +5200,8 @@ static int ipr_build_ioadl64(struct ipr_ioa_cfg *ioa_cfg,
nseg = scsi_dma_map(scsi_cmd);
if (nseg < 0) {
dev_err(&ioa_cfg->pdev->dev, "pci_map_sg failed!\n");
if (printk_ratelimit())
dev_err(&ioa_cfg->pdev->dev, "pci_map_sg failed!\n");
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment