diff options
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; } |