Skip to content

Commit 5e5ec17

Browse files
sumitsaxena11martinkpetersen
authored andcommitted
scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
This patch will fix regression caused by commit 1e793f6 ("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: 1e793f6 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> Tested-by: Jens Axboe <axboe@fb.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 1535aa7 commit 5e5ec17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/megaraid/megaraid_sas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ struct megasas_instance_template {
22332233
};
22342234

22352235
#define MEGASAS_IS_LOGICAL(scp) \
2236-
(scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
2236+
((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1)
22372237

22382238
#define MEGASAS_DEV_INDEX(scp) \
22392239
(((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \

0 commit comments

Comments
 (0)