From patchwork Tue May 19 09:51:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 6435861 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 DAC639F1C1 for ; Tue, 19 May 2015 10:36:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C2B32054D for ; Tue, 19 May 2015 10:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2693D2047C for ; Tue, 19 May 2015 10:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755220AbbESKg1 (ORCPT ); Tue, 19 May 2015 06:36:27 -0400 Received: from mx0b-0016ce01.pphosted.com ([67.231.156.153]:37899 "EHLO mx0b-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267AbbESKg0 (ORCPT ); Tue, 19 May 2015 06:36:26 -0400 Received: from pps.filterd (m0000643.ppops.net [127.0.0.1]) by mx0b-0016ce01.pphosted.com (8.14.5/8.14.5) with SMTP id t4JAWwGR021118; Tue, 19 May 2015 03:34:51 -0700 Received: from avcashub1.qlogic.com (avcashub1.qlogic.com [198.70.193.115]) by mx0b-0016ce01.pphosted.com with ESMTP id 1udu3c3u5c-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 19 May 2015 03:34:51 -0700 Received: from dut6217.mv.qlogic.com (172.29.56.217) by qlc.com (10.1.4.190) with Microsoft SMTP Server id 14.3.235.1; Tue, 19 May 2015 03:34:50 -0700 Received: by dut6217.mv.qlogic.com (Postfix, from userid 0) id 78DD3521F60; Tue, 19 May 2015 05:52:06 -0400 (EDT) From: To: , , , CC: , , Subject: [PATCH 2/2] bnx2i: Fix call trace while device reset Date: Tue, 19 May 2015 05:51:58 -0400 Message-ID: <1432029118-25867-2-git-send-email-nilesh.javali@qlogic.com> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1432029118-25867-1-git-send-email-nilesh.javali@qlogic.com> References: <1432029118-25867-1-git-send-email-nilesh.javali@qlogic.com> MIME-Version: 1.0 disclaimer: bypass X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7805 signatures=670585 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1505190134 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 From: Nilesh Javali The driver waits for command completion event while cleanup of task within the frwd lock and back locks. The frwd lock was still held which caused the call trace while issuing a device reset. Release the frwd lock along with the back lock to avoid waiting in the lock context. Signed-off-by: Nilesh Javali --- drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index 1b8a971..7289437 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -1173,8 +1173,10 @@ static void bnx2i_cleanup_task(struct iscsi_task *task) bnx2i_send_cmd_cleanup_req(hba, task->dd_data); spin_unlock_bh(&conn->session->back_lock); + spin_unlock_bh(&conn->session->frwd_lock); wait_for_completion_timeout(&bnx2i_conn->cmd_cleanup_cmpl, msecs_to_jiffies(ISCSI_CMD_CLEANUP_TIMEOUT)); + spin_lock_bh(&conn->session->frwd_lock); spin_lock_bh(&conn->session->back_lock); } bnx2i_iscsi_unmap_sg_list(task->dd_data);