Skip to content

Commit 0c0c277

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
s390/pci: set error state for unavailable functions
If we receive a notification that a pci function became unavailable we clean up by removing the pci device. This can confuse the driver since the function is already unaccessible. Improve this situation by setting an appropriate error_state. Reviewed-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 7042689 commit 0c0c277

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/s390/pci/pci_event.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
102102

103103
break;
104104
case 0x0304: /* Configured -> Standby */
105-
if (pdev)
105+
if (pdev) {
106+
/* Give the driver a hint that the function is
107+
* already unusable. */
108+
pdev->error_state = pci_channel_io_perm_failure;
106109
pci_stop_and_remove_bus_device(pdev);
110+
}
107111

108112
zpci_disable_device(zdev);
109113
zdev->state = ZPCI_FN_STATE_STANDBY;

0 commit comments

Comments
 (0)