Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2620986ybk; Tue, 12 May 2020 04:09:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIY3kN4j8MsAEMDsLX4Zy0AnefkbE9/M+SQFt/GpqNcWHza4NN052Mk/Oh169YTXV4hcsyt X-Received: by 2002:aa7:c419:: with SMTP id j25mr12530746edq.209.1589281795285; Tue, 12 May 2020 04:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589281795; cv=none; d=google.com; s=arc-20160816; b=bJrcpyUA/iiNfTqLMF8rMDgO3xWX0wB0iM3KuymNxp58lKw9zEJZg0BKwZ+GX4DR62 zob1o2O1usgE+tGJVN6H5Xoeovm6WxFkCBoHtg0q1zyWPDcPdbgNrX+Es+njCwaMRU8z 4b7wm9Gol1bDQk8qEUohQJ5nJqgTNE4BKwT6+IZ/qbzl8ibs9Yvx3WHAhaafjpRhh/eP eytTRZ0ILLVSgs1aX1acW+aF+6G+AMY3uLHa4kQgVZHGcvTFw5U4d/ZQZqfxEL1B7RYg t68up83NDiwHl6BjtRy6PvYJK8nD3Wo9GLITd7ewBIemtKdgazDZ4+k1A+34vSjHr9qS Ta2A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=o/nE+CWt/cCfcGQ0D97aIMH2pjetVIB5VwRR+BlCvRo=; b=l4ORGKmsxtoT5CV9LWRSEeLBGPoGzsCoPM75r7lavrMv/ZOHamDh9RJzwhP65wfwKR DqU+YtZCXDKj5B3akPwoRDEyBHXQkQVBWW0BBAaNN8darkPUMHCwULs61iQBYr56Szv+ DBFwrNchtXDlPxrXAzcrVVqozDXYTeLZRA4VzH/uSEQiymQRjcouVaSvK9TMch/F0gKM PRBSa26aGC4GA34iFbE+tfSuc9KJllCbaGbQeZwvrUfRoEzNMxDrb8+IgbSWIUcrWpJO ZxVnymUp+ecANX1NBpyxDVlrsKoTj7XB4Tak69KmNim/TRiCI5Et6bZJWfkfX/VFyHMr X/Jw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si7724443ejv.161.2020.05.12.04.09.31; Tue, 12 May 2020 04:09:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729243AbgELLIF (ORCPT + 99 others); Tue, 12 May 2020 07:08:05 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2194 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726891AbgELLIF (ORCPT ); Tue, 12 May 2020 07:08:05 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 2775A39EC4767A3A9A55; Tue, 12 May 2020 12:08:03 +0100 (IST) Received: from [127.0.0.1] (10.210.169.134) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 12 May 2020 12:08:02 +0100 Subject: Re: [PATCH] scsi: hisi_sas: display correct proc_name in sysfs To: Jason Yan , , , , CC: Xiang Chen References: <20200512063318.13825-1-yanaijie@huawei.com> <66c3318d-e8fa-9ff4-c7f4-ebe23925b807@huawei.com> <920c5d36-5637-1fba-034b-8ea3d41c131c@huawei.com> <1043f72a-7f4c-eb5c-eeb2-227f5321fed5@huawei.com> From: John Garry Message-ID: Date: Tue, 12 May 2020 12:07:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <1043f72a-7f4c-eb5c-eeb2-227f5321fed5@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.210.169.134] X-ClientProxiedBy: lhreml733-chm.china.huawei.com (10.201.108.84) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2020 11:30, Jason Yan wrote: > > > 在 2020/5/12 18:00, John Garry 写道: >> On 12/05/2020 10:35, Jason Yan wrote: >>> >>> >>> 在 2020/5/12 16:23, John Garry 写道: >>>> On 12/05/2020 07:33, Jason Yan wrote: >>>>> The 'proc_name' entry in sysfs for hisi_sas is 'null' now becuase >>>>> it is >>>>> not initialized in scsi_host_template. It looks like: >>>>> >>>>> [root@localhost ~]# cat /sys/class/scsi_host/host2/proc_name >>>>> (null) >>>>> >>>> >>>> hmmm.. it would be good to tell us what this buys us, apart from the >>>> proc_name file. >>>> >>> >>> When there is more than one storage cards(or controllers) in the >>> system, I'm tring to find out which host is belong to which card. And >>> then I found this in scsi_host in sysfs but the output is '(null)' >>> which is odd. >> >> "dmesg | grep host" would give this info, like: >> >> root@(none)$ dmesg | grep host0 >> [    8.877245] scsi host0: hisi_sas_v2_hw >> > > NO, if long time after the system boot, dmesg cannot get this > infomation. It is flushed by other logs. ok, so I don't see any other way to currently do this, even though using proc_name is a bit suspect, so: Acked-by: John Garry And the $subject is not right. It should be simply "display proc_name in sysfs". Thanks, John