linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata-eh: Add a simple mechanism for silencing error reporting
@ 2007-02-05 16:11 Alan
  2007-02-05 17:29 ` Tejun Heo
  2007-02-23 10:27 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Alan @ 2007-02-05 16:11 UTC (permalink / raw)
  To: jeff, linux-ide, htejun

We want to be able to issue commands that fail silently some of the time
(set_features/xfer rate to CF 1.4 devices, perhaps some others such as
user SG_IO commands ought to be silent too as the error is for the app)

This is a minimal implementation, we can extend it so the QUIET flag
isn't quiet about errors that are not command errors but indicate
infrastructre problems (CRC errors, HSM violation, DeviceFault) if need
be.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.20-rc6-mm3/drivers/ata/libata-eh.c linux-2.6.20-rc6-mm3/drivers/ata/libata-eh.c
--- linux.vanilla-2.6.20-rc6-mm3/drivers/ata/libata-eh.c	2007-01-31 14:20:39.000000000 +0000
+++ linux-2.6.20-rc6-mm3/drivers/ata/libata-eh.c	2007-01-31 14:27:25.000000000 +0000
@@ -1407,6 +1407,8 @@
 			continue;
 		if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask)
 			continue;
+		if (qc->tf.flags & ATA_TFLAG_QUIET)
+			continue;
 
 		nr_failed++;
 	}
@@ -1446,6 +1448,8 @@
 
 		if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask)
 			continue;
+		if (qc->tf.flags & ATA_TFLAG_QUIET)
+			continue;
 
 		ata_dev_printk(qc->dev, KERN_ERR,
 			"cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x "
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.20-rc6-mm3/include/linux/ata.h linux-2.6.20-rc6-mm3/include/linux/ata.h
--- linux.vanilla-2.6.20-rc6-mm3/include/linux/ata.h	2007-01-31 14:20:43.000000000 +0000
+++ linux-2.6.20-rc6-mm3/include/linux/ata.h	2007-02-05 10:53:45.000000000 +0000
@@ -232,6 +232,7 @@
 	ATA_TFLAG_LBA		= (1 << 4), /* enable LBA */
 	ATA_TFLAG_FUA		= (1 << 5), /* enable FUA */
 	ATA_TFLAG_POLLING	= (1 << 6), /* set nIEN to 1 and use polling */
+	ATA_TFLAG_QUIET		= (1 << 7), /* don't log rejection */
 };
 
 enum ata_tf_protocols {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-23 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-05 16:11 [PATCH] libata-eh: Add a simple mechanism for silencing error reporting Alan
2007-02-05 17:29 ` Tejun Heo
2007-02-23 10:27 ` Jeff Garzik
2007-02-23 12:10   ` Alan

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).