Hi, Bjorn On Tue, Sep 22, 2020 at 2:16 PM Huacai Chen <chenhuacai@xxxxxxxxx> wrote: > > Hi, Sinan, > > On Tue, Sep 22, 2020 at 10:11 AM Huacai Chen <chenhc@xxxxxxxxxx> wrote: > > > > Hi, Sinan, > > > > On Mon, Sep 21, 2020 at 11:50 PM Sinan Kaya <okaya@xxxxxxxxxx> wrote: > > > > > > On 9/21/2020 5:22 AM, Huacai Chen wrote: > > > > Use separate remove()/shutdown() callback, and don't disable pci device > > > > during shutdown. This can avoid some poweroff/reboot failures. > > > > > > > > The poweroff/reboot failures can easily reproduce on Loongson platforms. > > > > I think this is not a Loongson-specific problem, instead, is a problem > > > > related to some specific PCI hosts. On some x86 platforms, radeon/amdgpu > > > > devices can cause the same problem, and commit faefba95c9e8ca3a523831c2e > > > > ("drm/amdgpu: just suspend the hw on pci shutdown") can resolve it. > > > > > > This sounds like a quirk to me rather than a behavior that should be > > > applied to all platforms. > > Yes, this is very like a quirk, but it seems there are a lot of > > platforms that have problems, and removing the pci_disable_device() > > has no side effect. > I have seen that you talk about kexec (but this email didn't go to my > inbox). This has been discussed in another thread, and Lucas told us > that in pci_device_shutdown the Bus Master is disabled for kexec. So I > think there will be no memory corruption. Moreover, before 4.15 there > is no .shutdown callback for portdrv, but kexec still works. > > Yes, the perfect way is to modify all problematic drivers, as > radeon/amdgpu does. But I don't have enough knowledge about all of the > devices. > > Huacai Any new comments? Huacai > > > > Huacai