Clear the error flags in the LCA_IOC_STAT0 register after

machine_checks.
This fixes pci config reads for non existing devices on secondary
pci busses.

Thanks to Andrew Gallatin for pointing me to the register

Reviewed by:	gallatin
Approved by:	gallatin
This commit is contained in:
Bernd Walter 2002-04-17 13:57:50 +00:00
parent 2bdaf7e81c
commit dd516e0773

View File

@ -215,6 +215,10 @@ lca_init()
chipset = lca_chipset;
}
static void
lca_machine_check(unsigned long mces, struct trapframe *framep,
unsigned long vector, unsigned long param);
static int
lca_probe(device_t dev)
{
@ -226,6 +230,8 @@ lca_probe(device_t dev)
isa_init_intr();
lca_init_sgmap();
platform.mcheck_handler = lca_machine_check;
device_add_child(dev, "pcib", 0);
return 0;
@ -249,5 +255,17 @@ lca_attach(device_t dev)
return 0;
}
static void
lca_machine_check(unsigned long mces, struct trapframe *framep,
unsigned long vector, unsigned long param)
{
long stat0;
machine_check(mces, framep, vector, param);
/* clear error flags in IOC_STATUS0 register */
stat0 = REGVAL64(LCA_IOC_STAT0);
REGVAL64(LCA_IOC_STAT0) = stat0;
}
DRIVER_MODULE(lca, root, lca_driver, lca_devclass, 0, 0);