I tried building lshw from the master branch, including the above fix (comment #1), but it didn't work. However, I can confirm the patched Fedora version works.
I would be happy to help with fixing this as this problem has been a thorn in my side for a while.
Note that Fedora has patches in https:/ /koji.fedorapro ject.org/ koji/buildinfo? buildID= 1329140 that fix the NVME issue - maybe these could be used in the Ubuntu package builds too?
I tried building lshw from the master branch, including the above fix (comment #1), but it didn't work. However, I can confirm the patched Fedora version works.
I would be happy to help with fixing this as this problem has been a thorn in my side for a while.
Hamish