From: Greg Kroah-Hartman Date: Mon, 14 Nov 2016 07:40:58 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.32~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=677513be01f4f9e03f3baf4752126fbe099df893;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch --- diff --git a/queue-4.4/scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch b/queue-4.4/scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch new file mode 100644 index 00000000000..e322c74982b --- /dev/null +++ b/queue-4.4/scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch @@ -0,0 +1,45 @@ +From 5e5ec1759dd663a1d5a2f10930224dd009e500e8 Mon Sep 17 00:00:00 2001 +From: Sumit Saxena +Date: Wed, 9 Nov 2016 02:59:42 -0800 +Subject: scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression + +From: Sumit Saxena + +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 +Signed-off-by: Kashyap Desai +Signed-off-by: Sumit Saxena +Tested-by: Sumit Saxena +Reviewed-by: Tomas Henzl +Tested-by: Jens Axboe +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -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) + \ diff --git a/queue-4.4/series b/queue-4.4/series index 4189ed78a55..5d1b0d7891e 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -32,3 +32,4 @@ drm-amdgpu-dp-add-back-special-handling-for-nutmeg.patch drm-amdgpu-fix-dp-mode-validation.patch drm-radeon-dp-add-back-special-handling-for-nutmeg.patch drm-radeon-fix-dp-mode-validation.patch +scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch