Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Add pmf_device_register().
details: https://anonhg.NetBSD.org/src/rev/af805e18a987
branches: trunk
changeset: 989088:af805e18a987
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Oct 11 15:08:17 2021 +0000
description:
Add pmf_device_register().
diffstat:
sys/dev/pci/if_aq.c | 9 +++++++--
sys/dev/pci/if_rge.c | 9 +++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (60 lines):
diff -r 334a87b7cf06 -r af805e18a987 sys/dev/pci/if_aq.c
--- a/sys/dev/pci/if_aq.c Mon Oct 11 14:36:05 2021 +0000
+++ b/sys/dev/pci/if_aq.c Mon Oct 11 15:08:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aq.c,v 1.28 2021/10/05 14:18:17 ryo Exp $ */
+/* $NetBSD: if_aq.c,v 1.29 2021/10/11 15:08:17 msaitoh Exp $ */
/**
* aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.28 2021/10/05 14:18:17 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.29 2021/10/11 15:08:17 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_if_aq.h"
@@ -1530,6 +1530,11 @@
AQ_EVCNT_ATTACH_MISC(sc, cprc, "RX coalesced packet");
#endif
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
+ aprint_error_dev(self, "couldn't establish power handler\n");
+
return;
attach_failure:
diff -r 334a87b7cf06 -r af805e18a987 sys/dev/pci/if_rge.c
--- a/sys/dev/pci/if_rge.c Mon Oct 11 14:36:05 2021 +0000
+++ b/sys/dev/pci/if_rge.c Mon Oct 11 15:08:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rge.c,v 1.19 2021/05/08 00:27:02 thorpej Exp $ */
+/* $NetBSD: if_rge.c,v 1.20 2021/10/11 15:10:19 msaitoh Exp $ */
/* $OpenBSD: if_rge.c,v 1.9 2020/12/12 11:48:53 jan Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.19 2021/05/08 00:27:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.20 2021/10/11 15:10:19 msaitoh Exp $");
#include <sys/types.h>
@@ -352,6 +352,11 @@
if_attach(ifp);
ether_ifattach(ifp, eaddr);
+
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
+ aprint_error_dev(self, "couldn't establish power handler\n");
}
int
Home |
Main Index |
Thread Index |
Old Index