diff options
author | scottl <scottl@FreeBSD.org> | 2003-12-03 15:42:12 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-12-03 15:42:12 +0000 |
commit | 93b40022fb849da58d60a21b53f256c0e5035878 (patch) | |
tree | 86e0d642e22a5f6a41adf095432714155cbc76e8 /sys | |
parent | 86b39578a029a1416e670091ec4d0c788f8be2fc (diff) | |
download | FreeBSD-src-93b40022fb849da58d60a21b53f256c0e5035878.zip FreeBSD-src-93b40022fb849da58d60a21b53f256c0e5035878.tar.gz |
Temporary workaround for aac_cam to deal with CAM requiring Giant. This
should fix the panics on boot with newer Adaptec RAID cards.
Approved by: re (rwatson)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/aac/aac_cam.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c index 3efc063..018fde0 100644 --- a/sys/dev/aac/aac_cam.c +++ b/sys/dev/aac/aac_cam.c @@ -116,11 +116,15 @@ aac_cam_detach(device_t dev) camsc = (struct aac_cam *)device_get_softc(dev); + mtx_lock(&Giant); + xpt_async(AC_LOST_DEVICE, camsc->path, NULL); xpt_free_path(camsc->path); xpt_bus_deregister(cam_sim_path(camsc->sim)); cam_sim_free(camsc->sim, /*free_devq*/TRUE); - + + mtx_unlock(&Giant); + return (0); } @@ -491,7 +495,11 @@ aac_cam_complete(struct aac_command *cm) aac_release_command(cm); + AAC_LOCK_RELEASE(&sc->aac_io_lock); + mtx_lock(&Giant); xpt_done(ccb); + mtx_unlock(&Giant); + AAC_LOCK_ACQUIRE(&sc->aac_io_lock); return; } |