Properly clear any latched errors before re-enabling SERR/PERR for PCI-X

in ahd_reset().
This commit is contained in:
briggs 2003-10-10 15:02:08 +00:00
parent 0dbe439e05
commit 85edb66218

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic79xx.c,v 1.23 2003/09/30 12:34:16 briggs Exp $ */
/* $NetBSD: aic79xx.c,v 1.24 2003/10/10 15:02:08 briggs Exp $ */
/*
* Core routines and tables shareable across OS platforms.
@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.23 2003/09/30 12:34:16 briggs Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.24 2003/10/10 15:02:08 briggs Exp $");
#include <dev/ic/aic79xx_osm.h>
#include <dev/ic/aic79xx_inline.h>
@ -5305,7 +5305,10 @@ ahd_reset(struct ahd_softc *ahd, int reinit)
* Clear any latched PCI error status and restore
* previous SERR and PERR response enables.
*/
pci_conf_write(bd->pc, bd->tag, PCI_COMMAND_STATUS_REG, 0xFF);
pci_conf_write(bd->pc, bd->tag, PCI_COMMAND_STATUS_REG,
(PCI_STATUS_PARITY_ERROR | PCI_STATUS_TARGET_TARGET_ABORT |
PCI_STATUS_MASTER_TARGET_ABORT | PCI_STATUS_MASTER_ABORT |
PCI_STATUS_SPECIAL_ERROR));
pci_conf_write(bd->pc, bd->tag, PCI_COMMAND_STATUS_REG, cmd);
}