Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1823012rbb; Tue, 27 Feb 2024 02:12:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSRs4mC+DzPFM0nwBF+DQIFKodCEnCmVGAPHj2lj8XrwJAvuQtPQFkeSmbgzvapFHDVJFSGJFj6mCQGneyb68BN5G78JkMFeYB5yYvOw== X-Google-Smtp-Source: AGHT+IH2pI+ctTypnYjWWOPtdjdWgwQD4qGokNfSnPLzsHpQ0EFcY9OEgFwPrX0KrOkw8l1qoeHx X-Received: by 2002:a17:902:e841:b0:1dc:abe9:8270 with SMTP id t1-20020a170902e84100b001dcabe98270mr5102582plg.26.1709028762178; Tue, 27 Feb 2024 02:12:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709028762; cv=pass; d=google.com; s=arc-20160816; b=zHaohu7CGjKr08wtrtdhlaO7cKhQUX3Qt7PXCZg5CFGfc5DTdSw+4dx0SiT61pu08e HgPkE5X4b1uOF9Td1QBKUDPNFeYNb1V/fG1ACoDEcyekTDp6p+5yYwn2fGMaP25EQtbn VorunFTYELZftzy0JKDSZZL+u/111GIgrUxRnD/duFL9pUgFUfRaliiO9jaQPYiCqwqc 07Mpw4h7Fi1ZCkvTM+4KmPyUvkiv3FEZ7/MpCnkkzD8u0P0/RuHg8GdMRGoxUNl498i9 qns/fni9UX0TIMapXE+298mQpW6guOGPwZbBAKJQOhGmcUrsB5Pr91m/5Uzyaf3qWb6c JGlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=uQwbn3zR9hezbroeTv73emmexVO0D5t5Ilp5Ky9Gruc=; fh=lrJDuhKIcPTCCZSRk37UaMRSEDlIrM8sl2pBfNi0pOM=; b=V1zXH8uqr+i0yhNX6hwqEqqbykm/67mCfvjyo5QKE1ox7oNxMtWOQiSjm04UIsoiG9 nfzy+4ARtPwH6qt6T+dunmZL6kcVzVu0nMrxkYdyHIam7lc0ZK2yz+5teoiwYMwYs49B i2lCwBgsbK8GJyXTpKiSWinFAU2Yu5h0YlGC1/pnCb4luk7I3IIwFL//KwmQcHPPyCFR bIKoSJlmYJu5BGCRIT059qyHCj6jHQmQv2q3a3KG/qEX+Xoydou34hM6i5Fm9dDti2EC NdLZCgrg29kLBWPY925d6JqFgVlN9ALUojVBOrfkYx8bQaRm7we76PXE7ppvpAIrlgsH RyEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-82983-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h17-20020a170902f55100b001dcae8808c6si1143170plf.547.2024.02.27.02.12.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 02:12:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82983-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-82983-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C510BB269DB for ; Tue, 27 Feb 2024 09:43:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C4DA137C20; Tue, 27 Feb 2024 09:42:47 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 CE69A15D0; Tue, 27 Feb 2024 09:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026966; cv=none; b=l+30gk9VpXQbzOGwfuMWgwZ5pD9pAEfVNXCJIB3eej9CRzaIXkZ07bU/MvvopjJBCex/9IkIZOKOpxlUesfg0d3fPuesbxq977NAHGRWLmPZuGiy1onuj8mGplbLcy516VwlfELMKuSxlfBfJ2cyhRtsGBB/Rj61FChCONh0NRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026966; c=relaxed/simple; bh=NltuXZkeIhA7SW+L8lNtMeXkelidiUwx3+LJjumtTHI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=l6wVw3Gb2Hh7euwn3C+5DS0fXK6I5he2IA3oFarwrvQqi6YPacuEhcdAUPTKXj/OSQiMsWr1+uokN9Zmrx5NQxMUBqKt222EirZShf5KMxkK68N4YsSl6cP+0sZOPitg6uXXhIyFrAkd4DhhDzlmq46kOcqrllTmBSGk2qzyVls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TkXTM4tntz1b13f; Tue, 27 Feb 2024 17:37:43 +0800 (CST) Received: from dggpemd100001.china.huawei.com (unknown [7.185.36.94]) by mail.maildlp.com (Postfix) with ESMTPS id CD70B1A016C; Tue, 27 Feb 2024 17:42:41 +0800 (CST) Received: from [10.67.120.108] (10.67.120.108) by dggpemd100001.china.huawei.com (7.185.36.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 27 Feb 2024 17:42:41 +0800 Message-ID: Date: Tue, 27 Feb 2024 17:42:41 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH] scsi: libsas: Fix disk not being scanned in after being removed Content-Language: en-CA To: John Garry , Jason Yan , , , CC: , , , , , References: <20240221073159.29408-1-yangxingui@huawei.com> <8dc34f04-943b-26fd-01bc-34fb98803503@huawei.com> <8138ab55-1c43-8df1-dafd-95b16b7b3ce4@huawei.com> <7d132b63-7336-4f59-a5f0-5ec37c3c34d3@oracle.com> From: yangxingui In-Reply-To: <7d132b63-7336-4f59-a5f0-5ec37c3c34d3@oracle.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggpemm100006.china.huawei.com (7.185.36.196) To dggpemd100001.china.huawei.com (7.185.36.94) Hi John, On 2024/2/27 17:06, John Garry wrote: > On 27/02/2024 07:16, Jason Yan wrote: >>>> >>>> Can we directly set phy->negotiated_linkrate = SAS_PHY_DISABLED >>>> here? For an empty PHY the other variables means nothing, so why >>>> bother get and update them? >>> The value of the negotiated link rate has two possible values ​​in >>> the current processing branch: SAS_LINK_RATE_UNKNOWN and >>> SAS_PHY_DISABLED, and both come from disc_resp. If we do not use >>> disc_resp, but set a fixed value SAS_PHY_DISABLED for it, it may not >>> be appropriate. > > But we know that the phy is disabled, right? It's our phy, isn't it? Yes, just like the previous submission, if we disable phy ourselves through the sysfs node, we can configure the negotiation rate to SAS_PHY_DISABLED by setting phy->phy->enable to 0. It might be better to use sas_set_ex_phy() as you described before, it will refresh other phy information synchronously, such as sas_address, device_type, target_protocols, etc. If we only update the negotiation rate and maintain the old information, is it because it is special? Is it better to update phy information uniformly? Thanks, Xingui