diff options
author | scottl <scottl@FreeBSD.org> | 2004-02-28 19:14:41 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-02-28 19:14:41 +0000 |
commit | 8337abed61d36809d4e921ce64a0699fc8e1f990 (patch) | |
tree | 9838032cf77c78cc90c2abba229573c0ab89c327 /sys/dev/ips/ips_pci.c | |
parent | 77d85757b823f55de35091e53a0706351d358805 (diff) | |
download | FreeBSD-src-8337abed61d36809d4e921ce64a0699fc8e1f990.zip FreeBSD-src-8337abed61d36809d4e921ce64a0699fc8e1f990.tar.gz |
Switch from using mutexes to using semaphores to protect against early
completion of synchronous commands. Also switch to a per-array bioq as it
appears to improve performance.
Submitted by: mbr, imp.ch (bioq change)
Diffstat (limited to 'sys/dev/ips/ips_pci.c')
-rw-r--r-- | sys/dev/ips/ips_pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c index 1981e28..c4a2db3 100644 --- a/sys/dev/ips/ips_pci.c +++ b/sys/dev/ips/ips_pci.c @@ -135,6 +135,8 @@ static int ips_pci_attach(device_t dev) } sc->ips_ich.ich_func = ips_intrhook; sc->ips_ich.ich_arg = sc; + mtx_init(&sc->queue_mtx, "IPS bioqueue lock", MTX_DEF, 0); + bioq_init(&sc->queue); if (config_intrhook_establish(&sc->ips_ich) != 0) { printf("IPS can't establish configuration hook\n"); goto error; @@ -182,7 +184,7 @@ static int ips_pci_detach(device_t dev) if(ips_adapter_free(sc)) return EBUSY; ips_pci_free(sc); - mtx_destroy(&sc->cmd_mtx); + bioq_flush(&sc->queue, NULL, ENXIO); } return 0; } |