Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c0c2776 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

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: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 70426892
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -102,8 +102,12 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)


		break;
		break;
	case 0x0304: /* Configured -> Standby */
	case 0x0304: /* Configured -> Standby */
		if (pdev)
		if (pdev) {
			/* Give the driver a hint that the function is
			 * already unusable. */
			pdev->error_state = pci_channel_io_perm_failure;
			pci_stop_and_remove_bus_device(pdev);
			pci_stop_and_remove_bus_device(pdev);
		}


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