Date: Sat, 18 Nov 2006 18:20:21 GMT From: Stepan Zastupov <redchrom@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/104652: [bfe] [patch] add non-completed suspend/resume support for the bfe driver Message-ID: <200611181820.kAIIKL5F087608@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/104652; it has been noted by GNATS. From: Stepan Zastupov <redchrom@gmail.com> To: bug-followup@FreeBSD.org, John Baldwin <john@baldwin.cx> Cc: Subject: Re: kern/104652: [bfe] [patch] add non-completed suspend/resume support for the bfe driver Date: Sun, 19 Nov 2006 01:53:50 +0800 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In the attachment more clean patch which really works if devd stoped. -- Best regards, Stepan Zastupov aka RedChrom ISPSystem --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="bfe.diff" --- if_bfe.c.orig Sun Nov 19 01:43:14 2006 +++ if_bfe.c Sun Nov 19 01:48:18 2006 @@ -97,6 +97,8 @@ static void bfe_stop (struct bfe_softc *); static void bfe_watchdog (struct ifnet *); static void bfe_shutdown (device_t); +static int bfe_suspend (device_t); +static int bfe_resume (device_t); static void bfe_tick (void *); static void bfe_txeof (struct bfe_softc *); static void bfe_rxeof (struct bfe_softc *); @@ -136,6 +138,8 @@ DEVMETHOD(device_attach, bfe_attach), DEVMETHOD(device_detach, bfe_detach), DEVMETHOD(device_shutdown, bfe_shutdown), + DEVMETHOD(device_suspend, bfe_suspend), + DEVMETHOD(device_resume, bfe_resume), /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), @@ -477,6 +481,18 @@ BFE_UNLOCK(sc); return; +} + +static int +bfe_suspend(device_t dev) +{ + return bfe_detach(dev); +} + +static int +bfe_resume(device_t dev) +{ + return bfe_attach(dev); } static int --7JfCtLOvnd9MIVvH--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611181820.kAIIKL5F087608>