summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_debug.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-01-11 01:59:21 +0000
committerscottl <scottl@FreeBSD.org>2003-01-11 01:59:21 +0000
commit4aa40a12f56d9164ca352b3652c32aa687b6265f (patch)
treeba264515156bed4dd0eeda60d385bb22213cea8b /sys/dev/aac/aac_debug.c
parent7060fb8de0e3d82d1352b6ba4c60da0059ec8837 (diff)
downloadFreeBSD-src-4aa40a12f56d9164ca352b3652c32aa687b6265f.zip
FreeBSD-src-4aa40a12f56d9164ca352b3652c32aa687b6265f.tar.gz
Major bugfixes for large memory and fast systems.
aac.c: Re-arrange the interrupt handler to optimize the common case of the adapter interrupting us because one or more commands are complete, and do a read across the pci bus to ensure that all posted status writes are flushed. This should close a race that could cause command completion interrupts to be lost. Follow the spec a bit closer when filling out command structures. Enable the Fast Response feature to eliminate the need for the card to DMA successfull command completions back into host memory. Tell the controller how much physical memory we have. Without this there was a chance that our DMA regions would collide with the memory window used by the cache on the controller. The result would be massive data corruption. This seemed to mainly affect systems with >2GB of memory. Fix a few whitespace problems. aac_debug.c: Add an extra diagnostic when printing out commands. aac_disk.c: Add extra sanity checks. aacreg.h: Prepare for making this 64-bit clean by reducing the use of enumeration types in structures. Many thanks to Justin Gibbs for helping track these down.
Diffstat (limited to 'sys/dev/aac/aac_debug.c')
-rw-r--r--sys/dev/aac/aac_debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/aac/aac_debug.c b/sys/dev/aac/aac_debug.c
index 3a71318..36cfa4f 100644
--- a/sys/dev/aac/aac_debug.c
+++ b/sys/dev/aac/aac_debug.c
@@ -185,6 +185,11 @@ aac_panic(struct aac_softc *sc, char *reason)
void
aac_print_fib(struct aac_softc *sc, struct aac_fib *fib, const char *caller)
{
+ if (fib == NULL) {
+ device_printf(sc->aac_dev,
+ "aac_print_fib called with NULL fib\n");
+ return;
+ }
device_printf(sc->aac_dev, "%s: FIB @ %p\n", caller, fib);
device_printf(sc->aac_dev, " XferState %b\n", fib->Header.XferState,
"\20"
OpenPOWER on IntegriCloud