aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSumit.Saxena@lsi.com <Sumit.Saxena@lsi.com>2013-05-22 03:00:22 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-06-24 20:22:18 -0400
commit70b47b881e1e50360cba17417f779953956b960d (patch)
treec65baa88b70ef85af27ffbd4a628144d768cefcd /drivers
parentb5bccadd804151d13530351f9a521e893cac5350 (diff)
[SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com> Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index a11df82474ef..b06a240ee39a 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,
503 diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[1]); 503 diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[1]);
504 bestArm = (diff0 <= diff1 ? 0 : 1); 504 bestArm = (diff0 <= diff1 ? 0 : 1);
505 505
506 if ((bestArm == arm && pend0 > pend1 + 16) || 506 /*Make balance count from 16 to 4 to keep driver in sync with Firmware*/
507 (bestArm != arm && pend1 > pend0 + 16)) 507 if ((bestArm == arm && pend0 > pend1 + 4) ||
508 (bestArm != arm && pend1 > pend0 + 4))
508 bestArm ^= 1; 509 bestArm ^= 1;
509 510
510 /* Update the last accessed block on the correct pd */ 511 /* Update the last accessed block on the correct pd */