File:  [WindowsNT SDKs] / ntddk / src / scsi / qic117 / pause.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:31:12 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntddk-nov-1993, HEAD
Microsoft Windows NT Build 511 (DDK SDK) 11-01-1993

/*++

Copyright (c) 1993 - Colorado Memory Systems, Inc.
All Rights Reserved

Module Name:

    pause.c

Abstract:

    stops the tape and rewinds 3 blocks.

Revision History:




--*/

//
// include files
//

#include <ntddk.h>                        // various NT definitions
#include <ntdddisk.h>                    // disk device driver I/O control codes
#include <ntiologc.h>
#include "common.h"
#include "drvtask.h"                     // this driver's data declarations
#include "mt1defs.h"                     // this driver's data declarations
#include "mt1strc.h"                     // this driver's data declarations
#include "q117data.h"                    // this driver's data declarations


STATUS
Q117iPauseTape(
    IN PTAPE_EXTENSION TapeExtension
    )

/*++

Routine Description:

    Stop the tape by issuing a Pause command to the tape drive. The Pause
    command will both stop the tape and rewind it back a few blocks.

Arguments:

    TapeExtension -

Return Value:



--*/

{
    STATUS retval = NoErr;

    if ((retval = Q117iSendByte(TapeExtension, Pause)) == NoErr) {

        if ((retval = Q117iWaitCommandComplete(TapeExtension, mt_wt016s)) == NoErr) {
            
            TapeExtension->TapePosition.LogFwd = FALSE;

        }
    }

    if (retval == TimeOut) {
        
        if((retval = Q117iSendByte(TapeExtension, Pause)) == NoErr) {

            if ((retval = Q117iWaitCommandComplete(TapeExtension, mt_wt016s)) == NoErr) {
                
                TapeExtension->TapePosition.LogFwd = FALSE;

            }
        }

    }

    Q117iDLockUnlockDMA(TapeExtension, FALSE);


    return(retval);
}

unix.superglobalmegacorp.com

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