Fix a long-standing bug uncovered by the new device attachment
model. Thanks to Jason Thorpe for the fix (fixed PR 2235).
This commit is contained in:
parent
9f01fb5000
commit
0b59005d3d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mac68k5380.c,v 1.20 1996/03/17 01:33:29 thorpej Exp $ */
|
||||
/* $NetBSD: mac68k5380.c,v 1.21 1996/03/20 05:15:50 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Allen Briggs
|
||||
@ -190,13 +190,13 @@ machine_match(pdp, match, auxp, cd)
|
||||
void *match, *auxp;
|
||||
struct cfdriver *cd;
|
||||
{
|
||||
struct cfdata *cdp = match;
|
||||
struct device *self = match; /* XXX mainbus is "indirect" */
|
||||
|
||||
if (matchbyname(pdp, cdp, auxp) == 0)
|
||||
if (matchbyname(pdp, match, auxp) == 0)
|
||||
return 0;
|
||||
if (!mac68k_machine.scsi80)
|
||||
return 0;
|
||||
if (cdp->cf_unit != 0)
|
||||
if (self->dv_cfdata->cf_unit != 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ncr5380.c,v 1.23 1996/03/17 01:33:31 thorpej Exp $ */
|
||||
/* $NetBSD: ncr5380.c,v 1.24 1996/03/20 05:15:54 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -216,7 +216,7 @@ struct cfattach CANAME(DRNAME) = {
|
||||
};
|
||||
|
||||
struct cfdriver CFNAME(DRNAME) = {
|
||||
NULL, CFSTRING(DRNAME), DV_DULL, NULL, 0
|
||||
NULL, CFSTRING(DRNAME), DV_DULL
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ncr_sbc.c,v 1.3 1996/03/17 01:33:33 thorpej Exp $ */
|
||||
/* $NetBSD: ncr_sbc.c,v 1.4 1996/03/20 05:10:54 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Scott Reynolds
|
||||
@ -196,7 +196,7 @@ struct cfattach sbc_ca = {
|
||||
};
|
||||
|
||||
struct cfdriver sbc_cd = {
|
||||
NULL, sbc_name, DV_DULL, NULL, 0,
|
||||
NULL, sbc_name, DV_DULL
|
||||
};
|
||||
|
||||
|
||||
@ -211,18 +211,18 @@ sbc_print(aux, name)
|
||||
}
|
||||
|
||||
static int
|
||||
sbc_match(parent, vcf, args)
|
||||
sbc_match(parent, match, args)
|
||||
struct device *parent;
|
||||
void *vcf, *args;
|
||||
void *match, *args;
|
||||
{
|
||||
struct cfdata *cf = vcf;
|
||||
struct device *self = match; /* XXX mainbus is "indirect" */
|
||||
struct confargs *ca = args;
|
||||
|
||||
if (matchbyname(parent, cf, ca) == 0)
|
||||
if (matchbyname(parent, match, ca) == 0)
|
||||
return 0;
|
||||
if (!mac68k_machine.scsi80)
|
||||
return 0;
|
||||
if (cf->cf_unit != 0)
|
||||
if (self->dv_cfdata->cf_unit != 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user