* [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
* Re: [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, 0 replies; 6+ messages in thread
From: Greg KH @ 2012-03-05 16:41 UTC (permalink / raw)
To: nagalakshmi.nandigama; +Cc: stable, linux-scsi, jejb
On Mon, Mar 05, 2012 at 10:24:31AM +0530, nagalakshmi.nandigama@lsi.com wrote:
> 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>
> ---
Note, that is NOT the stable email address, you got it right in the cc:
for the email, but not here, please fix it.
greg k-h
^ permalink raw reply [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-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
* Re: [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 [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
0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2012-03-07 0:43 UTC (permalink / raw)
To: nagalakshmi.nandigama; +Cc: stable, linux-scsi
On Tue, 2012-03-06 at 12:16 +0530, nagalakshmi.nandigama@lsi.com wrote:
> 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
This isn't right ... it is for READ(6) but it's FUA_NV for
READ(10,12,16) on block devices.
> 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
I still don't have a description of what you think the actual bug is.
I think the problem is that strict block length checking is accidentally
turned off if FUA_NV is set on a block device (which currently doesn't
happen in practise ... nor do we ever really use READ_6 for block
devices) ... is that it?
James
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [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-07 0:43 ` James Bottomley
@ 2012-03-07 9:34 ` Nandigama, Nagalakshmi
2012-03-29 7:51 ` James Bottomley
0 siblings, 1 reply; 6+ messages in thread
From: Nandigama, Nagalakshmi @ 2012-03-07 9:34 UTC (permalink / raw)
To: James Bottomley; +Cc: stable@vger.kernel.org, linux-scsi
-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
Sent: Wednesday, March 07, 2012 6:13 AM
To: Nandigama, Nagalakshmi
Cc: stable@vger.kernel.org; linux-scsi
Subject: Re: [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
On Tue, 2012-03-06 at 12:16 +0530, nagalakshmi.nandigama@lsi.com wrote:
>> 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
>This isn't right ... it is for READ(6) but it's FUA_NV for
>READ(10,12,16) on block devices.
For READ6, READ16 SSC commands, the BIT 1of BYTE 2 is SILI. (As per SSC4 specs)
For block commands, the BIT 1of BYTE 2 is part of LBA for READ6 and FUA_NV bit for
READ(10,12,16).
So it is required to check whether the logical unit is SSC device or not when checking SILI bit.
So in the patch which I sent, I added this piece of code.
>> 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
>I still don't have a description of what you think the actual bug is.
>
>I think the problem is that strict block length checking is accidentally
>turned off if FUA_NV is set on a block device (which currently doesn't
>happen in practise ... nor do we ever really use READ_6 for block
>devices) ... is that it?
>James
Regards,
Nagalakshmi
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [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-07 9:34 ` Nandigama, Nagalakshmi
@ 2012-03-29 7:51 ` James Bottomley
0 siblings, 0 replies; 6+ messages in thread
From: James Bottomley @ 2012-03-29 7:51 UTC (permalink / raw)
To: Nandigama, Nagalakshmi; +Cc: stable@vger.kernel.org, linux-scsi
On Wed, 2012-03-07 at 15:04 +0530, Nandigama, Nagalakshmi wrote:
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
> Sent: Wednesday, March 07, 2012 6:13 AM
> To: Nandigama, Nagalakshmi
> Cc: stable@vger.kernel.org; linux-scsi
> Subject: Re: [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
>
> On Tue, 2012-03-06 at 12:16 +0530, nagalakshmi.nandigama@lsi.com wrote:
> >> 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
>
> >This isn't right ... it is for READ(6) but it's FUA_NV for
> >READ(10,12,16) on block devices.
>
>
> For READ6, READ16 SSC commands, the BIT 1of BYTE 2 is SILI. (As per SSC4 specs)
> For block commands, the BIT 1of BYTE 2 is part of LBA for READ6 and FUA_NV bit for
> READ(10,12,16).
>
> So it is required to check whether the logical unit is SSC device or not when checking SILI bit.
> So in the patch which I sent, I added this piece of code.
That's what the standards say, yes, I know that. If there's a visible
bug, this is the description of the cause. What I'm asking is what is
the actual user visible effect? The change log needs to include that to
give people who read it an idea of why they might need to apply the fix.
James
^ permalink raw reply [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).