|
@@ -43,9 +43,8 @@ struct zpci_ccdf_avail {
|
|
|
u16 pec; /* PCI event code */
|
|
|
} __packed;
|
|
|
|
|
|
-void zpci_event_error(void *data)
|
|
|
+static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
|
|
|
{
|
|
|
- struct zpci_ccdf_err *ccdf = data;
|
|
|
struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
|
|
|
|
|
|
zpci_err("error CCDF:\n");
|
|
@@ -58,9 +57,14 @@ void zpci_event_error(void *data)
|
|
|
pci_name(zdev->pdev), ccdf->pec, ccdf->fid);
|
|
|
}
|
|
|
|
|
|
-void zpci_event_availability(void *data)
|
|
|
+void zpci_event_error(void *data)
|
|
|
+{
|
|
|
+ if (zpci_is_enabled())
|
|
|
+ __zpci_event_error(data);
|
|
|
+}
|
|
|
+
|
|
|
+static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
|
|
|
{
|
|
|
- struct zpci_ccdf_avail *ccdf = data;
|
|
|
struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
|
|
|
struct pci_dev *pdev = zdev ? zdev->pdev : NULL;
|
|
|
int ret;
|
|
@@ -115,3 +119,9 @@ void zpci_event_availability(void *data)
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+void zpci_event_availability(void *data)
|
|
|
+{
|
|
|
+ if (zpci_is_enabled())
|
|
|
+ __zpci_event_availability(data);
|
|
|
+}
|