Skip to contentSkip to conversation

ipr: Rate limit DMA mapping errors

PATCH In review Anton Blanchard 2 participants 2 messages May 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

drivers/scsi/ipr.c +2 -1
Index: linux-powerpc/drivers/scsi/ipr.c
===================================================================
@@ -5143,7 +5143,8 @@ static int ipr_build_ioadl64(struct ipr_
 
 	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;
 	}