diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-07-06 07:18:19 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-07-06 07:18:19 +0000 |
commit | fd9d325d7abe216efd49db531c0f68af097fc940 (patch) | |
tree | 7133cecc347cc588f5a334a2e9f921cddd15fa71 /sys/dev/ic/mpivar.h | |
parent | 32835cbe3ad31fcb9a9111a9c4949497ddf84aaf (diff) |
if we get an event notification that requires acknowledgement while
we're busy, we might not be able to allocate a ccb via scsi_ioh_get
if the pool is empty. this means we wont ack the event, which in
turn means we wont receive further event notifications.
this cuts the event ack code over to using a scsi_iohandler. the
eventack iohandler will be called as soon as a ccb becomes available
for it to use. this guarantees reliable event handling and
acknowledgement, despite how busy the controller might be.
this has bugging me ever since i wrote the event handling code.
tested by hotplugging sata disks.
Diffstat (limited to 'sys/dev/ic/mpivar.h')
-rw-r--r-- | sys/dev/ic/mpivar.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h index b5e43f0251d..eed69bfe6e5 100644 --- a/sys/dev/ic/mpivar.h +++ b/sys/dev/ic/mpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpivar.h,v 1.31 2010/04/06 01:24:43 dlg Exp $ */ +/* $OpenBSD: mpivar.h,v 1.32 2010/07/06 07:18:18 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -134,6 +134,7 @@ struct mpi_softc { int sc_repq; struct mpi_ccb *sc_evt_ccb; + struct scsi_iohandler sc_evt_ack; size_t sc_fw_len; struct mpi_dmamem *sc_fw; |