If the bus number has not been initialized, do not attach a cardslot, and
output a diagnostic: pccbbN: secondary bus number uninitialized; try PCIBIOS_BUS_FIXUP
This commit is contained in:
parent
9d70547685
commit
1925108989
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pccbb.c,v 1.97 2004/04/23 21:13:06 itojun Exp $ */
|
||||
/* $NetBSD: pccbb.c,v 1.98 2004/07/22 16:39:51 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 and 2000
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.97 2004/04/23 21:13:06 itojun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.98 2004/07/22 16:39:51 mycroft Exp $");
|
||||
|
||||
/*
|
||||
#define CBB_DEBUG
|
||||
|
@ -520,18 +520,7 @@ pccbbattach(parent, self, aux)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* When bus number isn't set correctly, give up using 32-bit CardBus
|
||||
* mode.
|
||||
*/
|
||||
busreg = pci_conf_read(pc, pa->pa_tag, PCI_BUSNUM);
|
||||
#if notyet
|
||||
if (((busreg >> 8) & 0xff) == 0) {
|
||||
printf("%s: CardBus support disabled because of unconfigured bus number\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
flags |= PCCBB_PCMCIA_16BITONLY;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* pccbb_machdep.c end */
|
||||
|
||||
|
@ -693,7 +682,7 @@ pccbb_pci_callback(self)
|
|||
/*
|
||||
* attach cardbus
|
||||
*/
|
||||
if (!(sc->sc_pcmcia_flags & PCCBB_PCMCIA_16BITONLY)) {
|
||||
{
|
||||
pcireg_t busreg = pci_conf_read(pc, sc->sc_tag, PCI_BUSNUM);
|
||||
pcireg_t bhlc = pci_conf_read(pc, sc->sc_tag, PCI_BHLC_REG);
|
||||
|
||||
|
@ -730,9 +719,10 @@ pccbb_pci_callback(self)
|
|||
|
||||
pccbb_pcmcia_attach_setup(sc, &paa);
|
||||
caa.caa_cb_attach = NULL;
|
||||
if (!(sc->sc_pcmcia_flags & PCCBB_PCMCIA_16BITONLY)) {
|
||||
if (cba.cba_bus == 0)
|
||||
printf("%s: secondary bus number uninitialized; try PCIBIOS_BUS_FIXUP\n", sc->sc_dev.dv_xname);
|
||||
else
|
||||
caa.caa_cb_attach = &cba;
|
||||
}
|
||||
caa.caa_16_attach = &paa;
|
||||
caa.caa_ph = &sc->sc_pcmcia_h;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pccbbvar.h,v 1.20 2003/12/10 02:55:48 briggs Exp $ */
|
||||
/* $NetBSD: pccbbvar.h,v 1.21 2004/07/22 16:39:51 mycroft Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 HAYAKAWA Koichi. All rights reserved.
|
||||
*
|
||||
|
@ -154,7 +154,6 @@ struct pccbb_softc {
|
|||
int sc_pcmcia_flags;
|
||||
#define PCCBB_PCMCIA_IO_RELOC 0x01 /* IO addr relocatable stuff exists */
|
||||
#define PCCBB_PCMCIA_MEM_32 0x02 /* 32-bit memory address ready */
|
||||
#define PCCBB_PCMCIA_16BITONLY 0x04 /* 32-bit mode disable */
|
||||
|
||||
struct proc *sc_event_thread;
|
||||
SIMPLEQ_HEAD(, pcic_event) sc_events;
|
||||
|
|
Loading…
Reference in New Issue