Skip to content

Commit

Permalink
s390/pci: set error state for unusable functions
Browse files Browse the repository at this point in the history
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 <alexschm@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Jan 26, 2016
1 parent c0cabad commit 8ead7ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/s390/pci/pci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8ead7ef

Please sign in to comment.