linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] mptsas: Fixed code to check whether the LU type is SSC or not for SILI bit in READ_6 and READ_16 CDB
@ 2012-03-06  6:46 nagalakshmi.nandigama
  2012-03-07  0:43 ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: nagalakshmi.nandigama @ 2012-03-06  6:46 UTC (permalink / raw)
  To: stable, linux-scsi; +Cc: jejb

This SILI bit (suppress incorrect length indicator) is defined only for SSC
READ(6) and READ(16) commands. For other device types bit is part of LBA
field. In the current implementation, it is not checked whether the logical
unit is a SSC device.


Added code for checking the LU type is SSC for SILI bit in READ_6 and READ_16 CDB 

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
CC: stable@vger.kernel.org
---

diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 0c3ced7..266bb14 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -827,13 +827,16 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 				 * DID_SOFT_ERROR is set.
 				 */
 				if (ioc->bus_type == SPI) {
-					if ((pScsiReq->CDB[0] == READ_6  && ((pScsiReq->CDB[1] & 0x02) == 0)) ||
-					    pScsiReq->CDB[0] == READ_10 ||
-					    pScsiReq->CDB[0] == READ_12 ||
-						(pScsiReq->CDB[0] == READ_16 &&
-						((pScsiReq->CDB[1] & 0x02) == 0)) ||
-					    pScsiReq->CDB[0] == VERIFY  ||
-					    pScsiReq->CDB[0] == VERIFY_16) {
+					if ((pScsiReq->CDB[0] == READ_6  &&
+					((pScsiReq->CDB[1] & 0x02) == 0) &&
+					(sc->device->type == TYPE_TAPE)) ||
+					pScsiReq->CDB[0] == READ_10 ||
+					pScsiReq->CDB[0] == READ_12 ||
+					(pScsiReq->CDB[0] == READ_16 &&
+					((pScsiReq->CDB[1] & 0x02) == 0) &&
+					(sc->device->type == TYPE_TAPE)) ||
+					 pScsiReq->CDB[0] == VERIFY  ||
+					 pScsiReq->CDB[0] == VERIFY_16) {
 						if (scsi_bufflen(sc) !=
 							xfer_cnt) {
 							sc->result =

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [RESEND PATCH] mptsas: Fixed code to check whether the LU type is SSC or not for SILI bit in READ_6 and READ_16 CDB
@ 2012-03-05  4:54 nagalakshmi.nandigama
  2012-03-05 16:41 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: nagalakshmi.nandigama @ 2012-03-05  4:54 UTC (permalink / raw)
  To: stable, linux-scsi; +Cc: jejb

This SILI bit (suppress incorrect length indicator) is defined only for SSC
READ(6) and READ(16) commands. For other device types bit is part of LBA
field. In the current implementation, it is not checked whether the logical
unit is a SSC device.


Added code for checking the LU type is SSC for SILI bit in READ_6 and READ_16 CDB 

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
CC: <stable@kernel.org>
---

diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 0c3ced7..266bb14 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -827,13 +827,16 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 				 * DID_SOFT_ERROR is set.
 				 */
 				if (ioc->bus_type == SPI) {
-					if ((pScsiReq->CDB[0] == READ_6  && ((pScsiReq->CDB[1] & 0x02) == 0)) ||
-					    pScsiReq->CDB[0] == READ_10 ||
-					    pScsiReq->CDB[0] == READ_12 ||
-						(pScsiReq->CDB[0] == READ_16 &&
-						((pScsiReq->CDB[1] & 0x02) == 0)) ||
-					    pScsiReq->CDB[0] == VERIFY  ||
-					    pScsiReq->CDB[0] == VERIFY_16) {
+					if ((pScsiReq->CDB[0] == READ_6  &&
+					((pScsiReq->CDB[1] & 0x02) == 0) &&
+					(sc->device->type == TYPE_TAPE)) ||
+					pScsiReq->CDB[0] == READ_10 ||
+					pScsiReq->CDB[0] == READ_12 ||
+					(pScsiReq->CDB[0] == READ_16 &&
+					((pScsiReq->CDB[1] & 0x02) == 0) &&
+					(sc->device->type == TYPE_TAPE)) ||
+					 pScsiReq->CDB[0] == VERIFY  ||
+					 pScsiReq->CDB[0] == VERIFY_16) {
 						if (scsi_bufflen(sc) !=
 							xfer_cnt) {
 							sc->result =

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

end of thread, other threads:[~2012-03-29  7:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06  6:46 [RESEND PATCH] mptsas: Fixed code to check whether the LU type is SSC or not for SILI bit in READ_6 and READ_16 CDB nagalakshmi.nandigama
2012-03-07  0:43 ` James Bottomley
2012-03-07  9:34   ` Nandigama, Nagalakshmi
2012-03-29  7:51     ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05  4:54 nagalakshmi.nandigama
2012-03-05 16:41 ` Greg KH

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