linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: wayneb@linux.vnet.ibm.com, brking@us.ibm.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] ipr: Rate limit DMA mapping errors
Date: Mon, 9 May 2011 10:07:40 +1000	[thread overview]
Message-ID: <20110509100740.5eb8f9b5@kryten> (raw)


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: Anton Blanchard <anton@samba.org>
---

Index: linux-powerpc/drivers/scsi/ipr.c
===================================================================
--- linux-powerpc.orig/drivers/scsi/ipr.c	2011-05-03 16:35:10.304480474 +1000
+++ linux-powerpc/drivers/scsi/ipr.c	2011-05-09 10:00:41.439578385 +1000
@@ -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;
 	}
 

             reply	other threads:[~2011-05-09  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09  0:07 Anton Blanchard [this message]
2011-05-09 13:05 ` [PATCH] ipr: Rate limit DMA mapping errors Brian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110509100740.5eb8f9b5@kryten \
    --to=anton@samba.org \
    --cc=brking@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wayneb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).