Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3725457rwr; Sun, 7 May 2023 18:47:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QLRGF3VEzXlfzQ7bljCb1NTm9UzGr5oqyCDrzdgS6nw/vag6K9KtQqNaT1XX4FiEultwX X-Received: by 2002:a05:6a00:c8f:b0:643:aa2:4dd0 with SMTP id a15-20020a056a000c8f00b006430aa24dd0mr11096211pfv.9.1683510447892; Sun, 07 May 2023 18:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683510447; cv=none; d=google.com; s=arc-20160816; b=BWX+jsOugmSkl2Pkcx7CLpAQe4/HJBsS8lfIKBak5HcHcQ/T7MqU0bKkATmMJh2f42 vjpQtEa5IzQMgPX2be3zfkgi27eldFJPQ28w3qe5G7+mFwPANk+lfgYppUccpjmM9j5f 8zNlGLngkTLTWKUZRBkZ5U22xG5ZapFdKvDWoPMkllIyuowjWiF/xv8WyTy8266sJQSC 1194dwwq6nB1QEybaEHumNFBFWGKWmcmD5S3cZdMQGcqnhFZ2y2Ynk8pMpEM4ee9Alpu vmnNmUNAMCd3xCjfwO3XBi+lbYI5tEx7YOyXeU+aQPBYsfI4rPWTUmOovWUbGpAFh1Bi 4lJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=eOrXEyP1T6htFqZ1j4EMW3oNIM10bc95m/QxT5HsztU=; b=MML5hewy5iQ1lwiStWr/j6IP/cvANeefBKO+dEDY005T+JFMwVf4rLUrMVCt7M4GgF AL5WJ7PPS2wq4PCvLHm1arNfDGFkkX87XV13nWlyvjbJvYMxfnkDGbF+YybtD1KdW+bX 4mu9iUtjGyYVUGZH8DUy0MIRMGUPc7pGC0b3vKfU/CDzJm8oNFH4d5glx0RLaqqSAMBg XmrC4zuw+XwXFH+N1PKHm5xcMU3QhFbC5Ga/dgOpqPQ7G3+ch56uwIMebEBsZxmYwwRC K2IGfDggWsT6XQrR8o/R6WMZkK1gtdWyua3wH0PPgl5i/FbfyjsRIhSAgFsWOL8PxSh3 hpJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020aa79709000000b0063b8eb340b1si5274910pfg.274.2023.05.07.18.47.13; Sun, 07 May 2023 18:47:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232095AbjEHBLl (ORCPT + 99 others); Sun, 7 May 2023 21:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232026AbjEHBLk (ORCPT ); Sun, 7 May 2023 21:11:40 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 998F935AE; Sun, 7 May 2023 18:11:38 -0700 (PDT) Received: from dggpemm500012.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QF38G757szLnbN; Mon, 8 May 2023 09:08:46 +0800 (CST) Received: from [10.67.101.126] (10.67.101.126) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 8 May 2023 09:11:35 +0800 Message-ID: <938d6b5b-0271-977d-f046-5fd70d29b3ca@huawei.com> Date: Mon, 8 May 2023 09:11:35 +0800 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 v2] ata: libata-scsi: Fix get identity data failed Content-Language: en-CA To: Damien Le Moal , , , CC: , , , , References: <20230505025712.19438-1-yangxingui@huawei.com> <291f1d97-9195-45ac-8e12-058f5c797277@kernel.org> <02d36ee9-cdad-454d-d822-95442d7bd67b@huawei.com> From: yangxingui In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.101.126] X-ClientProxiedBy: dggpemm500016.china.huawei.com (7.185.36.25) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/7 22:51, Damien Le Moal wrote: > On 2023/05/05 18:06, yangxingui wrote: >> >> >> On 2023/5/5 16:17, Damien Le Moal wrote: >>> On 2023/05/05 11:57, Xingui Yang wrote: >>>> The function ata_get_identity() uses the helper ata_scsi_find_dev() to get >>>> the ata_device structure of a scsi device. However, when the ata device is >>>> managed by libsas, ata_scsi_find_dev() returns NULL, turning >>>> ata_get_identity() into a nop and always returns -ENOMSG. >>> >>> What do you do to hit the issue ? A while back for me it was the queue depth >>> setting causing problems. As Garry mentioned, this led to patch 141f3d6256e5 >>> ("ata: libata-sata: Fix device queue depth control"). >> Attempt to return the correct value at ata_scsi_find_dev() instead of >> NULL, when the ata device is managed by libsas? > > That I understand. My question is *what* user operation/command triggers this ? > Because on my test setup, under normal use, I do not see this issue (beside what > was already corrected with the queue depth control). Is the issue showing up > when using passthrough commands only ? Yeah, we found that command "hdparm -i /dev/sdc" always return faild for SATA HDD disk. as follows: [root@localhost ~]# hdparm -i /dev/sdc /dev/sdc: HDIO_GET_IDENTITY failed: Invalid argument trace logļ¼š execve("/usr/sbin/hdparm", ["hdparm", "-i", "/dev/sdc"], 0xffffea26f620 /* 42 vars */) = 0 ioctl(3, HDIO_GET_IDENTITY, 0xffffeb435f28) = -1 ENOMSG (No message of desired type) Thanks, Xingui .