-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvme: Scan NVMe topology without nvme identify namespace #2246
Conversation
Since the show-regs command needed this to scan for PCI. Signed-off-by: Tokunori Ikegami <[email protected]>
Depended on the libnvme PR changes linux-nvme/libnvme#790 and this can resolved the issue #2048 also. |
Why is this necessary? What is the problem you are trying to solve? |
Since the show-regs command hanged up when CC.EN set to zero then reset the controller by timeout so the register values not able to print before the reset. This caused by the nvme identify namespace but not necessary for the command output. Later will do include the reason into the commit message. |
I'd phrase it differently: why do we need to call 'nvme_scan()' here? It feels a bit too heavy-handed to me. We should just drop it and use the device name directly, much like we already do eg for 'nvme reset'. |
I suspect the scan is needed if we want to list the fabrics properties. Still we could just do the scan only for the fabric devices and not for PCI devices. |
For get_regs ? Does that even work on fabrics devices? |
I thought that |
It's |
Like this?
|
Yes the nvme_scan only used for the mmap_registers to get the path so will do consider to get the path from libnvme without the scan. I think still the path information required for the mmap as mentioned by #2048 (comment) also. |
I can't really remember the exact reason for the |
Ah after digging into it, I think we can do something very simple: sprintf(path, "/sys/class/nvme/%s/device/resource0", dev->name); because the fallback (via namespace) was needed prio v4.0 but since then the d902032 ("Register read fix for kernel 4.0") |
Since the show-regs command needed this to scan for PCI.