]> Git Repo - linux.git/commitdiff
s390/pci: set error state for unusable functions
authorSebastian Ott <[email protected]>
Fri, 22 Jan 2016 13:04:18 +0000 (14:04 +0100)
committerMartin Schwidefsky <[email protected]>
Tue, 26 Jan 2016 11:46:28 +0000 (12:46 +0100)
We receive special notifications from firmware when an error was detected
and a pci function became unusable. Set the error_state accordingly to give
device drivers a hint that they don't need to try error recovery.

Suggested-by: Alexander Schmidt <[email protected]>
Signed-off-by: Sebastian Ott <[email protected]>
Reviewed-by: Gerald Schaefer <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
arch/s390/pci/pci_event.c

index 369a3e05d468dbf1973df24c77e4ae07e580c3b6..b0e04751c5d599fbdbb4bdb68fdbed5dcb4039d5 100644 (file)
@@ -53,6 +53,11 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
 
        pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n",
               pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid);
+
+       if (!pdev)
+               return;
+
+       pdev->error_state = pci_channel_io_perm_failure;
 }
 
 void zpci_event_error(void *data)
This page took 0.057043 seconds and 4 git commands to generate.