You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
167 lines
10 KiB
167 lines
10 KiB
#include <windows.h>
|
|
|
|
#include <ntverp.h>
|
|
|
|
#define VER_FILETYPE VFT_DRV
|
|
#define VER_FILESUBTYPE VFT2_DRV_SYSTEM
|
|
#define VER_FILEDESCRIPTION_STR "Cyclom-Y Port Driver"
|
|
#define VER_INTERNALNAME_STR "cyyport.sys"
|
|
#define VER_ORIGINALFILENAME_STR "cyyport.sys"
|
|
#define VER_LEGALCOPYRIGHT_YEARS "1996-2001"
|
|
#define VER_LEGALCOPYRIGHT_STR "Copyright (C) Cyclades Corp. " VER_LEGALCOPYRIGHT_YEARS
|
|
#define VER_FILEVERSION 1,0,25,0
|
|
#define VER_FILEVERSION_STR "1.0.25.0"
|
|
|
|
#include "common.ver"
|
|
|
|
#include "cyylog.rc"
|
|
|
|
|
|
// History
|
|
//
|
|
// 1.0.25.0 12/12/01 Just to make sure, we are initializing 'value' with
|
|
// 0xff in CyyCDCmd.
|
|
// 1.0.24.0 10/22/01 Fix from Win2k SP2 applied: CyyPowerDispatch doesn't
|
|
// call PoStartNextPowerIrp and CyyCompleteRequest when
|
|
// CyyIRPPrologue returns STATUS_PENDING.
|
|
// 1.0.23.0 09/13/01 CyyCDCmd was using uninitialized memory 'value'.
|
|
// 1.0.22.0 07/05/01 Applying changes from DDK RC1: Do not complete Irp when
|
|
// CyyIRPPrologue returns STATUS_PENDING. (CyyIRPPrologue
|
|
// returns STATUS_PENDING when device is in Stopped state.)
|
|
// Removal of DbgBreakPoint in CyyLogInit to prevent
|
|
// breakpoints in low resource simulation with checked
|
|
// builds.
|
|
// Following changes in serial were not applied: use of
|
|
// SetDeviceIsOpened instead of updating DeviceIsOpened
|
|
// flag directly; no power down after Start up or when
|
|
// closing port if EnablePowerManagement is set in the
|
|
// Registry.
|
|
// 1.0.21.0 07/02/01 No need to send Power Irp to power up the device during
|
|
// IRP_MN_START_DEVICE.
|
|
// 1.0.20.0 05/04/01 More fixes for Driver Verifier: IoMarkIrpPending required
|
|
// when STATUS_PENDING returned. CyySystemPowerComplete
|
|
// completing Irp when PoRequestPowerIrp fails.
|
|
// IoMarkIrpPending called when Irp->PendingReturned set
|
|
// in the IoCompletion routine of Device Power Irp.
|
|
// 1.0.19.0 04/27/01 _WIN64 code removed. Set busNumber to 0xFFFFFFFF
|
|
// when call to get DevicePropertyBusNumber fails;
|
|
// device name will use static currentInstance whenever
|
|
// busNumber is 0xFFFFFFFF.
|
|
// 1.0.18.0 - None.
|
|
// 1.0.17.0 04/25/01 Delete #defines for VER_COMPANYNAME_STR,
|
|
// VER_PRODUCTNAME_STR, VER_PRODUCTVERSION and
|
|
// VER_PRODUCTVERSION_STR to fix compilation
|
|
// warnings.
|
|
// 1.0.16.0 04/18/01 Device name for _WIN64 will use static currentInstance
|
|
// number. This is because cyclom-y cannot retrieve
|
|
// the PCI slot number in 64-bit system.
|
|
// 1.0.15.0 04/17/01 Just version change.
|
|
// 1.0.14.0 04/16/01 Fix for Driver Verifier: IoMarkIrpPending required
|
|
// when STATUS_PENDING returned.
|
|
// 1.0.13.0 04/02/01 Just version change.
|
|
// 1.0.12.0 03/20/01 RtlAppendUnicodeToString was failing with
|
|
// STATUS_BUFFER_TOO_SMALL when updating
|
|
// SymbolicLinkName in CyyUndoExternalNaming.
|
|
// CyyReadSymName is used now.
|
|
// Device name changed from \Device\Cyyport?Pci? to
|
|
// \Device\Pci?Cyyport?.
|
|
// 1.0.11.0 03/14/01 Changes for serial from DDK 2416 (Whistler pre-Beta2)
|
|
// to DDK 2446 (Whistler pre-Beta2) applied.
|
|
// 1.0.10.0 03/12/01 Changes for serial from DDK 2195 (Windows 2000) to
|
|
// DDK 2416 (Whistler pre-Beta2) applied.
|
|
// 1.0.9.0 03/12/01 Just version change.
|
|
// 1.0.8.0 03/02/01 cyypnp.c: Device name is no longer using static instance
|
|
// number that is incremented every time the driver
|
|
// is loaded; instead it is using a fixed name based
|
|
// on the PCI slot and port number. This change fixed
|
|
// the Rename-Disable-Enable problem.
|
|
// 1.0.7.0 02/26/01 cyypower.c: Instead of requesting Device Power Irp
|
|
// only if device is opened, Device Power Irp is always
|
|
// requested during System Irp. Device Power Irp will
|
|
// set the device IoCompletion routine if the device is
|
|
// opened.
|
|
// CyySystemPowerComplete doesn't complete Irp when
|
|
// PoRequestPowerIrp returns failure. This Irp should have
|
|
// been already completed by PDO.
|
|
// Device IoCompletion routine doesn't complete Irp, it
|
|
// should have been already completed by PDO. Device
|
|
// IoCompletion returns STATUS_SUCCESS instead of
|
|
// STATUS_MORE_PROCESSING_REQUIRED.
|
|
// cyyioctl.c: Access to COR3 register in
|
|
// IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS and
|
|
// IOCTL_SERIAL_INTERNAL_RESTORE_SETTINGS is protected
|
|
// by KeSynchronizeExecution.
|
|
// 1.0.6.0 02/16/01 cyypower.c: CyyRestoreDeviceState restores hw context
|
|
// only if device is opened.
|
|
// 1.0.5.0 02/15/01 cyypower.c: Disable interrupts in the CD1400 channel and
|
|
// reset channel in CyySaveDeviceState. Send Device Power
|
|
// Irp only if OpenCount is not zero.
|
|
// cyyioctl.c: Do not log error if IRQL > DISPATCH_LEVEL
|
|
// in CyyCDCmd.
|
|
// 1.0.4.0 02/09/01 cyypower.c: CyySaveDeviceState and CyyRestoreDeviceState
|
|
// are saving and restoring the CD1400 register values.
|
|
// They are called using KeSynchronizeExecution.
|
|
// CyySetPowerD3 is disabling PLX interrupts when the last
|
|
// port is powered down. Device SET_POWER is no longer
|
|
// waiting for kernel event during power up; it is setting
|
|
// an IoCompletion routine. System SET_POWER changed to
|
|
// return STATUS_PENDING, set an IoCompletion routine, and
|
|
// request Device power Irp in the IoCompletion routine.
|
|
// CyyRestoreDeviceState is setting HoldingEmpty to TRUE.
|
|
// cyyintr.c: CyyTxStart is checking if power is D0.
|
|
// 1.0.3.0 02/01/01 Clear pending interrupt in CyyDisableCd1400Channel.
|
|
// 1.0.2.0 01/25/01 Driver built with Whistler DDK 2416.
|
|
// Reset board and reset chip code moved to cyclom-y driver
|
|
// to prevent IRP_MN_START_DEVICE resetting the chip while
|
|
// IRP_MN_SET_POWER reset the board. Files changed:
|
|
// cyyinit.c, cyypower.c, cyypnp.c.
|
|
// Compilation error fixed in CyySetBaud: "if" condition that
|
|
// was always TRUE. File changed: cyyioctl.c
|
|
// 64-bit Compilation error fixed in cyyinit.c and cyypower.c
|
|
// 1.0.1.0 12/06/00 Driver built with Whistler DDK (Beta1).
|
|
// 1.0.0.30 10/11/00 Fix Rename-Disable-Enable problem: SymbolicLinkName
|
|
// was being changed by the Property Page, but driver
|
|
// was trying to delete the original name.
|
|
// 1.0.0.29 09/22/00 Changes in cyyport.h and cyyportp.h to support 64bit.
|
|
// 1.0.0.28 08/29/00 CyyKillPendingIrps had a path where IoReleaseCancelSpinLock
|
|
// would not be called after IoAcquireCancelSpinLock.
|
|
// cyylogc.c deleted.
|
|
// Removal of IER, LCR and MCR from CYY_DEVICE_STATE; removal of
|
|
// InterruptStatus from CYY_DEVICE_EXTENSION.
|
|
// Tag 'XMOC' changed to 'PyyC' in log.c.
|
|
// 1.0.0.23 06/23/00 Added more error logging to cover all errors in AddDevice.
|
|
// 1.0.0.22 06/15/00 Added error logging.
|
|
// 1.0.0.20 06/05/00 Buffers allocated with correct tag.
|
|
// 1.0.0.16 05/19/00 Re-compiled just because of new .bat. No change in driver.
|
|
// 1.0.0.15 04/07/00 Added CyyDump for CYYWMI.
|
|
// 1.0.0.14 04/06/00 Added support to IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS
|
|
// and IOCTL_SERIAL_INTERNAL_RESTORE_SETTINGS.
|
|
// TxFifoAmount variable used instead of hardcoding
|
|
// tx fifo size to 12. This way we can change it using
|
|
// IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS. For now, we are not
|
|
// using TxFIFO read from Registry.
|
|
// Added support to IOCTL_SERIAL_SET_FIFO_CONTROL.
|
|
// 1.0.0.13 03/31/00 Apply changes from Y NT 3.1.0 to cyyport:
|
|
// * cd1400.h: Creation of RTS_AUT_OUTPUT and CTS_AUT_ENABLE;
|
|
// creation of SRER_TXRDY and SRER_TXMPTY.
|
|
// * cyyinit.c: Remove BREAK_IMPLEMENTATION code.
|
|
// * cyyintr.c: Remove BREAK_IMPLEMENTATION code.
|
|
// * cyymodem.c: Remove BREAK_IMPLEMENTATION code.
|
|
// * cyyport.h: Creation of BreakCmd in CYY_DEVICE_EXTENSION.
|
|
// * cyyportp.h: Deletion of CyyPurgeTxBuff prototype.
|
|
// * cyypurge.c: Deletion of SERIAL_PURGE_TXCLEAR handling.
|
|
// * sources: Deletion of BREAK_IMPLEMENTATION.
|
|
// * cyypower.c: Deletion of BREAK_IMPLEMENTATION code.
|
|
// 1.0.0.12 -------- None.
|
|
// 1.0.0.11 -------- None.
|
|
// 1.0.0.10 02/29/00 Fix IRP_MN_REMOVE_DEVICE to detach cyyport from stack
|
|
// only after calling lower drivers. CyyRemoveDevObj() had
|
|
// to be changed for this.
|
|
// Do a cast to (UCHAR) in CD1400_WRITE to fix all warning
|
|
// errors.
|
|
// 1.0.0.8 12/30/99 Cosmetic changes in the src code.
|
|
// 1.0.0.6 10/11/99 Eliminate resource conflicts between Cyclom-Y device
|
|
// and Cyclom-Y child devices; cyyportp.h, cyypnp.c, cyyreg.c
|
|
// 1.0.0.5 10/07/99 New child Hardware Id's, Instances and Descriptions;
|
|
// cyyhw.h, cyypnp.c, cyyport.h, do.bat, precomp.h changed.
|
|
// 1.0.0.4 09/20/99 Support to ISA boards.
|