linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] mptscsih: Set DRIVER_SENSE when sense data present
@ 2012-05-20 14:32 Josh Hunt
  0 siblings, 0 replies; only message in thread
From: Josh Hunt @ 2012-05-20 14:32 UTC (permalink / raw)
  To: Eric.Moore, support, DL-MPTFusionLinux, linux-scsi
  Cc: linux-kernel, Josh Hunt

While looking into some drive errors on a few of our systems I noticed that
DRIVER_SENSE was not being set by mptscsih even though there was sense data
present. DRIVER_SENSE does eventually get set by scsi_finish_command() when
it detects the sense data. I won't pretend I'm an expert in this area, I'm
just looking for an explanation as to why the patch below or something like
it is not currently in the driver? Is it sufficient enough that we're detecting
this case later on in the scsi code?

Thanks
Josh

---

Currently when sense data is present only check condition is set. This
sets DRIVER_SENSE as well.

Signed-off-by: Josh Hunt <johunt@akamai.com>
---
 drivers/message/fusion/mptscsih.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 0c3ced7..3ccf5cf 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -889,6 +889,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 			} else if (scsi_state &
 			    MPI_SCSI_STATE_AUTOSENSE_VALID) {
 
+				sc->result |= (DRIVER_SENSE << 24);
+
 				/*
 				 * For potential trouble on LSI53C1030.
 				 * (date:2007.xx.)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-20 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 14:32 [RFC/PATCH] mptscsih: Set DRIVER_SENSE when sense data present Josh Hunt

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