Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3482513imu; Sun, 11 Nov 2018 16:06:50 -0800 (PST) X-Google-Smtp-Source: AJdET5esun9XMgtOAEmIfF4+qcyd4cwm6H0iQdIvgim502lylPO2IGV7P9KjXx/soGXqvJV16C1S X-Received: by 2002:a62:f541:: with SMTP id n62-v6mr17939598pfh.59.1541981210879; Sun, 11 Nov 2018 16:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981210; cv=none; d=google.com; s=arc-20160816; b=rAtO/nMXfA9lUQKXywPwi7NmGb7iJBG+mFdNehAbP4E260VYTVQBhg6lt3lDroH7kB HeLCYVBVeR44fsqlfpgJrf4h/kChpHT2EEzfy+rjfM+UWMynYougVWkLlB2BwPEm0n6a E+qNco19vAtcXPdYpTxs8amao8XoIHeOv0Wbo92FkrBhRN9M12VWd8A2XPvc2wiLbKij dvS6ObMwN/jp3aw6KR3gPm8mYoha5/ICfgCF3CZf0YH9S8zdmtZlFdDDy5QRw5/uCkOQ AESApLdw0JX66Pigt79gGA0x+JtOqqZndDrqfu43nxH0VvpUW54GW0lmoy8K1eFQPgNL Q4tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Uke0Se0lqyyBF2m08htSuiPfO2ojkcNuoLdpJ3ZYiBY=; b=De+MrvGAsbr1wfTgdyGA8HfR1GxVU923DlFRvknY8gZv3EX6c1r3t2kfg0OqDEYFRA J9Fd6aaQAOFxqGu180E+bB/IjlFIKdi+li3rbzzCS8IgHpdTC3btblYBAFjdvz+BFMcF u05gXC/sWvd6xs711sTWBptak2hKe6UtSfUI/O2IAi0CEEaykQ0etAVPAT6aHFy83tGk M027kRCyKY9thgRU6f45ywTeL0BIe51q8k7nk13sK+nS6UQqtdA23w+4XwCTgeWAhidX b9X16xdlxBnoGpIqp0Mnr405u4YEE/7/ebOZVwi/GnoKEPlYZnstnkJffBLnAoQbynWY DAfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mtyU0mEN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20si14250805pgm.366.2018.11.11.16.06.35; Sun, 11 Nov 2018 16:06:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mtyU0mEN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732188AbeKLJz1 (ORCPT + 99 others); Mon, 12 Nov 2018 04:55:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:34412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731884AbeKLIRp (ORCPT ); Mon, 12 Nov 2018 03:17:45 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1D522175B; Sun, 11 Nov 2018 22:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975270; bh=l7LeWHwSHtuK6+gaMjrgewWjeWqjfyTMB+p6n7g5ifc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mtyU0mENEcXivGczra8FDzZZFXwCAdjiq1It6nAemiQS/7pxps+W39mLO1lBf6hum ZprIKTnH0nKMBpdI+pjbFm1XZ0sqZiog2p0RRfSjYaIKyhsSskM5B+Nu7Sk8wUVPwu tHFPvHR5kaA1mwKZqoU1Erm9S82bu7Iu6tKdL63Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@ger.kernel.org, Quinn Tran , "Ewan D. Milne" , Himanshu Madhani , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 166/361] scsi: qla2xxx: Fix recursive mailbox timeout Date: Sun, 11 Nov 2018 14:18:33 -0800 Message-Id: <20181111221643.682095382@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran [ Upstream commit 710bc78f829d014eca95ed7ccc4052bc064b1320 ] This patch prevents user space mailbox request from doing chip reset if the mailbox timed out. The chip reset is only reserved for the DPC thread to ensure all mailbox requests are flushed properly. The DPC thread is responsible for the flushing all MBs and chip reset. Fixes: b2000805a975 ("scsi: qla2xxx: Flush mailbox commands on chip reset") Cc: Signed-off-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -493,7 +493,7 @@ qla2x00_mailbox_command(scsi_qla_host_t set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); qla2xxx_wake_dpc(vha); } - } else if (!abort_active) { + } else if (current == ha->dpc_thread) { /* call abort directly since we are in the DPC thread */ ql_dbg(ql_dbg_mbx, vha, 0x101d, "Timeout, calling abort_isp.\n");