Code STREAMS drivers to ensure
that STREAMS resources are not monopolized
by a driver controlling a hardware device
that is malfunctioning.
Some network adapters fail to generate
a transmit complete interrupt
if the cable is not attached.
If the driver uses the transmit complete interrupt
to free the STREAMS message that has been sent
(which is required for adapters that use DMA
instead of shared RAM or programmed I/O),
then care must be taken to ensure
that the driver does not queue up all STREAMS messages
in the system waiting for transmit complete interrupts
that will never happen.
One way to avoid this problem is to use the
itimeout(D3)
or
timeout(D3oddi)
function to implement a watchdog timer routine
that runs every second or so
to free messages left around
as a result of missing transmit complete interrupts.