mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
commit5e5ec1759dupstream. This patch will fix regression caused by commit1e793f6fc0("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:1e793f6fc0Reported-by: Jens Axboe <axboe@kernel.dk> 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2be0548e64
commit
ae94da4c53
@@ -1923,7 +1923,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) + \
|
||||
|
||||
Reference in New Issue
Block a user