Module Name: src Committed By: msaitoh Date: Thu Feb 7 04:03:25 UTC 2019
Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix a bug that WOL didn't work on some chips since if_wm.c rev. 1.60. Set WUC_APME bit older than PCH. Will fixes PR kern/53945 reported by kardel@. Tested with my own 82574 card. To generate a diff of this commit: cvs rdiff -u -r1.624 -r1.625 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.624 src/sys/dev/pci/if_wm.c:1.625 --- src/sys/dev/pci/if_wm.c:1.624 Wed Feb 6 07:20:13 2019 +++ src/sys/dev/pci/if_wm.c Thu Feb 7 04:03:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.625 2019/02/07 04:03:24 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.625 2019/02/07 04:03:24 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -15028,7 +15028,7 @@ wm_enable_wakeup(struct wm_softc *sc) goto pme; } else { /* Enable wakeup by the MAC */ - CSR_WRITE(sc, WMREG_WUC, WUC_PME_EN); + CSR_WRITE(sc, WMREG_WUC, WUC_APME | WUC_PME_EN); CSR_WRITE(sc, WMREG_WUFC, WUFC_MAG); }