DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

mdi_hw_suspended(D3mdi)


mdi_hw_suspended -- notify dlpi module that hardware is suspended

Synopsis

   #include <sys/types.h>
   #include <sys/stream.h>
   #include <sys/mdi.h>
   #include <sys/confmgr.h>
   #include <sys/ddi.h>
   

int mdi_hw_suspended(queue_t *q, rm_key_t rmkey);

Description

mdi_hw_suspended( ) notifies the dlpi module that the hardware has been suspended.

Arguments


q
pointer to the upstream queue to the dlpi module.

rmkey
affected resource manager key.

Return values

mdi_hw_suspended( ) returns 0 on success, or an appropriate error number from those listed on the errnos(D5) manual page.

Usage

This function is used in the CFG_SUSPEND subfunction to the config(D2mdi) entry point for hotplug-aware MDI drivers.

Context and synchronization

Blockable or interrupt context.

Driver-defined basic locks, read/write locks, and sleep locks may not be held across calls to this function.

The caller cannot have the stream frozen (see freezestr(D3str)) when calling this function.

Hardware applicability

All

Version applicability

mdi: 2, 2.1

Differences between versions

This function is not supported in MDI on SCO OpenServer systems.

References

config(D2mdi), mdi_hw_resumed(D3mdi)

``Hotplug devices'' in HDK Technical Reference

Examples

   int
   e3Dconfig(cfg_func_t func, void *idata, rm_key_t rmkey)
   {
      int ret;
      e3Ddev_t *dev=idata;
   

switch(func) { case CFG_SUSPEND: /* tell whatever's above us (dlpi module, stream head) that * we're going to start dropping packets. config(D2) says we * should queue frames but that's not reasonable for STREAMS -- * we must drop. */ ASSERT(dev->rmkey == rmkey); /* if we've issued a MAC_BIND_REQ then send a suspend notice * up stack. We actually don't save the queue information in * our open routine so we don't have much of a choice here. * It also means that if we've opened up the card but not yet * issued the BIND_REQ then we'll fail any attempt at the * point we try to issue the BIND_REQ. */ if (dev->ex_up_queue) { if ((ret=mdi_hw_suspended(dev->ex_up_queue, rmkey)) != 0) { return(ret); } } else { /* suspending a driver that has been opened but * no BIND_REQ seen yet. don't call mdi_hw_suspended. */ } } }


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005