* [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945
@ 2016-11-09 10:59 Sumit Saxena
2016-11-09 15:51 ` Tomas Henzl
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sumit Saxena @ 2016-11-09 10:59 UTC (permalink / raw)
To: linux-scsi
Cc: martin.petersen, thenzl, jejb, kashyap.desai,
shivasharan.srikanteshwara, axboe, stable, Sumit Saxena
This patch will fix regression caused by below commit-
1e793f6 scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
The problem was MEGASAS_IS_LOGICAL macro does not have braces and because of above commit
using this macro was exposing lot of non-existing SCSI devices(all SCSI commands to channels-1,2,3 was
returned as SUCCESS-DID_OK by driver).
Fixes: 1e793f6fc0db920400574211c48f9157a37e3945
Reported-by: Jens Axboe <axboe@kernel.dk>
CC: stable@vger.kernel.org
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Tested-by: Sumit Saxena <sumit.saxena@broadcom.com>
---
drivers/scsi/megaraid/megaraid_sas.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index ca86c88..3aaea71 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2233,7 +2233,7 @@ struct megasas_instance_template {
};
#define MEGASAS_IS_LOGICAL(scp) \
- (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
+ ((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1)
#define MEGASAS_DEV_INDEX(scp) \
(((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945
2016-11-09 10:59 [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945 Sumit Saxena
@ 2016-11-09 15:51 ` Tomas Henzl
2016-11-09 16:14 ` Jens Axboe
2016-11-09 16:30 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Tomas Henzl @ 2016-11-09 15:51 UTC (permalink / raw)
To: Sumit Saxena, linux-scsi
Cc: martin.petersen, jejb, kashyap.desai, shivasharan.srikanteshwara,
axboe, stable
On 9.11.2016 11:59, Sumit Saxena wrote:
> This patch will fix regression caused by below commit-
> 1e793f6 scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
>
> The problem was MEGASAS_IS_LOGICAL macro does not have braces and because of above commit
> using this macro was exposing lot of non-existing SCSI devices(all SCSI commands to channels-1,2,3 was
> returned as SUCCESS-DID_OK by driver).
>
> Fixes: 1e793f6fc0db920400574211c48f9157a37e3945
> Reported-by: Jens Axboe <axboe@kernel.dk>
> CC: stable@vger.kernel.org
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> Tested-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Tomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945
2016-11-09 10:59 [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945 Sumit Saxena
2016-11-09 15:51 ` Tomas Henzl
@ 2016-11-09 16:14 ` Jens Axboe
2016-11-09 16:30 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2016-11-09 16:14 UTC (permalink / raw)
To: Sumit Saxena, linux-scsi
Cc: martin.petersen, thenzl, jejb, kashyap.desai,
shivasharan.srikanteshwara, stable
On 11/09/2016 03:59 AM, Sumit Saxena wrote:
> This patch will fix regression caused by below commit-
> 1e793f6 scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
>
> The problem was MEGASAS_IS_LOGICAL macro does not have braces and because of above commit
> using this macro was exposing lot of non-existing SCSI devices(all SCSI commands to channels-1,2,3 was
> returned as SUCCESS-DID_OK by driver).
>
> Fixes: 1e793f6fc0db920400574211c48f9157a37e3945
> Reported-by: Jens Axboe <axboe@kernel.dk>
> CC: stable@vger.kernel.org
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> Tested-by: Sumit Saxena <sumit.saxena@broadcom.com>
Tested-by: Jens Axboe <axboe@fb.com>
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945
2016-11-09 10:59 [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945 Sumit Saxena
2016-11-09 15:51 ` Tomas Henzl
2016-11-09 16:14 ` Jens Axboe
@ 2016-11-09 16:30 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-11-09 16:30 UTC (permalink / raw)
To: Sumit Saxena
Cc: linux-scsi, martin.petersen, thenzl, jejb, kashyap.desai,
shivasharan.srikanteshwara, axboe, stable
>>>>> "Sumit" == Sumit Saxena <sumit.saxena@broadcom.com> writes:
Sumit> This patch will fix regression caused by below commit- 1e793f6
Sumit> scsi: megaraid_sas: Fix data integrity failure for JBOD
Sumit> (passthrough) devices
Sumit> The problem was MEGASAS_IS_LOGICAL macro does not have braces and
Sumit> because of above commit using this macro was exposing lot of
Sumit> non-existing SCSI devices(all SCSI commands to channels-1,2,3 was
Sumit> returned as SUCCESS-DID_OK by driver).
Applied to 4.9/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-09 16:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 10:59 [PATCH] megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression caused by commit 1e793f6fc0db920400574211c48f9157a37e3945 Sumit Saxena
2016-11-09 15:51 ` Tomas Henzl
2016-11-09 16:14 ` Jens Axboe
2016-11-09 16:30 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.