Probe for the SONIC before saying that we found it. Some early Centris
models (low-end) shipped without ethernet installed.
This commit is contained in:
parent
e3834cc351
commit
4220edeca5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sn_obio.c,v 1.11 1997/08/11 22:53:34 scottr Exp $ */
|
||||
/* $NetBSD: if_sn_obio.c,v 1.12 1997/10/09 00:08:00 briggs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Allen Briggs
|
||||
@ -74,10 +74,23 @@ sn_obio_match(parent, cf, aux)
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
if (mac68k_machine.sonic)
|
||||
return 1;
|
||||
struct obio_attach_args *oa = (struct obio_attach_args *)aux;
|
||||
bus_space_handle_t bsh;
|
||||
int found = 0;
|
||||
|
||||
return 0;
|
||||
if (!mac68k_machine.sonic)
|
||||
return 0;
|
||||
|
||||
if (bus_space_map(oa->oa_tag,
|
||||
SONIC_REG_BASE, SN_REGSIZE, 0, &bsh))
|
||||
return 0;
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 4))
|
||||
found = 1;
|
||||
|
||||
bus_space_unmap(oa->oa_tag, bsh, SN_REGSIZE);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sn_obio.c,v 1.11 1997/08/11 22:53:34 scottr Exp $ */
|
||||
/* $NetBSD: if_sn_obio.c,v 1.12 1997/10/09 00:08:00 briggs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Allen Briggs
|
||||
@ -74,10 +74,23 @@ sn_obio_match(parent, cf, aux)
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
if (mac68k_machine.sonic)
|
||||
return 1;
|
||||
struct obio_attach_args *oa = (struct obio_attach_args *)aux;
|
||||
bus_space_handle_t bsh;
|
||||
int found = 0;
|
||||
|
||||
return 0;
|
||||
if (!mac68k_machine.sonic)
|
||||
return 0;
|
||||
|
||||
if (bus_space_map(oa->oa_tag,
|
||||
SONIC_REG_BASE, SN_REGSIZE, 0, &bsh))
|
||||
return 0;
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 4))
|
||||
found = 1;
|
||||
|
||||
bus_space_unmap(oa->oa_tag, bsh, SN_REGSIZE);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user