Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp812840iog; Wed, 15 Jun 2022 12:57:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6PBm8ycMP2VX9Ps2ggcEheElEauzfVOL9gO7QY0X7G3SwPAm+b8r4uEbh9YdARlkJNaOS X-Received: by 2002:a05:6402:1208:b0:432:dd71:c1 with SMTP id c8-20020a056402120800b00432dd7100c1mr1774005edw.265.1655323032069; Wed, 15 Jun 2022 12:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655323032; cv=none; d=google.com; s=arc-20160816; b=ZN3F4p1GkcaF907nfBh9KyptfEqhep34rTh9OcJEd3PoIRHdKWJe8FWezX++NOd7wU 5CxN6HkG+iAPeJgWPM3vyFW8dbhBgPjM5VmTonzHFBq+nhX1EPX2Y6spzAOyxnYQAdgX o9uUUJ2cMtgSSKFKu9nYgoQIe5rXruvytAsw5rye+EqQJUfzAL92bQ15zdXbluaXa/OB 8EHEKv13rgshw5nmF/Sp5CMseFdgMqVejCB60LDXM3yBcbjujnss8xxP2Dv8sHbSUIvQ 4bhUcWk8EwPq7BoUBpaw2WENYAf4H/UHVULkSGfCMn/2Qd9477FPFfICX15eYQ7gJrsC plrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PPSTAQnuEYPVvy4m+rns2DfwGnMdcGxfaJPkUIMrMgs=; b=rKGUmI7DTPnfzfiExxkzuv+GM0uzfHTS8scg64Esmy7cwm1Ipm4hJ0/zPdZuZ7TrXT jvR+qcVdoFUgVjLuximGRvs7j39qZkUVccCNgUIhaDkXHzEHHzE+IY08VCZ8niWxd/rT 9hvq/IelOm8KMrXdGBAEn8alMRKaiDi4PRseR1Q28gfaVtYqfrgxNLHKUAj5CDa/PSSE aBmCKPucnjgeqja7pwzPJhTgcIFsoWvQxVxoCxiUstYynpFmeN29E3P2vqj308R/tBbr dGn+aLRFdfSDbwlzu3v4KLPMWRrJf7fJRqQJodNJqx5RONjRnV/Rf3emmMRoxxLogCDx eDEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ltvj3ELL; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa33-20020a17090786a100b007046fc0f0ccsi17803488ejc.320.2022.06.15.12.56.47; Wed, 15 Jun 2022 12:57:12 -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=@kernel.org header.s=k20201202 header.b=ltvj3ELL; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347762AbiFOSlN (ORCPT + 99 others); Wed, 15 Jun 2022 14:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbiFOSlM (ORCPT ); Wed, 15 Jun 2022 14:41:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E0334653 for ; Wed, 15 Jun 2022 11:41:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 41B48B8212F for ; Wed, 15 Jun 2022 18:41:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F01FC34115; Wed, 15 Jun 2022 18:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655318468; bh=aQrwqFLT5KW3RGQgBn+BHZAI/LCgRU4T3zqdiFw1N7U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ltvj3ELLROvjZiA+vZ9/XTdu6ZHC0rN40UdjI9aHr8z17KjaRnfMG5CBqD30ftlZ6 kx92xiAp9otoG3YyPqc+cjJwECdxHG8FoppMCCCedaFXI++mWseAIgWHZPB1AEox7T BJqH4dgfwtbwNUjr9wK5aFfuVdJlIbZiXG8XPdk1QXdaSH3xqTUGourVIY4qfd02d9 nS70C69mwGmpVmYtSuLi9iDdMAa+I45rpIztDoU1YVnK0dJm/cLBrwZJ5I6z+f/q/d aX/6gJeaeH/68VtFBdqkF1Rpk84cEDlp8uF9ITU0NBCu9IW9I1FBsaB7FLmNi8vTDB 1B3tviLs9rFdQ== Date: Wed, 15 Jun 2022 12:41:05 -0600 From: Keith Busch To: Erwan Velu Cc: Erwan Velu , Jens Axboe , Christoph Hellwig , Sagi Grimberg , "open list:NVM EXPRESS DRIVER" , open list Subject: Re: [PATCH] nvme: Report model,sn,fw,pci device information during init Message-ID: References: <20220615180213.760756-1-e.velu@criteo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220615180213.760756-1-e.velu@criteo.com> X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, Jun 15, 2022 at 08:02:13PM +0200, Erwan Velu wrote: > SCSI-based device get their identify properties being printed when initialized like : > > [ 1.245357] scsi 0:0:0:0: Direct-Access ATA HGST HTE721010A9 A3M0 PQ: 0 ANSI: 5 > > When initializing nvme devices, no identification message is reported > making difficult to identify them during the boot process. If the system > crashes during boot process or if the init phase fail, it could be very diffcult > to identify the faulty disk. > > This patch reports model, serial, firmware version and pci information > as soon as possible making this early identifying task possible. > > Reporting the serial has the interest of being able to ensure which > physical drive is concerned if a hardware replacement is required and > host features the exact same drive multiple times. > > A typical output looks like: > [ 0.383353] nvme nvme0: pci function 0000:00:03.0 > [ 0.418184] nvme nvme0: MODEL:QEMU NVMe Ctrl SN:deadbeef FW:1.0 PCI_ID:1b36:1af4 > [ 0.422020] nvme nvme0: 1/0/0 default/read/poll queues The PCI_ID: print is misleading. That format usually indicates VID:DID, but you're printing VID:SSVID. This is also very similar to the recently introduced nvme_print_device_info(), but that one removes the annoying trailing spaces if they exist. I guess if we're going this direction, just use that print, but change it from dev_err to dev_info, and remove the call on global id collision detection.