Message ID | 1474458816-4881-1-git-send-email-gwshan@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Gavin Shan <gwshan@linux.vnet.ibm.com> writes: > The timeout should be 1000ms instead of 1000 ticks while powering > off PCI slot in pci_slot_power_off(). Otherwise, it's likely to > hit timeout powering off the PCI slot as below skiboot logs reveal: > > [47912590456,5] SkiBoot skiboot-5.3.6 starting... > : > [5399532365,7] PHB#0005:02:11.0 Bus 0f..ff scanning... > [5399540804,7] PHB#0005:02:11.0 No card in slot > [5399576870,5] PHB#0005:02:11.0 Timeout powering off slot > [5401431782,3] FIRENZE-PCI: Wrong state 00000000 on slot 8000000002880005 > > This replaces time_wait() with time_wait_ms() to resolve the issue. > > Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Looks like should go to stable too. added Fixes: tag and merged to master as of: 171726631d014cd5e61170f06028474d900a827e, and cherry-picked into 5.3.x as of: c96ee45b0ede6ca24723bcbb49f7868e794246b1
On Thu, Sep 22, 2016 at 03:37:45PM +1000, Stewart Smith wrote: >Gavin Shan <gwshan@linux.vnet.ibm.com> writes: >> The timeout should be 1000ms instead of 1000 ticks while powering >> off PCI slot in pci_slot_power_off(). Otherwise, it's likely to >> hit timeout powering off the PCI slot as below skiboot logs reveal: >> >> [47912590456,5] SkiBoot skiboot-5.3.6 starting... >> : >> [5399532365,7] PHB#0005:02:11.0 Bus 0f..ff scanning... >> [5399540804,7] PHB#0005:02:11.0 No card in slot >> [5399576870,5] PHB#0005:02:11.0 Timeout powering off slot >> [5401431782,3] FIRENZE-PCI: Wrong state 00000000 on slot 8000000002880005 >> >> This replaces time_wait() with time_wait_ms() to resolve the issue. >> >> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> > >Looks like should go to stable too. > >added Fixes: tag and merged to master as of: >171726631d014cd5e61170f06028474d900a827e, >and cherry-picked into 5.3.x as of: c96ee45b0ede6ca24723bcbb49f7868e794246b1 > Thanks a lot, Stewart. >-- >Stewart Smith >OPAL Architect, IBM.
diff --git a/core/pci.c b/core/pci.c index c72a3cf..08e0ed1 100644 --- a/core/pci.c +++ b/core/pci.c @@ -531,7 +531,7 @@ static void pci_slot_power_off(struct phb *phb, struct pci_device *pd) break; check_timers(false); - time_wait(10); + time_wait_ms(10); } while (--wait >= 0); pci_slot_set_state(slot, PCI_SLOT_STATE_NORMAL);
The timeout should be 1000ms instead of 1000 ticks while powering off PCI slot in pci_slot_power_off(). Otherwise, it's likely to hit timeout powering off the PCI slot as below skiboot logs reveal: [47912590456,5] SkiBoot skiboot-5.3.6 starting... : [5399532365,7] PHB#0005:02:11.0 Bus 0f..ff scanning... [5399540804,7] PHB#0005:02:11.0 No card in slot [5399576870,5] PHB#0005:02:11.0 Timeout powering off slot [5401431782,3] FIRENZE-PCI: Wrong state 00000000 on slot 8000000002880005 This replaces time_wait() with time_wait_ms() to resolve the issue. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> --- core/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)