Re: bug in pci_try_reset_bus

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

 



On 8/27/2018 3:08 PM, Sinan Kaya wrote:
The call stack from the driver is:

pci_reset_bus(pdev)
     __pci_reset_bus(pdev->bus) <-- after fixing first issue
         pci_bus_reset(bus, 1)
             Checks ptr and if resetable.
             if (probe)
                 return 0 <-- here is where it returns


Probe is there to query if this particular device supports reset or not. Which
is the very first thing this code does to ensure we are allowed to touch it
and it is correct.

If probe is returning 0, this code won't return from here. It will continue
to trylock piece.

The probe arg is hard coded to 1 in this path. Actually both calls in pci.c it is hard coded to 1. Maybe we just need to get rid of that arg all together?


     rc = pci_bus_reset(bus, 1);
     if (rc)
         return rc;

My guess is you are failing below with -EAGAIN because lock fails:

if (pci_bus_trylock(bus)) {

} else {
     rc = -EAGAIN;
}

can you please confirm?

Ah yes, silly me. pci_bus_reset() returns 0 and it does go on but doesn't make it to the trylock, it gets hung calling pci_bus_save_and_disable().

-Denny



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux