From patchwork Fri Aug 7 12:24:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Saxena X-Patchwork-Id: 6968961 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E2F1A9F358 for ; Fri, 7 Aug 2015 12:36:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2206C20524 for ; Fri, 7 Aug 2015 12:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9C4B2063A for ; Fri, 7 Aug 2015 12:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280AbbHGMfy (ORCPT ); Fri, 7 Aug 2015 08:35:54 -0400 Received: from bastion.smtp.avagotech.com ([202.86.248.61]:43998 "EHLO sgpsmtp1.avagotech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753069AbbHGMfw (ORCPT ); Fri, 7 Aug 2015 08:35:52 -0400 Received: from PALEXCH11.lsi.com (palexch11.lsi.com [128.94.223.42]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by sgpsmtp1.avagotech.com (Postfix) with ESMTPS id 3587B11B80E; Fri, 7 Aug 2015 05:25:35 -0700 (PDT) Received: from PALEXCH12.lsi.com (128.94.222.97) by PALEXCH11.lsi.com (128.94.223.42) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 7 Aug 2015 08:25:34 -0400 Received: from palmhbs0.lsi.com (128.94.222.181) by PALEXCH12-EXT.lsi.com (128.94.222.103) with Microsoft SMTP Server id 14.3.158.1; Fri, 7 Aug 2015 08:25:33 -0400 Received: from localhost ([135.24.192.147]) by palmhbs0.lsi.com (8.13.8/8.12.11) with ESMTP id t77CUcoH021202; Fri, 7 Aug 2015 08:30:39 -0400 From: Message-ID: <201508071230.t77CUcoH021202@palmhbs0.lsi.com> Date: Fri, 7 Aug 2015 17:54:22 +0530 To: , , , , , , , Subject: [PATCH 5/7] megaraid_sas : Fix validHandles check in io path CC: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Syncro firmware support round robin IO switch on dual path. For this driver use validHandles as a check for dual path. This check suppose to be > 1 (not > 2) Without this patch, earlier driver code does not use dual path functionality. Signed-off-by: Sumit Saxena Signed-off-by: Kashyap Desai diff --git a/megaraid_sas_fusion.c b/megaraid_sas_fusion.c index c31750a..568813d 100644 --- a/megaraid_sas_fusion.c +++ b/megaraid_sas_fusion.c @@ -1684,7 +1684,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance, scp->SCp.Status &= ~MEGASAS_LOAD_BALANCE_FLAG; if ((raidLUN[0] == 1) && - (local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 2)) { + (local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 1)) { instance->dev_handle = !(instance->dev_handle); io_info.devHandle = local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].devHandle[instance->dev_handle];