[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1487198494.368579418@decadent.org.uk>
Date: Wed, 15 Feb 2017 22:41:34 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org,
"Sumit Saxena" <sumit.saxena@...adcom.com>,
"Tomas Henzl" <thenzl@...hat.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"Jens Axboe" <axboe@...nel.dk>,
"Kashyap Desai" <kashyap.desai@...adcom.com>,
"Jens Axboe" <axboe@...com>
Subject: [PATCH 3.2 080/126] scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL
to avoid regression
3.2.85-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Sumit Saxena <sumit.saxena@...adcom.com>
commit 5e5ec1759dd663a1d5a2f10930224dd009e500e8 upstream.
This patch will fix regression caused by commit 1e793f6fc0db ("scsi:
megaraid_sas: Fix data integrity failure for JBOD (passthrough)
devices").
The problem was that the MEGASAS_IS_LOGICAL macro did not have braces
and as a result the driver ended up exposing a lot of non-existing SCSI
devices (all SCSI commands to channels 1,2,3 were returned as
SUCCESS-DID_OK by driver).
[mkp: clarified patch description]
Fixes: 1e793f6fc0db920400574211c48f9157a37e3945
Reported-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Kashyap Desai <kashyap.desai@...adcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@...adcom.com>
Tested-by: Sumit Saxena <sumit.saxena@...adcom.com>
Reviewed-by: Tomas Henzl <thenzl@...hat.com>
Tested-by: Jens Axboe <axboe@...com>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/scsi/megaraid/megaraid_sas.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1402,7 +1402,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(inst, scp) \
((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \
Powered by blists - more mailing lists