summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-12-12 17:53:11 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-12-16 14:37:55 +0100
commit0c0c2776926018e7560b99e921467aea1115d03b (patch)
treea663713f196c4d5fdb9f41aa680e9b554a8e6f84 /arch/s390
parent704268925d32a0457202371a61580af76b94c53a (diff)
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 <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/pci/pci_event.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index 65ea105f68a..7fc4c2c5708 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -102,8 +102,12 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
break;
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);
+ }
zpci_disable_device(zdev);
zdev->state = ZPCI_FN_STATE_STANDBY;