Skip to content

Commit b76fee1

Browse files
niklas88hcahca
authored andcommitted
s390/pci: ignore stale configuration request event
A configuration request event may be stale, that is the event may reference a zdev which was already configured. This can happen when a hotplug happens during boot such that the device is discovered and configured in the initial clp_list_pci(), then after initialization we enable events and process the original configuration request which additionally still contains the old disabled function handle leading to a failure during device enablement and subsequent I/O lockout. Fix this by restoring the check that the device to be configured is in standby which was removed in commit f606b3e ("s390/pci: adapt events for zbus"). This check does not need serialization as we only enable the events after zPCI has fully initialized, which includes the initial clp_list_pci(), rescan only does updates and events are serialized with respect to each other. Fixes: f606b3e ("s390/pci: adapt events for zbus") Cc: <[email protected]> # 5.8 Reported-by: Shalini Chellathurai Saroja <[email protected]> Tested-by: Shalini Chellathurai Saroja <[email protected]> Acked-by: Pierre Morel <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 0b8eb2e commit b76fee1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/s390/pci/pci_event.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
9292
ret = clp_add_pci_device(ccdf->fid, ccdf->fh, 1);
9393
break;
9494
}
95+
/* the configuration request may be stale */
96+
if (zdev->state != ZPCI_FN_STATE_STANDBY)
97+
break;
9598
zdev->fh = ccdf->fh;
9699
zdev->state = ZPCI_FN_STATE_CONFIGURED;
97100
ret = zpci_enable_device(zdev);

0 commit comments

Comments
 (0)