Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp301307pxx; Wed, 28 Oct 2020 05:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/RsWUXVRER7OWWtR8jjoBbAtmgPyeCVx71vkKGTSjTkVd1g/8FwH5wpXzih30vPDyR4qv X-Received: by 2002:a05:6402:1d85:: with SMTP id dk5mr7710812edb.240.1603887813734; Wed, 28 Oct 2020 05:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603887813; cv=none; d=google.com; s=arc-20160816; b=vnLSKyfUYHaLd7E+TbS9G/KxlavvtpRCPUKMUs7vqVA9/qn4jvQ0bugQRK0NpJJhuN WrooKdHT9yoymZlniLUF0dOZONspWhF0zOhRwwKIK1CRZID3AF0YfM9mDuQx30evqqzy lNk0RjBysngRP1vy6n3Db6KhGbgtlzsCpRaj7E6rJyTcnd/8Ekg4tEDzjpZ6AejFWcop iCd1Wziryvjm8+P0vQZkXc8y4MA5GKwf+BGPrIeqUeCdBCwO4EtvHjhf9IBM1KlM3ecd Z6rBKWCo/BECoz2z1T2vcJsSOPXH00T7EgbK03Zp+K0LJhlSYjfOE+lm8xHvdMKTAwhm Nz0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3lG4LUhqLsjs/TVllxzC0q/OIs9Sya+y3MZfCYS9Acs=; b=AqoVgB9xhqnn8PzQ41uL+QeuSv0EMntKUkqsN1UxeUSy5ZEVmgVECTZzOols3twZMz dDiofqFMN5Jaup+UJluM7/2qX+2uSiDAi0r+yFarq/Jown78QFcXbSuJ2PMDzU+bZGzX Vj0gdq46elV9yftgICx+xtix71dLSKJrUeRlk1FbZcvDGRQsYE5JJg5hqfC/9934yg+U wDeU6VP1gfuOY+IBzfEqfjekdh01Uvj/E3645gZk0VvxVfPu9r57hCNK9s3lbyR5r58E Oo+h8GdkjVvz+xeXGtA/PO+oYZIEyFpAEPp5+AbFYfT0+gwYMvWnFVWh4DecTUUWKWrj Yf7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HI2FiQwO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si2953320edn.245.2020.10.28.05.23.11; Wed, 28 Oct 2020 05:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HI2FiQwO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1796663AbgJ0PTs (ORCPT + 99 others); Tue, 27 Oct 2020 11:19:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:52564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796128AbgJ0PPr (ORCPT ); Tue, 27 Oct 2020 11:15:47 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 820F62225C; Tue, 27 Oct 2020 15:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811747; bh=VBzvYmETKXOwfA2KkRNYm/mmCR6EPH7oXjsYbI2Q7cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HI2FiQwOx8PmxVfmGWDAwWXqkDkTgXGCTQfdFtSp9p5YePRCxSblUd6qS4wWPPrTu Xvm9cJgL5f+Z5YhaI66LMjr141f3rMlUgxfgLuHKg8iLHSFPCstDRlKGl0jDAwd2dI p0KZxaxH2wsyagigF1ZRqFNcxVYgC1K4l+F77ggk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nilesh Javali , Manish Rangankar , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.8 602/633] scsi: qedi: Mark all connections for recovery on link down event Date: Tue, 27 Oct 2020 14:55:45 +0100 Message-Id: <20201027135551.053619230@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nilesh Javali [ Upstream commit 4118879be3755b38171063dfd4a57611d4b20a83 ] For short time cable pulls, the in-flight I/O to the firmware is never cleaned up, resulting in the behaviour of stale I/O completion causing list_del corruption and soft lockup of the system. On link down event, mark all the connections for recovery, causing cleanup of all the in-flight I/O immediately. Link: https://lore.kernel.org/r/20200908095657.26821-7-mrangankar@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qedi/qedi_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 81a307695cc91..569fa4b28e4e2 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1127,6 +1127,15 @@ static void qedi_schedule_recovery_handler(void *dev) schedule_delayed_work(&qedi->recovery_work, 0); } +static void qedi_set_conn_recovery(struct iscsi_cls_session *cls_session) +{ + struct iscsi_session *session = cls_session->dd_data; + struct iscsi_conn *conn = session->leadconn; + struct qedi_conn *qedi_conn = conn->dd_data; + + qedi_start_conn_recovery(qedi_conn->qedi, qedi_conn); +} + static void qedi_link_update(void *dev, struct qed_link_output *link) { struct qedi_ctx *qedi = (struct qedi_ctx *)dev; @@ -1138,6 +1147,7 @@ static void qedi_link_update(void *dev, struct qed_link_output *link) QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, "Link Down event.\n"); atomic_set(&qedi->link_state, QEDI_LINK_DOWN); + iscsi_host_for_each_session(qedi->shost, qedi_set_conn_recovery); } } -- 2.25.1