summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_disk.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_disk.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_disk.c')
-rw-r--r--sys/dev/aac/aac_disk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 68692aa..668778d 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -135,12 +135,17 @@ aac_disk_open(dev_t dev, int flags, int fmt, d_thread_t *td)
sc = (struct aac_disk *)dev->si_drv1;
- if (sc == NULL)
+ if (sc == NULL) {
+ printf("aac_disk_open: No Softc\n");
return (ENXIO);
+ }
/* check that the controller is up and running */
- if (sc->ad_controller->aac_state & AAC_STATE_SUSPEND)
+ if (sc->ad_controller->aac_state & AAC_STATE_SUSPEND) {
+ printf("Controller Suspended controller state = 0x%x\n",
+ sc->ad_controller->aac_state);
return(ENXIO);
+ }
sc->ad_disk.d_sectorsize = AAC_BLOCK_SIZE;
sc->ad_disk.d_mediasize = (off_t)sc->ad_size * AAC_BLOCK_SIZE;
OpenPOWER on IntegriCloud