kern/104652: [bfe] [patch] add non-completed suspend/resume support for the bfe driver

Stepan Zastupov redchrom at gmail.com
Sat Nov 18 18:20:30 UTC 2006


The following reply was made to PR kern/104652; it has been noted by GNATS.

From: Stepan Zastupov <redchrom at gmail.com>
To: bug-followup at FreeBSD.org, John Baldwin <john at 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--


More information about the freebsd-bugs mailing list