scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
authorSumit Saxena <sumit.saxena@broadcom.com>
Wed, 9 Nov 2016 10:59:42 +0000 (02:59 -0800)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:14:47 +0000 (13:14 +0000)
commitfa8327bf799edbf473f94bb0d6e8ad28b4e54de1
tree4c60840e21b805159a04859153bdadb42e358449
parent559383ddfde42a2f785d8ec43f2706cae2d19e4d
scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression

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@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: Willy Tarreau <w@1wt.eu>
drivers/scsi/megaraid/megaraid_sas.h