Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756167AbbGUXAz (ORCPT ); Tue, 21 Jul 2015 19:00:55 -0400 Received: from mx0a-0016ce01.pphosted.com ([67.231.148.157]:20990 "EHLO mx0a-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbbGUXAx convert rfc822-to-8bit (ORCPT ); Tue, 21 Jul 2015 19:00:53 -0400 From: Himanshu Madhani To: Spencer Baugh , Dept-Eng QLA2xxx Upstream , "James E.J. Bottomley" , linux-scsi , linux-kernel CC: Joern Engel , Spencer Baugh , Dilip Kumar Uppugandla Subject: Re: [PATCH] qla2xxx: Return the fabric command state for non-task management requests Thread-Topic: [PATCH] qla2xxx: Return the fabric command state for non-task management requests Thread-Index: AQHQxAIGl7M/yhdKR0WIJlHnq407wJ3mihGA Date: Tue, 21 Jul 2015 23:00:38 +0000 Message-ID: References: <1437516477-30554-3-git-send-email-sbaugh@catern.com> In-Reply-To: <1437516477-30554-3-git-send-email-sbaugh@catern.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.1.4.10] disclaimer: bypass Content-Type: text/plain; charset="us-ascii" Content-ID: <496858DAEFD76243AD6883B62C82F544@qlogic.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7869 signatures=670608 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507210350 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1626 Lines: 55 On 7/21/15, 3:07 PM, "Spencer Baugh" wrote: >From: Dilip Kumar Uppugandla > >Invoking get_cmd_state for qla2xxx always returns 0. Instead change it >to return the actual fabric state from qla_tgt_cmd. This will help with >debugging. > >Signed-off-by: Dilip Kumar Uppugandla >Signed-off-by: Spencer Baugh >--- > drivers/scsi/qla2xxx/tcm_qla2xxx.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c >b/drivers/scsi/qla2xxx/tcm_qla2xxx.c >index d9a8c60..e859586 100644 >--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c >+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c >@@ -420,6 +420,12 @@ static void >tcm_qla2xxx_set_default_node_attrs(struct se_node_acl *nacl) > > static int tcm_qla2xxx_get_cmd_state(struct se_cmd *se_cmd) > { >+ if (!(se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB)) { >+ struct qla_tgt_cmd *cmd = container_of(se_cmd, >+ struct qla_tgt_cmd, se_cmd); >+ return cmd->state; >+ } >+ > return 0; > } > >-- >2.4.3 > >-- >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html >Please read the FAQ at http://www.tux.org/lkml/ Looks Good. Acked-by: Himanshu Madhani > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/