From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 590982AE96; Tue, 29 Apr 2025 17:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745949554; cv=none; b=mG3//cOHHwZ63wc0qWasEFeBzOrzgj+gwqSDoRhUKumGoKaOLzZ+8DYaeA37XTeb9vnT52RXGM+uoBjbKJG27WxJhEjX/Fy/aks2btFJF8EDoCY6/09lzeQxYaaumur1vPaSgL4rifDQo16kwc8JB0i7EDhbF+/0EahoHW1h/8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745949554; c=relaxed/simple; bh=Swa1DN69HRO6EfVlBG85WYU+PQLTTtRmNJ5IzhkHty8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AWpZdt1Ol7MCyl+XTozO/SbALTI/V3z0pK79L/7w9cNR+7nQayKWakTI+aKUBY+k4n4g6wtAAQNH/vK8TzYJRLtiwiRKcKBc9OfA59i10MZzBs8F3/OvQdbWDDKF1t0zm01xzsm6qunT5pGjOrqg15rhuAylOO3hrPh/15x1Sxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wsEEIv5l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wsEEIv5l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58955C4CEE3; Tue, 29 Apr 2025 17:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745949553; bh=Swa1DN69HRO6EfVlBG85WYU+PQLTTtRmNJ5IzhkHty8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wsEEIv5leb86QJj+m2AtT6aoP2ETHEq8bbx2Brd/XBO2GiZLgrURGiHnndV50wgG6 Eu2NOd3tub4FVbvXs1rEtom/iApZcIlcj1jlmlKoQm1BDo+vRDfjbSoRfY01zxSTfB tkdOtcRE7Y1kolL0rl0I0wW6q/Cxvh9IF6RZfA54= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Igor Pylypiv , Salomon Dushimirimana , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 356/373] scsi: pm80xx: Set phy_attached to zero when device is gone Date: Tue, 29 Apr 2025 18:43:53 +0200 Message-ID: <20250429161137.772889736@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161123.119104857@linuxfoundation.org> References: <20250429161123.119104857@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Igor Pylypiv [ Upstream commit f7b705c238d1483f0a766e2b20010f176e5c0fb7 ] When a fatal error occurs, a phy down event may not be received to set phy->phy_attached to zero. Signed-off-by: Igor Pylypiv Signed-off-by: Salomon Dushimirimana Link: https://lore.kernel.org/r/20250319230305.3172920-1-salomondush@google.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/pm8001/pm8001_sas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 2c003c17fe6aa..0c79f2a9eba76 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -892,6 +892,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev) spin_lock_irqsave(&pm8001_ha->lock, flags); } PM8001_CHIP_DISP->dereg_dev_req(pm8001_ha, device_id); + pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached = 0; pm8001_free_dev(pm8001_dev); } else { pm8001_dbg(pm8001_ha, DISC, "Found dev has gone.\n"); -- 2.39.5