Re: [PATCH v2] pci: loongson: Workaround MIPS firmware MRRS settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在2023年9月7日九月 上午6:08,Manivannan Sadhasivam写道:
> On Thu, Sep 07, 2023 at 11:13:00AM +0800, Jiaxun Yang wrote:
>> 
>> 
>> 在 2023/9/7 9:18, Manivannan Sadhasivam 写道:
>> [...]
>> > Why do you need to walk through every single device instead of just bridges?
>> > I'm not the maintainer, but my suggestion is to go for Huacai Chen's solution.
>> Hi Mani,
>> 
>> Thanks for your reply, unfortunately Huacai's solution is impractical in
>> this case.
>> 
>> The problem we have, is firmware (or BIOS) setting improper MRRS for devices
>> attached under those bridges. So we have to fix up MRRS for every single
>> device.
>> We can't iterate child device in bridge quirk because there is no guarantee
>> that
>> bridge will be probed before  it's child device, partly due to hotplug.
>> 
>
> Okay, this clarifies and also warrants improvement in commit message.
>
> You could also use pci_walk_bus() after pci_host_probe() to iterate over the
> child devices under root bridge and set MRRS. IMO that would look neat.

This won't work as disabling device will reset MRRS and you have to set
it again, while pci_host_probe will only run at init.

So quirk at device enablement is still the best solution.

Thanks
- Jiaxun

>
> - Mani
>
>> This quirk has been in tree for a while, until Huacai refactored it and
>> broke some
>> systems in 8b3517f88ff2 ("PCI: loongson: Prevent LS7A MRRS increases").
>> 
>> Also to note that ks_pcie_quirk in drivers/pci/controller/dwc/pci-keystone.c
>> uses similar approach.
>> > This avoids iterating over bridges/devices two times.
>> > 
>> > Also, please rename firmware to BIOS, as firmware commonly represents the
>> > software running on PCIe endpoint devices.
>> Ack, will fix in next reversion.
>> 
>> Thanks
>> - Jiaxun
>> > 
>> > - Mani
>> [...]
>
> -- 
> மணிவண்ணன் சதாசிவம்

-- 
- Jiaxun




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux