mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Add an identify method to allow npx to arrange itself to be attached to
the nexus without explicit code in the nexus to do so.
This commit is contained in:
parent
7fa76d3a80
commit
da4113b31f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50181
@ -32,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.74 1999/07/25 13:16:09 cracauer Exp $
|
||||
* $Id: npx.c,v 1.75 1999/07/26 05:47:31 cracauer Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -123,6 +123,7 @@ typedef u_char bool_t;
|
||||
|
||||
static int npx_attach __P((device_t dev));
|
||||
void npx_intr __P((void *));
|
||||
static void npx_identify __P((driver_t *driver, device_t parent));
|
||||
static int npx_probe __P((device_t dev));
|
||||
static int npx_probe1 __P((device_t dev));
|
||||
#ifdef I586_CPU
|
||||
@ -186,6 +187,21 @@ __asm(" \n\
|
||||
");
|
||||
#endif /* SMP */
|
||||
|
||||
/*
|
||||
* Identify routine. Create a connection point on our parent for probing.
|
||||
*/
|
||||
static void
|
||||
npx_identify(driver, parent)
|
||||
driver_t *driver;
|
||||
device_t parent;
|
||||
{
|
||||
device_t child;
|
||||
|
||||
child = BUS_ADD_CHILD(parent, 0, "npx", 0);
|
||||
if (child == NULL)
|
||||
panic("npx_identify");
|
||||
}
|
||||
|
||||
/*
|
||||
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
|
||||
* whether the device exists or not (XXX should be elsewhere). Set flags
|
||||
@ -888,6 +904,7 @@ timezero(funcname, func)
|
||||
|
||||
static device_method_t npx_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_identify, npx_identify),
|
||||
DEVMETHOD(device_probe, npx_probe),
|
||||
DEVMETHOD(device_attach, npx_attach),
|
||||
DEVMETHOD(device_detach, bus_generic_detach),
|
||||
|
@ -32,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.74 1999/07/25 13:16:09 cracauer Exp $
|
||||
* $Id: npx.c,v 1.75 1999/07/26 05:47:31 cracauer Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -123,6 +123,7 @@ typedef u_char bool_t;
|
||||
|
||||
static int npx_attach __P((device_t dev));
|
||||
void npx_intr __P((void *));
|
||||
static void npx_identify __P((driver_t *driver, device_t parent));
|
||||
static int npx_probe __P((device_t dev));
|
||||
static int npx_probe1 __P((device_t dev));
|
||||
#ifdef I586_CPU
|
||||
@ -186,6 +187,21 @@ __asm(" \n\
|
||||
");
|
||||
#endif /* SMP */
|
||||
|
||||
/*
|
||||
* Identify routine. Create a connection point on our parent for probing.
|
||||
*/
|
||||
static void
|
||||
npx_identify(driver, parent)
|
||||
driver_t *driver;
|
||||
device_t parent;
|
||||
{
|
||||
device_t child;
|
||||
|
||||
child = BUS_ADD_CHILD(parent, 0, "npx", 0);
|
||||
if (child == NULL)
|
||||
panic("npx_identify");
|
||||
}
|
||||
|
||||
/*
|
||||
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
|
||||
* whether the device exists or not (XXX should be elsewhere). Set flags
|
||||
@ -888,6 +904,7 @@ timezero(funcname, func)
|
||||
|
||||
static device_method_t npx_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_identify, npx_identify),
|
||||
DEVMETHOD(device_probe, npx_probe),
|
||||
DEVMETHOD(device_attach, npx_attach),
|
||||
DEVMETHOD(device_detach, bus_generic_detach),
|
||||
|
@ -32,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.74 1999/07/25 13:16:09 cracauer Exp $
|
||||
* $Id: npx.c,v 1.75 1999/07/26 05:47:31 cracauer Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -123,6 +123,7 @@ typedef u_char bool_t;
|
||||
|
||||
static int npx_attach __P((device_t dev));
|
||||
void npx_intr __P((void *));
|
||||
static void npx_identify __P((driver_t *driver, device_t parent));
|
||||
static int npx_probe __P((device_t dev));
|
||||
static int npx_probe1 __P((device_t dev));
|
||||
#ifdef I586_CPU
|
||||
@ -186,6 +187,21 @@ __asm(" \n\
|
||||
");
|
||||
#endif /* SMP */
|
||||
|
||||
/*
|
||||
* Identify routine. Create a connection point on our parent for probing.
|
||||
*/
|
||||
static void
|
||||
npx_identify(driver, parent)
|
||||
driver_t *driver;
|
||||
device_t parent;
|
||||
{
|
||||
device_t child;
|
||||
|
||||
child = BUS_ADD_CHILD(parent, 0, "npx", 0);
|
||||
if (child == NULL)
|
||||
panic("npx_identify");
|
||||
}
|
||||
|
||||
/*
|
||||
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
|
||||
* whether the device exists or not (XXX should be elsewhere). Set flags
|
||||
@ -888,6 +904,7 @@ timezero(funcname, func)
|
||||
|
||||
static device_method_t npx_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_identify, npx_identify),
|
||||
DEVMETHOD(device_probe, npx_probe),
|
||||
DEVMETHOD(device_attach, npx_attach),
|
||||
DEVMETHOD(device_detach, bus_generic_detach),
|
||||
|
Loading…
Reference in New Issue
Block a user