mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drivers/pci/hotplug: Fix initial state for empty slot
am: 4f77c55c3a
Change-Id: I06aecc89657e692b88615195afccf6e47ed6b136
This commit is contained in:
@@ -436,9 +436,21 @@ static int pnv_php_enable(struct pnv_php_slot *php_slot, bool rescan)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Proceed if there have nothing behind the slot */
|
||||
if (presence == OPAL_PCI_SLOT_EMPTY)
|
||||
/*
|
||||
* Proceed if there have nothing behind the slot. However,
|
||||
* we should leave the slot in registered state at the
|
||||
* beginning. Otherwise, the PCI devices inserted afterwards
|
||||
* won't be probed and populated.
|
||||
*/
|
||||
if (presence == OPAL_PCI_SLOT_EMPTY) {
|
||||
if (!php_slot->power_state_check) {
|
||||
php_slot->power_state_check = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
goto scan;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the power supply to the slot is off, we can't detect
|
||||
|
||||
Reference in New Issue
Block a user