Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp981761ybt; Wed, 17 Jun 2020 19:51:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRcBV7NlbaS5GhxWtZCRSwi/a63qFqkmdZXAB4XEw3PnAmUk8FhXMvsaIXZrIl2O1jA6Ir X-Received: by 2002:a05:6402:1714:: with SMTP id y20mr2040652edu.81.1592448696939; Wed, 17 Jun 2020 19:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592448696; cv=none; d=google.com; s=arc-20160816; b=uTu3dOpusY/I3UTnb6++DmmMmP8TfzZeEu3kDxSP194AqTKrbczhwrBeEnFse0gGlx Wx8gAKalLKC/Cl5uMtSAFzr4KHoHKdYTBQZGKxdcS7iw/V+QX+E2H7zuI51WscisTbyi uV8p7+kY1p2w47FezsPVpJHjG6xuufQksQ51o1THxDplM08iZZkXofCTeAnU7mgbpowT WRgRu4ttQ86TSrKCh+0ahITCcyaVQk+L0TQDUKBwAZvAce9QPP7RVM0nRR6bu/aselVs 1tUjjSCqBRVDk2blrLxLhIQ7BCQG2xmqUU5anKYoBOwvXU4FtiLlIFoWH6FQHnGKQ6el AVaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7CZI4Cd0O6tK72MuCJAd2ptuaKk5sSY+VGAnAyqP294=; b=SSjYlosQX59MjliFhr8YQr/oCe0zgzQ1ndEIggU/0tzmbx4lVQYtRlPcySsHZ2Cq3B Q5HnBEhs+Rn1r9W+9EDQHV51mR2wmhrmrnHgx1qTkkyMvPOM2WGAaw31DGXRlxvJHvYY qKqcmzcuvV2AZc0zMhGkP67JPKW4VwK17PU/kThCawOaV68Yj570BZ0b365ct7lSbQ/r IfgrkmYcqGT2JPYy849+ROLHvdkQ9Nh3Wyde1D+ZkmkJ//FW2L1F/eDPO4AmBs+8uBmB BOew7Csawo8oeqOBJzirs9jaM7I/QYZLBd1+9q4zNn0E7RG/Rl8C8AJGxEtc2oDNvXB3 8+KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="0pt/w16b"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m11si1044283edp.600.2020.06.17.19.51.14; Wed, 17 Jun 2020 19:51:36 -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="0pt/w16b"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbgFRBJe (ORCPT + 99 others); Wed, 17 Jun 2020 21:09:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbgFRBJb (ORCPT ); Wed, 17 Jun 2020 21:09:31 -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 0718821D91; Thu, 18 Jun 2020 01:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592442570; bh=ShfcaxMIxTsjNzyEcGwcdyv8WEVgKpTuaNy4/RpqRyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0pt/w16b34GJozTjOMx4wyUIft6o2xLuEbQGSSb06e2Jc1YfVY2hCl76/eLpcVJuP M63JtnXs+mcSMz6MW+VX3GuKUmJ/ySdso8fGUil8SYBJ0nLV+joZUYsf6J4pcep194 fzMhgH2n1IBrfHfOF3JbCiqfgmJPeqR8EyKcI81E= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Luo Jiaxing , John Garry , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 064/388] scsi: hisi_sas: Do not reset phy timer to wait for stray phy up Date: Wed, 17 Jun 2020 21:02:41 -0400 Message-Id: <20200618010805.600873-64-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618010805.600873-1-sashal@kernel.org> References: <20200618010805.600873-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luo Jiaxing [ Upstream commit e16b9ed61e078d836a0f24a82080cf29d7539c7e ] We found out that after phy up, the hardware reports another oob interrupt but did not follow a phy up interrupt: oob ready -> phy up -> DEV found -> oob read -> wait phy up -> timeout We run link reset when wait phy up timeout, and it send a normal disk into reset processing. So we made some circumvention action in the code, so that this abnormal oob interrupt will not start the timer to wait for phy up. Link: https://lore.kernel.org/r/1589552025-165012-2-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/hisi_sas/hisi_sas_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 9a6deb21fe4d..11caa4b0d797 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -898,8 +898,11 @@ void hisi_sas_phy_oob_ready(struct hisi_hba *hisi_hba, int phy_no) struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; struct device *dev = hisi_hba->dev; + dev_dbg(dev, "phy%d OOB ready\n", phy_no); + if (phy->phy_attached) + return; + if (!timer_pending(&phy->timer)) { - dev_dbg(dev, "phy%d OOB ready\n", phy_no); phy->timer.expires = jiffies + HISI_SAS_WAIT_PHYUP_TIMEOUT * HZ; add_timer(&phy->timer); } -- 2.25.1