Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 2004 21:23:10 -0700 (PDT)
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 53716 for review
Message-ID:  <200405290423.i4T4NAqp073505@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53716

Change 53716 by scottl@scottl-esp-sparc64 on 2004/05/28 21:22:13

	Add default dummy functions for suspend, resume, and attach.

Affected files ...

.. //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#8 edit

Differences ...

==== //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#8 (text+ko) ====

@@ -89,15 +89,16 @@
 
 static int	esp_sbus_probe(device_t);
 static int	esp_sbus_attach(device_t);
+static int	esp_sbus_detach(device_t);
+static int	esp_sbus_suspend(device_t);
+static int	esp_sbus_resume(device_t);
 
 static device_method_t esp_sbus_methods[] = {
 	DEVMETHOD(device_probe,		esp_sbus_probe),
 	DEVMETHOD(device_attach,	esp_sbus_attach),
-#if 0
-	DEVMETHOD(device_detach,	espdetach_sbus),
-	DEVMETHOD(device_suspend,	espsuspend_sbus),
-	DEVMETHOD(device_resume,	espresume_sbus),
-#endif
+	DEVMETHOD(device_detach,	esp_sbus_detach),
+	DEVMETHOD(device_suspend,	esp_sbus_suspend),
+	DEVMETHOD(device_resume,	esp_sbus_resume),
 	{0, 0}
 };
 
@@ -238,6 +239,29 @@
 	return (0);
 }
 
+static int
+esp_sbus_detach(device_t dev)
+{
+	struct ncr53c9x_softc *sc;
+	struct esp_softc *esc;
+
+	esc = device_get_softc(dev);
+	sc = &esc->sc_ncr53c9x;
+	return (ncr53c9x_detach(sc, 0));
+}
+
+static int
+esp_sbus_suspend(device_t dev)
+{
+	return (ENXIO);
+}
+
+static int
+esp_sbus_resume(device_t dev)
+{
+	return (ENXIO);
+}
+
 /*
  * Attach this instance, and then all the sub-devices
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405290423.i4T4NAqp073505>