[LTP] [PATCH] ltp_tpci.c: Add release operation before allocation
Krzysztof Kozlowski
krzysztof.kozlowski@canonical.com
Tue Jun 29 11:38:27 CEST 2021
On 28/06/2021 22:29, Petr Vorel wrote:
> Hi Xin,
>
>> When we run the test case, the following results will be obtained:
>> test_pci 283 TPASS : PCI bus 7d slot 00 : Test-case '11'
>> test_pci 284 TFAIL : tpci.c:74: PCI bus 7d slot 00 : Test-case '12'
>> ...
>> test_pci 300 TFAIL : tpci.c:74: PCI bus 7d slot 01 : Test-case '12'
>> test_pci 301 TPASS : PCI bus 7d slot 01 : Test-case '13'
>
>> The analysis is that the space allocated by the bios is insufficient.
>> The solution to this problem can be in add pci_release_resource(dev, i)
>> before system resources are reallocated.Because the resources have been
>> allocated when the system is initialized.If it is redistributed, it
>> should be released and then allocated.
>
> I wonder if this is the same issue as the one described by Krzysztof in his
> patch:
> https://patchwork.ozlabs.org/project/ltp/patch/20210401125127.45600-1-wangxin410@huawei.com/
>
> Could you please share what HW and kernel you use and post dmesg?
This solves my problem. It seems that could be the root cause - early
configuration allocated too small resource? It might be also some
specific BIOS issue (wrong resource allocated?) because in case of
resource assignment failure, the kernel should try to get the original
FW address from BIOS (pcibios_retrieve_fw_addr()) and this apparently
returns NULL translated to -ENOMEM.
I am fine with going with this patch instead of mine.
Best regards,
Krzysztof
More information about the ltp
mailing list