Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp171099imd; Wed, 31 Oct 2018 16:45:14 -0700 (PDT) X-Google-Smtp-Source: AJdET5cvLLs7CvlHn1fR0BADBg82r+VGGwt2kL177i8tLZ1Pn4tOBe2wCB2d/+NPMQTaAMoUCqsK X-Received: by 2002:a17:902:6b82:: with SMTP id p2-v6mr5433193plk.50.1541029514683; Wed, 31 Oct 2018 16:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029514; cv=none; d=google.com; s=arc-20160816; b=fyb0tqEnpdT0LGhXVsu6CJyQ1ilbON3HAVSxn43uNvkdQz50Ij9FheS55ZvGzMkfFa wDbkfrswL6bYUv3DaANENDH7ywYxlEFzD+sM4G5UNJTzuWVq6Q4JZmWzanXh1zVynVjz Q5kpIyzZgAISCXNcSWyNx2YwV46Tq9n7N5jCRkSRle9s4QNCg9+5k2K7bp7vFCJh/vrN OhFgTHZbyDcivjWgUHznxyU9nAea4P/TJuZ5HQHqTSdxlRowO/uVC8YqKoLbWFavy0Wh t1MBwMG/ZmyNFV6DfD5Lzn0/TMfbp46ZpA2KEJG4pn89/kR04jlSwrqRu3sm9yW/3F7v gw6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fJ138NZYbRyWCXPBItSn4uVYZqWwruuRNQQeKQ2Niqg=; b=Y+Jqo6N+oHxdqRZ6mTYeeo/QN/F+hmFqMDK+D5FfXwiUGFl8MGVe8bbecTSbEC2qkt 4K18+9G1Q7n8q/bmyiHChGq2fQnRFkGVcUX7yTg9zzdeXr4+c4P8cui/6vs7oA4XVMf/ I6TY6CvzJ8JKAZm34l8DbCwvbWxT5WRX6QSiZvVdb7JMF4IFakhHg0SJvppmh5av769J cLLpfLu/E+JdQBiQxTiZ0EhtHdbQnlD8ME81u9nGn5IdGGZaK3lcj8fOds882rXApesR q/zhCTTKYI4+qsb5ZgenZAQh1iOOuJYJJOnGSY3VGPlhXKYJot2gF1TkbAOK5psvc6RX g6Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DuJpgQy1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c41-v6si16515525plj.194.2018.10.31.16.45.00; Wed, 31 Oct 2018 16:45:14 -0700 (PDT) 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=DuJpgQy1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbeKAIHo (ORCPT + 99 others); Thu, 1 Nov 2018 04:07:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:55740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729065AbeKAIHn (ORCPT ); Thu, 1 Nov 2018 04:07:43 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E81420821; Wed, 31 Oct 2018 23:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027252; bh=8eYbxooVdlF5ub09TAzOYwFF5oATdhJMgQR2WoZfpWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DuJpgQy1llAE7A41ycOsMrF+9U884Mc8CaYqC/DYDKUcqvvJRQJZ9jnfKTlVujfWg WfZpuUglQ5ebMYq3GHaxr7W+8Yfw5ueV8iwhyWLkQceTV+yDOT7zjEhVWP2m3Wwo/e GoUPD1TAW4cxdHYjSRlvyNcDVd+BINJhWBomMWvE= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Quinn Tran , stable@ger.kernel.org, Himanshu Madhani , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 122/146] scsi: qla2xxx: Fix recursive mailbox timeout Date: Wed, 31 Oct 2018 19:05:17 -0400 Message-Id: <20181031230541.28822-122-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 2c6c2cd5a0d0..596a9b214df1 100644 --- 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 *vha, mbx_cmd_t *mcp) 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"); -- 2.17.1