From: Sumit.Saxena@lsi.com Date: Wed, 22 May 2013 07:00:22 +0000 (+0530) Subject: [SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware X-Git-Tag: v3.11-rc1~88^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70b47b881e1e50360cba17417f779953956b960d;p=profile%2Fivi%2Fkernel-x86-ivi.git [SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware Signed-off-by: Sumit Saxena Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index a11df82..b06a240 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -503,8 +503,9 @@ u8 megasas_get_best_arm(struct LD_LOAD_BALANCE_INFO *lbInfo, u8 arm, u64 block, diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[1]); bestArm = (diff0 <= diff1 ? 0 : 1); - if ((bestArm == arm && pend0 > pend1 + 16) || - (bestArm != arm && pend1 > pend0 + 16)) + /*Make balance count from 16 to 4 to keep driver in sync with Firmware*/ + if ((bestArm == arm && pend0 > pend1 + 4) || + (bestArm != arm && pend1 > pend0 + 4)) bestArm ^= 1; /* Update the last accessed block on the correct pd */