From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2830C433EF for ; Wed, 15 Jun 2022 18:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347636AbiFOSlO (ORCPT ); Wed, 15 Jun 2022 14:41:14 -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> 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.