提交 5e5ec175 编写于 作者: S Sumit Saxena 提交者: Martin K. Petersen

scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression

This patch will fix regression caused by commit 1e793f6f ("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: 1e793f6fReported-by: NJens Axboe <axboe@kernel.dk>
CC: stable@vger.kernel.org
Signed-off-by: NKashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: NSumit Saxena <sumit.saxena@broadcom.com>
Tested-by: NSumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: NTomas Henzl <thenzl@redhat.com>
Tested-by: NJens Axboe <axboe@fb.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 1535aa75
......@@ -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) + \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册