bus/pci: fix hardware ID limit on Windows
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Fri, 11 Dec 2020 20:09:30 +0000 (23:09 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 5 Jan 2021 12:56:34 +0000 (13:56 +0100)
commit6d10ddb408fd666e3e2593b6c16ddc943265d62c
treeeada9d5be464b5eed0f4b4a341a1348ced15da7f
parent9d620630ea30386d7fc2ff192656a9051b6dc6b5
bus/pci: fix hardware ID limit on Windows

Length of hardware IDs list is limited by REGSTR_VAL_MAX_HCID_LEN [1],
which is currently 1024. With the old limit of 260, obtaining the list
could fail in a rare occasion of a very long result (no examples known).
This also removes a bogus dependency on the maximum path length.

[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hardware-ids

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
drivers/bus/pci/windows/pci.c