Annotation of ntddk/src/scsi/qic117/protos.h, revision 1.1.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:    protos.h
                      9: 
                     10: Abstract:
                     11: 
                     12:    Prototypes for internal functions of the High-Level portion (data
                     13:    formatter) of the QIC-117 device driver.
                     14: 
                     15: Revision History:
                     16: 
                     17: 
                     18: --*/
                     19: 
                     20: STATUS
                     21: q117Format(
                     22:    OUT LONG *NumberBad,
                     23:    IN UCHAR DoFormat,
                     24:    IN PQIC40_VENDOR_UNIQUE VendorUnique,
                     25:    IN OUT PQ117_CONTEXT Context
                     26:    );
                     27: 
                     28: STATUS
                     29: q117ReqIO(
                     30:    IN PIO_REQUEST IoRequest,
                     31:    IN PSEGMENT_BUFFER BufferInfo,
                     32:    IN PQ117_CONTEXT Context
                     33:    );
                     34: 
                     35: STATUS
                     36: q117WaitIO(
                     37:    IN PIO_REQUEST IoRequest,
                     38:    IN PQ117_CONTEXT Context
                     39:    );
                     40: 
                     41: STATUS
                     42: q117DoIO(
                     43:    IN PIO_REQUEST IoRequest,
                     44:    IN PSEGMENT_BUFFER BufferInfo,
                     45:    IN PQ117_CONTEXT Context
                     46:    );
                     47: 
                     48: STATUS
                     49: q117AbortIo(
                     50:    IN PQ117_CONTEXT Context,
                     51:    IN PKEVENT DoneEvent,
                     52:    IN PIO_STATUS_BLOCK IoStatus
                     53:    );
                     54: 
                     55: STATUS
                     56: q117AbortIoDone(
                     57:    IN PQ117_CONTEXT Context,
                     58:    IN PKEVENT DoneEvent
                     59:    );
                     60: 
                     61: STATUS
                     62: q117CheckDrive(
                     63:    IN PQ117_CONTEXT Context
                     64:    );
                     65: 
                     66: STATUS
                     67: q117DoCmd(
                     68:    IN OUT PIO_REQUEST IoRequest,
                     69:    IN CHAR Command,
                     70:    IN PVOID Data,
                     71:    IN PQ117_CONTEXT Context
                     72:    );
                     73: 
                     74: STATUS
                     75: q117EndRest(
                     76:    IN PQ117_CONTEXT Context
                     77:    );
                     78: 
                     79: STATUS
                     80: q117MapBadBlock (
                     81:    IN PIO_REQUEST IoRequest,
                     82:    OUT PVOID *DataPointer,
                     83:    IN OUT USHORT *BytesLeft,
                     84:    IN OUT SEGMENT *CurrentSegment,
                     85:    IN OUT USHORT *Remainder,
                     86:    IN OUT PQ117_CONTEXT Context
                     87:    );
                     88: 
                     89: STATUS
                     90: q117NewTrkRC(
                     91:    IN OUT PQ117_CONTEXT Context
                     92:    );
                     93: 
                     94: STATUS
                     95: q117SelectVol(
                     96:    IN PVOLUME_TABLE_ENTRY TheVolumeTable,
                     97:    IN PQ117_CONTEXT Context
                     98:    );
                     99: 
                    100: STATUS
                    101: q117UpdateHeader(
                    102:    IN PTAPE_HEADER Header,
                    103:    IN PQ117_CONTEXT Context
                    104:    );
                    105: 
                    106: STATUS
                    107: q117Update(
                    108:    IN OUT PQ117_CONTEXT Context
                    109:    );
                    110: 
                    111: STATUS
                    112: q117DoUpdateBad(
                    113:    IN OUT PQ117_CONTEXT Context
                    114:    );
                    115: 
                    116: STATUS
                    117: q117DoUpdateMarks(
                    118:    IN OUT PQ117_CONTEXT Context
                    119:    );
                    120: 
                    121: STATUS
                    122: q117GetMarks(
                    123:    IN OUT PQ117_CONTEXT Context
                    124:    );
                    125: 
                    126: STATUS
                    127: q117FillTapeBlocks(
                    128:    IN OUT DRIVER_COMMAND Command,
                    129:    IN SEGMENT CurrentSegment,
                    130:    IN SEGMENT EndSegment,
                    131:    IN OUT PVOID Buffer,
                    132:    IN SEGMENT FirstGood,
                    133:    IN SEGMENT SecondGood,
                    134:    IN PSEGMENT_BUFFER BufferInfo,
                    135:    IN PQ117_CONTEXT Context
                    136:    );
                    137: STATUS
                    138: q117IssIOReq(
                    139:    IN OUT PVOID Data,
                    140:    IN DRIVER_COMMAND Command,
                    141:    IN LONG Block,
                    142:    IN OUT PSEGMENT_BUFFER BufferInfo,
                    143:    IN OUT PQ117_CONTEXT Context
                    144:    );
                    145: 
                    146: BOOLEAN
                    147: q117QueueFull(
                    148:    IN PQ117_CONTEXT Context
                    149:    );
                    150: 
                    151: BOOLEAN
                    152: q117QueueEmpty(
                    153:    IN PQ117_CONTEXT Context
                    154:    );
                    155: 
                    156: PVOID
                    157: q117GetFreeBuffer(
                    158:    OUT PSEGMENT_BUFFER *BufferInfo,
                    159:    IN PQ117_CONTEXT Context
                    160:    );
                    161: 
                    162: PVOID
                    163: q117GetLastBuffer(
                    164:    IN PQ117_CONTEXT Context
                    165:    );
                    166: 
                    167: PIO_REQUEST
                    168: q117Dequeue(
                    169:    IN DEQUEUE_TYPE Type,
                    170:    IN OUT PQ117_CONTEXT Context
                    171:    );
                    172: 
                    173: VOID
                    174: q117ClearQueue(
                    175:    IN OUT PQ117_CONTEXT Context
                    176:    );
                    177: 
                    178: VOID
                    179: q117QueueSingle(
                    180:    IN OUT PQ117_CONTEXT Context
                    181:    );
                    182: 
                    183: VOID
                    184: q117QueueNormal(
                    185:    IN OUT PQ117_CONTEXT Context
                    186:    );
                    187: 
                    188: PIO_REQUEST
                    189: q117GetCurReq(
                    190:    IN PQ117_CONTEXT Context
                    191:    );
                    192: 
                    193: ULONG
                    194: q117GetQueueIndex(
                    195:    IN PQ117_CONTEXT Context
                    196:    );
                    197: 
                    198: VOID
                    199: q117SetQueueIndex(
                    200:    IN ULONG Index,
                    201:    OUT PQ117_CONTEXT Context
                    202:    );
                    203: 
                    204: STATUS
                    205: q117LoadTape (
                    206:    IN OUT PTAPE_HEADER*HeaderPointer,
                    207:    IN OUT PQ117_CONTEXT Context
                    208:    );
                    209: 
                    210: STATUS
                    211: q117InitFiler (
                    212:    IN OUT PQ117_CONTEXT Context
                    213:    );
                    214: 
                    215: void
                    216: q117GetBadSectors (
                    217:    IN OUT PQ117_CONTEXT Context
                    218:    );
                    219: 
                    220: STATUS
                    221: q117ReadHeaderSegment (
                    222:    OUT PTAPE_HEADER*HeaderPointer,
                    223:    IN OUT PQ117_CONTEXT Context
                    224:    );
                    225: 
                    226: STATUS
                    227: q117WriteTape(
                    228:    IN OUT PVOID FromWhere,
                    229:    IN OUT ULONG HowMany,
                    230:    IN OUT PQ117_CONTEXT Context
                    231:    );
                    232: 
                    233: STATUS
                    234: q117EndBack(
                    235:    IN OUT PQ117_CONTEXT Context
                    236:    );
                    237: 
                    238: STATUS
                    239: q117ReadVolumeEntry(
                    240:    PVOLUME_TABLE_ENTRY VolumeEntry,
                    241:    PQ117_CONTEXT Context
                    242:    );
                    243: 
                    244: VOID
                    245: q117FakeDataSize(
                    246:    IN OUT PVOLUME_TABLE_ENTRY TheVolumeTable,
                    247:    IN PQ117_CONTEXT Context
                    248:    );
                    249: 
                    250: STATUS
                    251: q117AppVolTD(
                    252:    IN OUT PVOLUME_TABLE_ENTRY TheVolumeTable,
                    253:    IN OUT PQ117_CONTEXT Context
                    254:    );
                    255: 
                    256: STATUS
                    257: q117SelectTD(
                    258:    IN OUT PQ117_CONTEXT Context
                    259:    );
                    260: 
                    261: STATUS
                    262: q117Start (
                    263:    IN OUT PQ117_CONTEXT Context
                    264:    );
                    265: 
                    266: STATUS
                    267: q117Stop (
                    268:    IN OUT PQ117_CONTEXT Context
                    269:    );
                    270: 
                    271: STATUS
                    272: q117OpenForWrite (
                    273:    IN OUT PQ117_CONTEXT Context
                    274:    );
                    275: 
                    276: STATUS
                    277: q117EndWriteOperation (
                    278:    IN OUT PQ117_CONTEXT Context
                    279:    );
                    280: 
                    281: NTSTATUS
                    282: q117OpenForRead (
                    283:     IN ULONG StartPosition,
                    284:     IN OUT PQ117_CONTEXT Context,
                    285:     IN PDEVICE_OBJECT DeviceObject
                    286:    );
                    287: 
                    288: STATUS
                    289: q117EndReadOperation (
                    290:    IN OUT PQ117_CONTEXT Context
                    291:    );
                    292: 
                    293: STATUS
                    294: q117StartBack(
                    295:    IN OUT PVOLUME_TABLE_ENTRY TheVolumeTable,
                    296:    IN PQ117_CONTEXT Context
                    297:    );
                    298: 
                    299: STATUS
                    300: q117StartAppend(
                    301:    IN OUT ULONG BytesAlreadyThere,
                    302:    IN PVOLUME_TABLE_ENTRY TheVolumeTable,
                    303:    IN OUT PQ117_CONTEXT Context
                    304:    );
                    305: 
                    306: STATUS
                    307: q117StartComm(
                    308:    OUT PVOLUME_TABLE_ENTRY TheVolumeTable,
                    309:    IN OUT PQ117_CONTEXT Context
                    310:    );
                    311: 
                    312: STATUS
                    313: q117SelVol (
                    314:    PVOLUME_TABLE_ENTRY TheVolumeTable,
                    315:    PQ117_CONTEXT Context
                    316:    );
                    317: 
                    318: STATUS
                    319: q117ReadTape (
                    320:    OUT PVOID ToWhere,
                    321:    IN OUT ULONG *HowMany,
                    322:    IN OUT PQ117_CONTEXT Context
                    323:    );
                    324: 
                    325: NTSTATUS
                    326: q117ConvertStatus(
                    327:    IN PDEVICE_OBJECT DeviceObject,
                    328:    IN STATUS status
                    329:    );
                    330: 
                    331: VOID
                    332: q117SetTpSt(
                    333:    PQ117_CONTEXT Context
                    334:    );
                    335: 
                    336: STATUS
                    337: q117GetEndBlock (
                    338:    OUT PVOLUME_TABLE_ENTRY TheVolumeTable,
                    339:    OUT LONG *NumberVolumes,
                    340:    IN PQ117_CONTEXT Context
                    341:    );
                    342: 
                    343: STATUS
                    344: q117BuildHeader(
                    345:    OUT PQIC40_VENDOR_UNIQUE VendorUnique,
                    346:    IN SEGMENT *HeaderSect,
                    347:    IN OUT PTAPE_HEADER Header,
                    348:    IN PQ117_CONTEXT Context
                    349:    );
                    350: 
                    351: NTSTATUS
                    352: q117IoCtlGetMediaParameters (
                    353:    IN PDEVICE_OBJECT DeviceObject,
                    354:    IN PIRP Irp
                    355:    );
                    356: 
                    357: NTSTATUS
                    358: q117IoCtlSetMediaParameters (
                    359:    IN PDEVICE_OBJECT DeviceObject,
                    360:    IN PIRP Irp
                    361:    );
                    362: 
                    363: NTSTATUS
                    364: q117IoCtlGetDriveParameters (
                    365:    IN PDEVICE_OBJECT DeviceObject,
                    366:    IN PIRP Irp
                    367:    );
                    368: 
                    369: NTSTATUS
                    370: q117IoCtlSetDriveParameters (
                    371:    IN PDEVICE_OBJECT DeviceObject,
                    372:    IN PIRP Irp
                    373:    );
                    374: 
                    375: NTSTATUS
                    376: q117IoCtlWriteMarks (
                    377:    IN PDEVICE_OBJECT DeviceObject,
                    378:    IN PIRP Irp
                    379:    );
                    380: 
                    381: NTSTATUS
                    382: q117IoCtlSetPosition (
                    383:    IN PDEVICE_OBJECT DeviceObject,
                    384:    IN PIRP Irp
                    385:    );
                    386: 
                    387: NTSTATUS
                    388: q117FindMark(
                    389:    ULONG Type,
                    390:    LONG Number,
                    391:    PQ117_CONTEXT Context,
                    392:    IN PDEVICE_OBJECT DeviceObject
                    393:    );
                    394: 
                    395: NTSTATUS
                    396: q117SeekToOffset(
                    397:    ULONG Offset,
                    398:    PQ117_CONTEXT Context,
                    399:    IN PDEVICE_OBJECT DeviceObject
                    400:    );
                    401: 
                    402: NTSTATUS
                    403: q117IoCtlErase (
                    404:    IN PDEVICE_OBJECT DeviceObject,
                    405:    IN PIRP Irp
                    406:    );
                    407: 
                    408: NTSTATUS
                    409: q117IoCtlPrepare (
                    410:    IN PDEVICE_OBJECT DeviceObject,
                    411:    IN PIRP Irp
                    412:    );
                    413: 
                    414: NTSTATUS
                    415: q117IoCtlGetStatus (
                    416:    IN PDEVICE_OBJECT DeviceObject,
                    417:    IN PIRP Irp
                    418:    );
                    419: 
                    420: NTSTATUS
                    421: q117IoCtlGetPosition (
                    422:    IN PDEVICE_OBJECT DeviceObject,
                    423:    IN PIRP Irp
                    424:    );
                    425: 
                    426: STATUS
                    427: q117CheckNewTape (
                    428:    PQ117_CONTEXT             Context
                    429:    );
                    430: 
                    431: STATUS
                    432: q117NewTrkBk(
                    433:    PQ117_CONTEXT Context
                    434:    );
                    435: 
                    436: STATUS
                    437: q117GetTapeCapacity(
                    438:    struct S_O_DGetCap *ptr,
                    439:    PQ117_CONTEXT Context
                    440:    );
                    441: 
                    442: VOID
                    443: q117RdsInitReed (
                    444:    VOID
                    445:    );
                    446: 
                    447: UCHAR
                    448: q117RdsMultiplyTuples (
                    449:    IN UCHAR tup1,
                    450:    IN UCHAR tup2
                    451:    );
                    452: 
                    453: UCHAR
                    454: q117RdsDivideTuples (
                    455:    IN UCHAR tup1,
                    456:    IN UCHAR tup2
                    457:    );
                    458: 
                    459: UCHAR
                    460: q117RdsExpTuple (
                    461:    IN UCHAR tup1,
                    462:    IN UCHAR xpnt
                    463:    );
                    464: 
                    465: VOID
                    466: q117RdsMakeCRC (
                    467:    IN OUT UCHAR *Array,      // pointer to 32K data area (segment)
                    468:    IN UCHAR Count            // number of sectors (1K blocks)(1-32)
                    469:    );
                    470: 
                    471: BOOLEAN
                    472: q117RdsReadCheck (
                    473:    IN UCHAR *Array,         // pointer to 32K data area (segment)
                    474:    IN UCHAR Count           // number of sectors (1K blocks)(1-32)
                    475:    );
                    476: 
                    477: BOOLEAN
                    478: q117RdsCorrect(
                    479:    IN OUT UCHAR *Array,    // pointer to 32K data area (segment)
                    480:    IN UCHAR Count,         // number of good sectors in segment (4-32)
                    481:    IN UCHAR CRCErrors,     // number of crc errors
                    482:    IN UCHAR e1,
                    483:    IN UCHAR e2,
                    484:    IN UCHAR e3             // sectors where errors occurred
                    485:    );
                    486: 
                    487: VOID
                    488: q117RdsGetSyndromes (
                    489:    IN OUT UCHAR *Array,       // pointer to 32K data area (segment)
                    490:    IN UCHAR Count,            // number of good sectors in segment (4-32)
                    491:    IN UCHAR *ps1,
                    492:    IN UCHAR *ps2,
                    493:    IN UCHAR *ps3
                    494:    );
                    495: 
                    496: BOOLEAN
                    497: q117RdsCorrectFailure (
                    498:    IN OUT UCHAR *Array,     // pointer to 32K data area (segment)
                    499:    IN UCHAR Count,          // number of good sectors in segment (4-32)
                    500:    IN UCHAR s1,
                    501:    IN UCHAR s2,
                    502:    IN UCHAR s3
                    503:    );
                    504: 
                    505: BOOLEAN
                    506: q117RdsCorrectOneError (
                    507:    IN OUT UCHAR *Array,      // pointer to 32K data area (segment)
                    508:    IN UCHAR Count,           // number of good sectors in segment (4-32)
                    509:    IN UCHAR ErrorLocation,
                    510:    IN UCHAR s1,
                    511:    IN UCHAR s2,
                    512:    IN UCHAR s3
                    513:    );
                    514: 
                    515: BOOLEAN
                    516: q117RdsCorrectTwoErrors (
                    517:    IN OUT UCHAR *Array,       // pointer to 32K data area (segment)
                    518:    IN UCHAR Count,            // number of good sectors in segment (4-32)
                    519:    IN UCHAR ErrorLocation1,
                    520:    IN UCHAR ErrorLocation2,
                    521:    IN UCHAR s1,
                    522:    IN UCHAR s2,
                    523:    IN UCHAR s3
                    524:    );
                    525: 
                    526: BOOLEAN
                    527: q117RdsCorrectThreeErrors (
                    528:    IN OUT UCHAR *Array,       // pointer to 32K data area (segment)
                    529:    IN UCHAR Count,            // number of good sectors in segment (4-32)
                    530:    IN UCHAR ErrorLocation1,
                    531:    IN UCHAR ErrorLocation2,
                    532:    IN UCHAR ErrorLocation3,
                    533:    IN UCHAR s1,
                    534:    IN UCHAR s2,
                    535:    UCHAR s3
                    536:    );
                    537: 
                    538: BOOLEAN
                    539: q117RdsCorrectOneErrorAndOneFailure (
                    540:    IN OUT UCHAR *Array,        // pointer to 32K data area (segment)
                    541:    IN UCHAR Count,             // number of good sectors in segment (4-32)
                    542:    IN UCHAR ErrorLocation1,
                    543:    IN UCHAR s1,
                    544:    IN UCHAR s2,
                    545:    IN UCHAR s3
                    546:    );
                    547: 
                    548: void
                    549: q117SpacePadString(
                    550:    IN OUT CHAR *InputString,
                    551:    IN LONG StrSize
                    552:    );
                    553: 
                    554: STATUS
                    555: q117VerifyFormat(
                    556:    IN OUT PQ117_CONTEXT Context
                    557:    );
                    558: 
                    559: STATUS
                    560: q117EraseQ(
                    561:    IN OUT PQ117_CONTEXT Context
                    562:    );
                    563: 
                    564: STATUS
                    565: q117EraseS(
                    566:    IN OUT PQ117_CONTEXT Context
                    567:    );
                    568: 
                    569: VOID
                    570: q117ClearVolume (
                    571:    IN OUT PQ117_CONTEXT Context
                    572:    );
                    573: 
                    574: STATUS
                    575: q117SkipBlock (
                    576:    IN OUT ULONG *HowMany,
                    577:    IN OUT PQ117_CONTEXT Context
                    578:    );
                    579: 
                    580: STATUS
                    581: q117ReconstructSegment(
                    582:    IN PIO_REQUEST IoReq,
                    583:    IN PQ117_CONTEXT Context
                    584:    );
                    585: 
                    586: STATUS
                    587: q117DoCorrect(
                    588:    IN PVOID DataBuffer,
                    589:    IN ULONG BadSectorMap,
                    590:    IN ULONG SectorsInError
                    591:    );
                    592: 
                    593: UCHAR
                    594: q117CountBits(
                    595:     IN PQ117_CONTEXT Context,
                    596:     IN SEGMENT Segment,
                    597:     ULONG Map
                    598:     );
                    599: 
                    600: ULONG q117ReadBadSectorList (
                    601:     IN PQ117_CONTEXT Context,
                    602:     IN SEGMENT Segment
                    603:     );
                    604: 
                    605: USHORT
                    606: q117GoodDataBytes(
                    607:    IN SEGMENT Segment,
                    608:    IN PQ117_CONTEXT Context
                    609:    );
                    610: 
                    611: NTSTATUS
                    612: q117AllocatePermanentMemory(
                    613:    PQ117_CONTEXT Context,
                    614:    PADAPTER_OBJECT AdapterObject,
                    615:    ULONG           NumberOfMapRegisters
                    616:    );
                    617: 
                    618: STATUS
                    619: q117GetTemporaryMemory(
                    620:    PQ117_CONTEXT Context
                    621:    );
                    622: 
                    623: VOID
                    624: q117FreeTemporaryMemory(
                    625:    PQ117_CONTEXT Context
                    626:    );
                    627: 
                    628: NTSTATUS
                    629: q117IoCtlReadAbs (
                    630:    IN PDEVICE_OBJECT DeviceObject,
                    631:    IN PIRP Irp
                    632:    );
                    633: 
                    634: NTSTATUS
                    635: q117IoCtlWriteAbs (
                    636:    IN PDEVICE_OBJECT DeviceObject,
                    637:    IN PIRP Irp
                    638:    );
                    639: 
                    640: STATUS
                    641: q117UpdateBadMap(
                    642:     IN OUT PQ117_CONTEXT Context,
                    643:     IN SEGMENT Segment,
                    644:     IN ULONG BadSectors
                    645:     );
                    646: 
                    647: VOID
                    648: q117BadMapToBadList(
                    649:     IN SEGMENT Segment,
                    650:     IN ULONG BadSectors,
                    651:     IN BAD_LIST_PTR BadListPtr
                    652:     );
                    653: 
                    654: ULONG
                    655: q117BadListEntryToSector(
                    656:     IN UCHAR *ListEntry
                    657:     );

unix.superglobalmegacorp.com

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