[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yqj94JXMwjrdSbqG@kbusch-mbp.dhcp.thefacebook.com>
Date: Tue, 14 Jun 2022 14:30:08 -0700
From: Keith Busch <kbusch@...nel.org>
To: Erwan Velu <erwanaliasr1@...il.com>
Cc: Erwan Velu <e.velu@...teo.com>, Jens Axboe <axboe@...com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
"open list:NVM EXPRESS DRIVER" <linux-nvme@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] nvme: Report model,sn,fw,pci device information
during init
On Tue, Jun 14, 2022 at 11:09:02PM +0200, Erwan Velu wrote:
> @@ -2982,6 +2982,14 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
> return -EIO;
> }
>
> + /* Reporting model, serial, firmware and pci info */
> + dev_info(ctrl->device, "MODEL:%s SN:%s FW:%s PCI_ID:%04x:%04x\n",
> + id->mn,
> + id->sn,
> + id->fr,
> + le16_to_cpu(id->vid),
> + le16_to_cpu(id->ssvid));
We don't need to print this on every controller reset, so I think this needs to
be within the "if (!ctrl->identified)" block.
And since you can't just null terminate the these strings, you should use the
"%*s" format.
I'm unsure if the serial number should be logged. Firmware and model are
probably fine.
Powered by blists - more mailing lists