Annotation of ntddk/src/scsi/qic117/pause.c, revision 1.1

1.1     ! root        1: /*++
        !             2: 
        !             3: Copyright (c) 1993 - Colorado Memory Systems, Inc.
        !             4: All Rights Reserved
        !             5: 
        !             6: Module Name:
        !             7: 
        !             8:     pause.c
        !             9: 
        !            10: Abstract:
        !            11: 
        !            12:     stops the tape and rewinds 3 blocks.
        !            13: 
        !            14: Revision History:
        !            15: 
        !            16: 
        !            17: 
        !            18: 
        !            19: --*/
        !            20: 
        !            21: //
        !            22: // include files
        !            23: //
        !            24: 
        !            25: #include <ntddk.h>                        // various NT definitions
        !            26: #include <ntdddisk.h>                    // disk device driver I/O control codes
        !            27: #include <ntiologc.h>
        !            28: #include "common.h"
        !            29: #include "drvtask.h"                     // this driver's data declarations
        !            30: #include "mt1defs.h"                     // this driver's data declarations
        !            31: #include "mt1strc.h"                     // this driver's data declarations
        !            32: #include "q117data.h"                    // this driver's data declarations
        !            33: 
        !            34: 
        !            35: STATUS
        !            36: Q117iPauseTape(
        !            37:     IN PTAPE_EXTENSION TapeExtension
        !            38:     )
        !            39: 
        !            40: /*++
        !            41: 
        !            42: Routine Description:
        !            43: 
        !            44:     Stop the tape by issuing a Pause command to the tape drive. The Pause
        !            45:     command will both stop the tape and rewind it back a few blocks.
        !            46: 
        !            47: Arguments:
        !            48: 
        !            49:     TapeExtension -
        !            50: 
        !            51: Return Value:
        !            52: 
        !            53: 
        !            54: 
        !            55: --*/
        !            56: 
        !            57: {
        !            58:     STATUS retval = NoErr;
        !            59: 
        !            60:     if ((retval = Q117iSendByte(TapeExtension, Pause)) == NoErr) {
        !            61: 
        !            62:         if ((retval = Q117iWaitCommandComplete(TapeExtension, mt_wt016s)) == NoErr) {
        !            63:             
        !            64:             TapeExtension->TapePosition.LogFwd = FALSE;
        !            65: 
        !            66:         }
        !            67:     }
        !            68: 
        !            69:     if (retval == TimeOut) {
        !            70:         
        !            71:         if((retval = Q117iSendByte(TapeExtension, Pause)) == NoErr) {
        !            72: 
        !            73:             if ((retval = Q117iWaitCommandComplete(TapeExtension, mt_wt016s)) == NoErr) {
        !            74:                 
        !            75:                 TapeExtension->TapePosition.LogFwd = FALSE;
        !            76: 
        !            77:             }
        !            78:         }
        !            79: 
        !            80:     }
        !            81: 
        !            82:     Q117iDLockUnlockDMA(TapeExtension, FALSE);
        !            83: 
        !            84: 
        !            85:     return(retval);
        !            86: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.