Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1163696rwo; Sat, 22 Jul 2023 07:43:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHT/sxE9B8eY+XXQEAaDIefeBIi7cnstJelej0q1E6gsYNMdSmBtNA7h5Z+qiHMg+oD9DvK X-Received: by 2002:a17:907:75fa:b0:974:1ef7:1e88 with SMTP id jz26-20020a17090775fa00b009741ef71e88mr4261522ejc.13.1690037025541; Sat, 22 Jul 2023 07:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690037025; cv=none; d=google.com; s=arc-20160816; b=hBD37bpC9SrLgv5W+rkJCAWSYgTkRU0CsjmbGnJIQjUB86N3k4CtQq2JKpAPR9o/68 Vwybh0WXh9Z9Tjm3wn80gJg4UK5xyTjuMhUyWUjNb6E0DXNIzN5RbJqLyWMMmpzSjig9 akiz9m9O3yd3cqW6F3h8oNUj9+ceHhOYe6T6jMH8Xn9W2B0lEaXQ3DSiXYha8dIVbnUK XhCPstVS2ZgeSKHrGXvEfXgmTy7fdilzteIGoxs0CzGxSSbj65SOojqMPi4evW2MznIF 1UeI/WEoLsE2Vr8/5An9ZxCHoBJMyiOadbTI+eGFrWfrgUFR9t3UMSgxsKvzQf7HvLG4 MDAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UEc/gKJsyHCzqxEQtroXydSdK7o/MzgDF2qH7kIt9/8=; fh=IymACyZoS0/uUkcyjV6P/q8Ou/XpFeBmEbmDD9S0hy0=; b=p7pFms9cyXF3YrpwIHjypq9cpblSTbPOnhwXLX1UysmO6XxWpN54h+AVztA7kChUGX 9E4bGaZ1q0PlR74Gk+Q5HSXY8P8T/UojR5OPo17CC10psso1UGOLTv3rsoacPVaqBHKY ltp8MOOsSZy+4GHHChqWQDLRb8G8ADOmBZNklBHc2ZrrGyeT8P0fDcHhUStBiFSUz0cN 1p2yniK/p6XhMy6rxhk49ScT5DMb3MRF4OIvX28Ph1mrTEfrbI19UxzNgLm/oXywwZlr /JulkUIyP7KQSwsIVbfHVepxijN+H+vHetsoGLVns+w/c6y9Jf3M+m/ZtHRse9a3E6nb QdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ELPN2a4K; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay21-20020a056402203500b0051dd30daa6asi3740818edb.268.2023.07.22.07.43.21; Sat, 22 Jul 2023 07:43:45 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ELPN2a4K; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbjGVOIF (ORCPT + 99 others); Sat, 22 Jul 2023 10:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbjGVOIE (ORCPT ); Sat, 22 Jul 2023 10:08:04 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED9AC2D50 for ; Sat, 22 Jul 2023 07:08:02 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b8ad9eede0so22296905ad.1 for ; Sat, 22 Jul 2023 07:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690034882; x=1690639682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UEc/gKJsyHCzqxEQtroXydSdK7o/MzgDF2qH7kIt9/8=; b=ELPN2a4KsE8+/aqvLMY5S0P2fyMByLMQqiSF9pX8JuC7oGTZVB5HYHVMvzNzY1KnIl GnJBlAWSiAueIRoNvLe9IcYNeggkvdnhJGlGGcTtUlgmthMN0wfICvjvUES8PCphL+hr n1w+lPJty/2/PXZoXKl7Q2Api/XhUV6p5698jVfPGbiSvL+JINRJcxjN81KVQRwE+b+M NYFFjz+yzKl+ItrP0ERVTX+cL2OdXqV5XMX1mLoGkW7cUYjwp53ekLZypEmHHmSswMLy VsKkQy5yYS9553auaCwuPGn1akKj7dbHXXyeUC9BUcrp6dV0JAGvcxys17cBgIqrhdfQ qdkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690034882; x=1690639682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UEc/gKJsyHCzqxEQtroXydSdK7o/MzgDF2qH7kIt9/8=; b=dzYLP5OTX+BK09Upk1hGHTcauix6oTCbv6oYC1JsnsWaptb+t/2iI1X6yArV4aralE QKBcNVdNUrjoYDZzcRjYsNiWakr9wOrHyfgMbK5n7MJOcYYpGpTT6lURaAWS6sWzqVUQ SCQmTZ1akR+6X+Pe8yQFymipLdD303gt5foOIbEmnP6aNd/0gf9RQQR60ZrLV+E+4b56 Nm1oxg7AxWOazcqBFPpidMYzi9cZaf1baE/QZ6lInmYtD2kkxYgeuXneuQh8qRXacs8M 1DIQbAjLqT5eHqpgO5MA55IBhdrxex09QUwRWFN4bh7xJaJ0E+xe/8Bjh/fHI0uvo4SS 5CaA== X-Gm-Message-State: ABy/qLZ/Uxo3a6PBn/mtbVRk/Hhzo8Ja0IOpSfGyaxA18otDbyyrRyhn Ogfqvyd77/A4aFPmDAc/35Q= X-Received: by 2002:a17:902:6b4c:b0:1bb:7d2f:7c19 with SMTP id g12-20020a1709026b4c00b001bb7d2f7c19mr2367596plt.64.1690034882167; Sat, 22 Jul 2023 07:08:02 -0700 (PDT) Received: from kit.horse-mountain.ts.net ([159.196.93.60]) by smtp.gmail.com with ESMTPSA id 19-20020a170902c21300b001b8b4730355sm3519469pll.287.2023.07.22.07.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jul 2023 07:08:01 -0700 (PDT) From: Josh Taylor To: wangxiao@hotmail.it Cc: axboe@kernel.dk, hch@lst.de, highenthalpyh@gmail.com, kbusch@kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me, xuwd1@hotmail.com Subject: Re: [PATCH] nvme-pci: add NVME_QUIRK_DELAY_BEFORE_CHK_RDY for MAXIO MAP1602 Date: Sat, 22 Jul 2023 14:07:52 +0000 Message-ID: <20230722140752.616073-1-joshuataylorx@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 This is my first response to a Kernel patch, so I apologise for any formatting weirdness. I have a Lexar NM790 (4TB), which uses the MAP1602. It looks like this is going to be a fairly popular controller, as it seems a few are using it - as of July 2023 it looks like ~18 M.2 2280 are using it according to techpowerup (https://www.techpowerup.com/ssd-specs/?f&controllerMfgr=Maxiotech#MAP1602). I however cannot get this patch to work for me on 6.5-rc2 on ArchLinux, nor with 6.4.4. This is my dmesg when booting (Linux archiso 6.3.9-arch1-1): [ 6.634874] nvme nvme0: pci function 0000:01:00.0 [ 6.640698] r8169 0000:27:00.0: enabling device (0000 -> 0003) [ 6.643601] nvme nvme0: Device not ready; aborting initialisation, CSTS=0x0 When doing a suspend, then resuming, I can then re-initialise the device using the rescan steps in the previous email. I then get this in my dmesg (Linux archiso 6.3.9-arch1-1): [ 130.948667] pci 0000:01:00.0: Removing from iommu group 14 [ 131.983938] pci 0000:01:00.0: [1d97:1602] type 00 class 0x010802 [ 131.983963] pci 0000:01:00.0: reg 0x10: [mem 0xfcf00000-0xfcf03fff 64bit] [ 131.984212] pci 0000:01:00.0: 31.504 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x4 link at 0000:00:01.1 (capable of 63.012 Gb/s with 16.0 GT/s PCIe x4 link) [ 131.984346] pci 0000:01:00.0: Adding to iommu group 14 [ 132.031556] pci 0000:01:00.0: BAR 0: assigned [mem 0xfcf00000-0xfcf03fff 64bit] [ 132.031662] nvme nvme0: pci function 0000:01:00.0 [ 132.044095] nvme nvme0: allocated 40 MiB host memory buffer. [ 132.088892] nvme nvme0: 16/0/0 default/read/poll queues The "allocated 40 MiB host memory buffer" part is interesting, none of my other drives have this, as this is a DRAM-less drive. # nvme get-feature /dev/nvme0 -f 0x0c -H get-feature:0x0c (Autonomous Power State Transition), Current value:0x00000001 Autonomous Power State Transition Enable (APSTE): Enabled Auto PST Entries ................. Entry[ 0] ................. Idle Time Prior to Transition (ITPT): 100 ms Idle Transition Power State (ITPS): 3 ................. Entry[ 1] ................. Idle Time Prior to Transition (ITPT): 100 ms Idle Transition Power State (ITPS): 3 ................. Entry[ 2] ................. Idle Time Prior to Transition (ITPT): 100 ms Idle Transition Power State (ITPS): 3 ................. Entry[ 3] ................. Idle Time Prior to Transition (ITPT): 2000 ms Idle Transition Power State (ITPS): 4 ................. Entry[ 4] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[ 5] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[ 6] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[ 7] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[ 8] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[ 9] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[10] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[11] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[12] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[13] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[14] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[15] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[16] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[17] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[18] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[19] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[20] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[21] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[22] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[23] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[24] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[25] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[26] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[27] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[28] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[29] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[30] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 ................. Entry[31] ................. Idle Time Prior to Transition (ITPT): 0 ms Idle Transition Power State (ITPS): 0 .................