Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ send(D2I) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       send(D2I)                                                  send(D2I)


       NAME
             send - queue a request for Host Bus Adapter

       SYNOPSIS
             long prefixsend(struct hbadata *hbap, int flag);

          Arguments
             hbap  A pointer to the device-specific request block defining
                   the request to be queued.

             flag  Indicates whether the request may sleep or not, and is
                   set to either KM_SLEEP or KM_NOSLEEP.

       DESCRIPTION
             This entry point is for Host Bus Adapter (HBA) drivers.
             send(D2I) queues requests for HBAs, and generally is used for
             every request.  After the target driver has entered the
             pointer to the SCSI command block in the device-specific
             request block (previously allocated by the getblk(D2I)
             routine), it calls sdi_send(D3I), which invokes the
             appropriate HBA-specific send routine.  The target driver has
             no awareness of the HBA request block.

          Return Values
             On success, send returns SDI_RET_OK.  On failure, it returns
             SDI_RET_ERR.  For a request retry, it returns SDI_RET_RETRY.

       USAGE
             Each HBA send routine should be capable of handling an
             unlimited number of send requests and can choose to either
             send or queue the request, depending on the current state of
             the hardware.  Rather than requiring target drivers to know
             how many requests an HBA can handle under the best of
             conditions, the target drivers typically provide no queuing
             and send down all possible requests.  The HBA driver should
             have a simple and fast queue mechanism, while maintaining the
             optimum number of active jobs at the controller.  With this
             scheme, the HBA driver can achieve the maximum throughput from
             the HBA hardware.

             The argument passed to this routine is a struct hbadata *.  If
             the HBA hardware supports scatter-gather or programmed-I/O,
             merging requests should be attempted while queuing the
             request.  As would be expected, if no requests are currently
             pending, or if the optimum number of active requests has not
             been reached, the request being sent to the HBA driver should


                           Copyright 1994 Novell, Inc.               Page 1













      send(D2I)                                                  send(D2I)


            be started immediately.

         Warnings
            Sequential access devices, such as tape drivers, must process
            jobs on a first-come/first-served basis.  To do otherwise
            risks data corruption.

         Level
            Base only.

      REFERENCES
            getblk(D2I), sdi_send(D3I)

      NOTICES
         Applicability
            sdi: 1, 2
































                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026