s390/pci: add zpci_report_error interface
The 'report_error' interface for PCI devices found on s390 can be used by a user space program to inject an adapter error notification. Add a new kernel interface zpci_report_error to allow a PCI device driver to inject these error notifications without a detour over user space. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -854,6 +854,15 @@ void zpci_stop_device(struct zpci_dev *zdev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(zpci_stop_device);
|
||||
|
||||
int zpci_report_error(struct pci_dev *pdev,
|
||||
struct zpci_report_error_header *report)
|
||||
{
|
||||
struct zpci_dev *zdev = to_zpci(pdev);
|
||||
|
||||
return sclp_pci_report(report, zdev->fh, zdev->fid);
|
||||
}
|
||||
EXPORT_SYMBOL(zpci_report_error);
|
||||
|
||||
static inline int barsize(u8 size)
|
||||
{
|
||||
return (size) ? (1 << size) >> 10 : 0;
|
||||
|
Reference in New Issue
Block a user