}
else
{
- /* Otherwise, remove the packet from the queue and relelase the lock */
+ /* Otherwise, remove the packet from the queue and release the lock */
KeRemoveEntryDeviceQueue(&DeviceObject->DeviceQueue,
&Irp->Tail.Overlay.DeviceQueueEntry);
IoReleaseCancelSpinLock(Irp->CancelIrql);
}
else if ((BeepParam->Frequency != 0) && !(BeepParam->Duration))
{
- /* No duration, return imemdiately */
+ /* No duration, return immediately */
Status = STATUS_SUCCESS;
}
else
/* Update current X */
VidpCurrentX = VidpScrollRegion[0];
- /* Preseve the current row */
+ /* Preserve the current row */
PreserveRow(VidpCurrentY, TopDelta, FALSE);
}
else if (*String == '\r')
TRUE);
if (!Result) return FALSE;
- /* Loop trying to find posssible VGA base addresses */
+ /* Loop trying to find possible VGA base addresses */
while (TRUE)
{
/* See if this is I/O Space, which we need to map */
/* Check if we've gone past the edge */
if ((x + RleValue) > (Width + Left))
{
- /* Fixeup the pixel value */
+ /* Fixup the pixel value */
RleValue = Left - x + Width;
}
Color = NewRleValue >> 4;
Color2 = NewRleValue & 0xF;
- /* Increase buffer positition */
+ /* Increase buffer position */
Buffer++;
/* Check if we need to do a fill */
/* Check if there is any value at all */
if (RleValue)
{
- /* Set the pixel and increase posititon */
+ /* Set the pixel and increase position */
SetPixel(x, YDelta, (UCHAR)Color);
x++;
}
/* Calculate the length of the message data */
*DataLength = Packet.ByteCount - MessageHeader->Length;
- /* Shall we receive messsage data? */
+ /* Shall we receive message data? */
if (MessageData)
{
/* Set the length of the message data */
/* Send the message header */
KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length);
- /* If we have meesage data, also send it */
+ /* If we have message data, also send it */
if (MessageData)
{
KdpSendBuffer(MessageData->Buffer, MessageData->Length);
* \param Buffer Pointer to a buffer that receives the data.
* \param Size Size of data to receive in bytes.
* \return KDP_PACKET_RECEIVED if successful.
- * KDP_PACKET_TIMEOUT if the receice timed out.
+ * KDP_PACKET_TIMEOUT if the receive timed out.
*/
KDP_STATUS
NTAPI
/******************************************************************************
* \name KdpReceivePacketLeader
- * \brief Receives a packet leadr from the KD port.
+ * \brief Receives a packet leader from the KD port.
* \param PacketLeader Pointer to an ULONG that receives the packet leader.
* \return KDP_PACKET_RECEIVED if successful.
* KDP_PACKET_TIMEOUT if the receive timed out.
if (strncmp(gdb_input, "qOffsets", 8) == 0)
{
- /* We load ntoskrnl at 0x80800000 while compiling it at 0x00800000 base adress */
+ /* We load ntoskrnl at 0x80800000 while compiling it at 0x00800000 base address */
return send_gdb_packet("TextSeg=80000000");
}
extern LIST_ENTRY* ModuleListHead;
extern KDP_SEND_HANDLER KdpSendPacketHandler;
extern KDP_MANIPULATESTATE_HANDLER KdpManipulateStateHandler;
-/* Commone ManipulateState handlers */
+/* Common ManipulateState handlers */
extern KDSTATUS ContinueManipulateStateHandler(_Out_ DBGKD_MANIPULATE_STATE64* State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext);
extern KDSTATUS SetContextManipulateHandler(_Out_ DBGKD_MANIPULATE_STATE64* State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext);
extern PEPROCESS TheIdleProcess;
* Transition Power
* ----------------
* On transitions to a high-powered state we first apply power (via
- * power resources) then evalute _PSx. Conversly for transitions to
+ * power resources) then evalute _PSx. Conversely for transitions to
* a lower-powered state.
*/
if (state < device->power.state) {
if (ACPI_SUCCESS(status))
device->flags.power_manageable = 1;
- /* TBD: Peformance management */
+ /* TBD: Performance management */
return_VALUE(0);
}
/*
* Try to execute _DSW first.
*
- * Three agruments are needed for the _DSW object:
+ * Three arguments are needed for the _DSW object:
* Argument 0: enable/disable the wake capabilities
* Argument 1: target system state
* Argument 2: target device state
* When _DSW object is called to disable the wake capabilities, maybe
- * the first argument is filled. The values of the other two agruments
+ * the first argument is filled. The values of the other two arguments
* are meaningless.
*/
in_arg[0].Type = ACPI_TYPE_INTEGER;
//}
/* disable interrupts
* Note that acpi_suspend -- our caller -- will do this once we return.
- * But, we want it done early, so we don't get any suprises during
+ * But, we want it done early, so we don't get any surprises during
* the device suspend sequence.
*/
//ACPI_DISABLE_IRQS();
status = acpi_system_suspend(state);
/* Even if we failed to go to sleep, all of the devices are in an suspended
- * mode. So, we run these unconditionaly to make sure we have a usable system
+ * mode. So, we run these unconditionally to make sure we have a usable system
* no matter what.
*/
AcpiLeaveSleepState(state);
tail_offset += sizeof(char*);
break;
default:
- ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid package element [%d]: got number, expecing [%c].\n", i, format_string[i]));
+ ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid package element [%d]: got number, expecting [%c].\n", i, format_string[i]));
return_ACPI_STATUS(AE_BAD_DATA);
break;
}
tail_offset += sizeof(UINT8*);
break;
default:
- ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid package element [%d] got string/buffer, expecing [%c].\n", i, format_string[i]));
+ ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid package element [%d] got string/buffer, expecting [%c].\n", i, format_string[i]));
return_ACPI_STATUS(AE_BAD_DATA);
break;
}
deviceCapabilities->EjectSupported = device->flags.ejectable;
deviceCapabilities->HardwareDisabled = !device->status.enabled && !device->status.functional;
deviceCapabilities->Removable = device->flags.removable;
- deviceCapabilities->SurpriseRemovalOK = device->flags.suprise_removal_ok;
+ deviceCapabilities->SurpriseRemovalOK = device->flags.surprise_removal_ok;
deviceCapabilities->UniqueID = device->flags.unique_id;
deviceCapabilities->NoDisplayInUI = !device->status.show_in_ui;
deviceCapabilities->Address = device->pnp.bus_address;
/* The battery is discharging but we don't know by how much... this is bad! */
if ((BstState & ACPI_BATT_STAT_DISCHARG) &&
(CmBattDebug & (CMBATT_ACPI_WARNING | CMBATT_GENERIC_WARNING)))
- DbgPrint("CmBattGetBatteryStatus: battery rate is unkown when battery is not charging!\n");
+ DbgPrint("CmBattGetBatteryStatus: battery rate is unknown when battery is not charging!\n");
}
else if (DeviceExtension->State & BATTERY_DISCHARGING)
{
ULONG BatteryCapacityGranularity1;
ULONG BatteryCapacityGranularity2;
CHAR ModelNumber[256];
- CHAR SerialNubmer[256];
+ CHAR SerialNumber[256];
CHAR BatteryType[256];
CHAR OemInfo[256];
} ACPI_BIF_DATA, *PACPI_BIF_DATA;
return Status;
}
- /* Build the FDO extensio, check if we support trip points */
+ /* Build the FDO extension, check if we support trip points */
FdoExtension = FdoDeviceObject->DeviceExtension;
FdoExtension->FdoType = CmBattBattery;
FdoExtension->Started = 0;
{
/* Don't do anything */
if (CmBattDebug & 0xC)
- DbgPrint("CmBatt: Second AC adapter found. Current version of driver only supports 1 aadapter.\n");
+ DbgPrint("CmBatt: Second AC adapter found. Current version of driver only supports 1 adapter.\n");
}
else
{
UINT32 removable:1;
UINT32 ejectable:1;
UINT32 lockable:1;
- UINT32 suprise_removal_ok:1;
+ UINT32 surprise_removal_ok:1;
UINT32 power_manageable:1;
UINT32 performance_manageable:1;
UINT32 wake_capable:1;
#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */
#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */
#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */
-#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */
+#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxiliary power support mask */
#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */
#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */
#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */
}
}
- /* Return the resouce list */
+ /* Return the resource list */
*Buffer = ResourceList;
return STATUS_SUCCESS;
}
/* Check if the requirements are actually the zero list */
if (*RequirementsList == PciZeroIoResourceRequirements)
{
- /* A simple NULL will sufficie for the PnP Manager */
+ /* A simple NULL will suffice for the PnP Manager */
*RequirementsList = NULL;
DPRINT1("Returning NULL requirements list\n");
}
PciData->ProgIf = ProgIf;
PdoExtension->ProgIf = NewProgIf;
- /* Clear the first four BARs to reset current BAR setttings */
+ /* Clear the first four BARs to reset current BAR settings */
PciData->u.type0.BaseAddresses[0] = 0;
PciData->u.type0.BaseAddresses[1] = 0;
PciData->u.type0.BaseAddresses[2] = 0;
/*
* Check for Intel ICH PCI-to-PCI (i82801) bridges (used on the i810,
* i820, i840, i845 Chipsets) that have subtractive decode enabled,
- * and whose hack flags do not specifiy that this support is broken.
+ * and whose hack flags do not specify that this support is broken.
*/
if ((PdoExtension->HeaderType == PCI_BRIDGE_TYPE) &&
(PdoExtension->Dependent.type1.SubtractiveDecode) &&
ASSERT(Resources == NULL);
}
- /* If assignment succeeed, then we are done */
+ /* If assignment succeed, then we are done */
if (NT_SUCCESS(Status)) break;
}
if (!NT_SUCCESS(Status))
{
/* This interface was not initialized correctly, skip it */
- DPRINT1("PCI - PciQueryInterface - Contructor %p = %08lx\n",
+ DPRINT1("PCI - PciQueryInterface - Constructor %p = %08lx\n",
PciInterface->Constructor, Status);
continue;
}
* Check for Intel ICH PCI-to-PCI (i82801) bridges (used on the i810,
* i820, i840, i845 Chipsets) that don't have subtractive decode broken.
* If they do have broken subtractive support, or if they are not ICH bridges,
- * then check if the bridge supports substractive decode at all.
+ * then check if the bridge supports subtractive decode at all.
*/
if ((((PdoExtension->VendorId == 0x8086) &&
((PdoExtension->DeviceId == 0x2418) ||
/* Does the device support power management at all? */
if (!(DeviceExtension->HackFlags & PCI_HACK_NO_PM_CAPS))
{
- /* Get the PM capabailities register */
+ /* Get the PM capabilities register */
CapsOffset = PciReadDeviceCapability(DeviceExtension,
DeviceExtension->CapabilitiesPtr,
PCI_CAPABILITY_ID_POWER_MANAGEMENT,
/* Check for system or bridge devices */
if (BaseClass == PCI_CLASS_BASE_SYSTEM_DEV)
{
- /* Interrupt controlers are critical */
+ /* Interrupt controllers are critical */
return SubClass == PCI_SUBCLASS_SYS_INTERRUPT_CTLR;
}
else if (BaseClass == PCI_CLASS_BRIDGE_DEV)
{
ASSERT(PdoExtension->ExtensionType == PciPdoExtensionType);
- /* Differenriate between devices and bridges */
+ /* Differentiate between devices and bridges */
if (PdoExtension->BaseClass != PCI_CLASS_BRIDGE_DEV) return PciTypeDevice;
/* The PCI Bus driver handles only CardBus and PCI bridges (plus host) */
DevicePowerState = AttachedCaps.DeviceState[CurrentState];
NewPowerState = DevicePowerState;
- /* The attachee suports D1, but this PDO does not */
+ /* The attachee supports D1, but this PDO does not */
if ((NewPowerState == PowerDeviceD1) &&
!(PdoExtension->PowerCapabilities.Support.D1))
{
}
parentFCB = NULL;
- /* Parse filename and check each path element for existance and access */
+ /* Parse filename and check each path element for existence and access */
while (CdfsGetNextPathElement(currentElement) != 0)
{
/* Skip blank directory levels */
ASSERT_LOCKED_FCB( Fcb );
//
- // Find the entry containg this starting offset.
+ // Find the entry containing this starting offset.
//
McbEntryOffset = CdFindMcbEntry( IrpContext, Fcb, StartingFileOffset );
\f
//
-// Local suupport routine
+// Local support routine
//
ULONG
UCHAR Reserved[8]; // reserved 8 = 0
ULONG VolSpaceI; // size of the volume in LBN's Intel
ULONG VolSpaceM; // size of the volume in LBN's Motorola
- UCHAR CharSet[32]; // character set bytes 0 = ASCII, Joliett Seq here
+ UCHAR CharSet[32]; // character set bytes 0 = ASCII, Joliet Seq here
USHORT VolSetSizeI; // volume set size Intel
USHORT VolSetSizeM; // volume set size Motorola
USHORT VolSeqNumI; // volume set sequence number Intel
// ASSERT_RESOURCE_NOT_MINE( IN PERESOURCE Resource );
//
// The following macros are used to check whether the current thread
-// owns the resoures in the given structures.
+// owns the resource in the given structures.
//
// ASSERT_EXCLUSIVE_CDDATA
//
5. A fast mutex in the Vcb will protect access to the Fcb table and
the open counts in the Vcb. It is also used to modify the reference
counts in all Fcbs. This mutex cannot be acquired
- exclusely and is an end resource.
+ exclusively and is an end resource.
6. A fast mutex in the Fcb will synchronize access to all Fcb fields
which aren't synchronized in some other way. A thread may acquire
UNICODE_STRING FileName;
//
- // String containging the version number.
+ // String containing the version number.
//
UNICODE_STRING VersionString;
// operation.
// MaxDelayedCloseCount - Trigger delay close work at this threshold.
// MinDelayedCloseCount - Turn off delay close work at this threshold.
- // DelayedCloseCount - Number of entries on the delayted close queue.
+ // DelayedCloseCount - Number of entries on the delayed close queue.
//
// CloseItem - Workqueue item used to start FspClose thread.
//
//
// The following field contains a record of special pointers used by
- // MM and Cache to manipluate section objects. Note that the values
+ // MM and Cache to manipulate section objects. Note that the values
// are set outside of the file system. However the file system on an
// open/create will set the file object's SectionObject field to
// point to this field
\f
//
-// The Irp Context record is allocated for every orginating Irp. It is
+// The Irp Context record is allocated for every originating Irp. It is
// created by the Fsd dispatch routines, and deallocated by the CdComplete
// request routine
//
\f
//
// Following structure is used to smooth out the differences in the HSG, ISO
-// and Joliett directory entries.
+// and Joliet directory entries.
//
typedef struct _DIRENT {
//
// Since we now must make volumes go away as soon as reasonable after
// the last user handles closes, key off of the cleanup count. It is
- // OK to do this more than neccesary. Since this Fcb could be holding
+ // OK to do this more than necessary. Since this Fcb could be holding
// a number of other Fcbs (and thus their references), a simple check
// on reference count is not appropriate.
//
if (TryingYellowbookMode2) {
//
- // We succesfully got data when we tried switching the trackmode,
+ // We successfully got data when we tried switching the trackmode,
// so change the state of the FCB to remember that.
//
ScratchUserBufferOffset += ThisIoRun->DiskByteCount;
//
- // Otherwise we need to allocate an auxilary buffer for the next sector.
+ // Otherwise we need to allocate an auxiliary buffer for the next sector.
//
} else {
MasterIrp = IrpContext->Irp;
//
- // Itterate through the runs, doing everything that can fail.
+ // Iterate through the runs, doing everything that can fail.
// We let the cleanup in CdFinishBuffers clean up on error.
//
MasterIrp = IrpContext->Irp;
//
- // Itterate through the runs, doing everything that can fail.
+ // Iterate through the runs, doing everything that can fail.
// We let the cleanup in CdFinishBuffers clean up on error.
//
//
// Here are the rules concerning filling up the buffer:
//
- // 1. The Io system garentees that there will always be
+ // 1. The Io system guarantees that there will always be
// enough room for at least one base record.
//
// 2. If the full first record (including file name) cannot
} finally {
//
- // Cleanup our search context - *before* aquiring the FCB mutex exclusive,
+ // Cleanup our search context - *before* acquiring the FCB mutex exclusive,
// else can block on threads in cdcreateinternalstream/purge which
// hold the FCB but are waiting for all maps in this stream to be released.
//
CdCleanupFileContext( IrpContext, &FileContext );
//
- // Now we can safely aqure the FCB mutex if we need to.
+ // Now we can safely acquire the FCB mutex if we need to.
//
if (DoCcbUpdate && !NT_ERROR( Status )) {
PAGED_CODE();
//
- // Loop until we find a match or exaust the directory.
+ // Loop until we find a match or exhaust the directory.
//
while (TRUE) {
find. This may already point to a dirent so we need to check if
we are in the same sector and unmap any buffer as necessary.
- This dirent is left in an indeterminant state if we don't find a dirent.
+ This dirent is left in an indeterminate state if we don't find a dirent.
Return Value:
Routine Description:
- This routine is called to search a dirctory for a file matching the input
+ This routine is called to search a directory for a file matching the input
name. This name has been upcased at this point if this a case-insensitive
search. The name has been separated into separate name and version strings.
We look for an exact match in the name and only consider the version if
Routine Description:
- This routine is called to search a dirctory for a directory matching the input
+ This routine is called to search a directory for a directory matching the input
name. This name has been upcased at this point if this a case-insensitive
search. We look for an exact match in the name and do not look for shortname
equivalents.
This routine is called to walk through the directory until we find the
first possible dirent for file. We are positioned at some point described
- by the FileContext. We will walk through any remaing dirents for the
+ by the FileContext. We will walk through any remaining dirents for the
current file until we find the first dirent for some subsequent file.
We can be called when we have found just one dirent for a file or all
// Since we're always last in the mount order, we won't be preventing
// any other FS from trying to mount the data track. However if the
// data track was at the start of the disc, then we abort, to avoid
- // having to filter it from our synthesised directory listing later. We
+ // having to filter it from our synthesized directory listing later. We
// already filtered off any data track at the end.
//
CdReleaseVcb( IrpContext, Vcb );
//
- // Send notification that the volume is avaliable.
+ // Send notification that the volume is available.
//
if (NT_SUCCESS( Status )) {
Status = ObReferenceObjectByHandle( Handle,
0,
- IoFileObjectType, /* ReactOS Change: GCC/LD Incompatibily with exported kernel data */
+ IoFileObjectType, /* ReactOS Change: GCC/LD Incompatibility with exported kernel data */
KernelMode,
(PVOID*)&FileToMarkBad, /* ReactOS Change: GCC "passing argument 5 of 'ObReferenceObjectByHandle' from incompatible pointer type" */
NULL );
// and still have the disk work. As this form of error worked in NT 4.0, and
// since these disks really do exist, I don't want to change them.
//
- // If we wished to support all such media (we don't), it would be neccesary
+ // If we wished to support all such media (we don't), it would be necessary
// to clear this flag on finding ISO or HSG descriptors below.
//
// into the name in order to reduce the chance of name conflicts. We will use
// a tilde character followed by a character representation of the dirent offset.
// This will be the hexadecimal representation of the dirent offset in the directory.
- // It is actuall this offset divided by 32 since we don't need the full
+ // It is actually this offset divided by 32 since we don't need the full
// granularity.
//
//
// Figure out the maximum number of characters we can copy of the base
- // name. We subract the number of characters in the dirent string from 8.
+ // name. We subtract the number of characters in the dirent string from 8.
// We will copy this many characters or stop when we reach a '.' character
// or a '~' character in the name.
//
COMPARISON - returns
- LessThan if NameA < NameB lexicalgraphically,
- GreaterThan if NameA > NameB lexicalgraphically,
+ LessThan if NameA < NameB lexicographically,
+ GreaterThan if NameA > NameB lexicographically,
EqualTo if NameA is equal to NameB
--*/
//
// Loop through looking at all of the characters in both strings
- // testing for equalilty, less than, and greater than
+ // testing for equality, less than, and greater than
//
i = RtlCompareMemory( NameA->Buffer, NameB->Buffer, MinLength );
of the tree. The children of a given directory will be grouped together.
The directories are assigned ordinal numbers based on their position in
- the path table. The root dirctory is assigned ordinal value 1.
+ the path table. The root directory is assigned ordinal value 1.
Path table sectors:
This routine is called to map (or allocate and copy) the next
data block in the path table. We check if the next block will
- span a view boundary and allocate an auxilary buffer in that case.
+ span a view boundary and allocate an auxiliary buffer in that case.
Arguments:
//
// Map the new block and set the enumeration context to this
- // point. Allocate an auxilary buffer if necessary.
+ // point. Allocate an auxiliary buffer if necessary.
//
CurrentLength = 2 * SECTOR_SIZE;
(FlagOn( ((ULONG) BaseOffset), VACB_MAPPING_MASK ) == LAST_VACB_SECTOR_OFFSET )) {
//
- // Map each sector individually and store into an auxilary
+ // Map each sector individually and store into an auxiliary
// buffer.
//
//
// There is a slight chance that we have allocated an
- // auxilary buffer on the previous sector.
+ // auxiliary buffer on the previous sector.
//
if (PathContext->AllocatedData) {
path entry. If this is a Joliet name then we will make sure we have
an allocated buffer and need to convert from big endian to little
endian. We also correctly update the case name. If this operation is ignore
- case then we need an auxilary buffer for the name.
+ case then we need an auxiliary buffer for the name.
For an Ansi disk we can use the name from the disk for the exact case. We only
need to allocate a buffer for the ignore case name. The on-disk representation of
// Since we were able to lock the volume, we are guaranteed to
// move this volume into dismount state and disconnect it from
// the underlying storage stack. The force on our part is actually
- // unnecesary, though complete.
+ // unnecessary, though complete.
//
// What is not strictly guaranteed, though, is that the closes
// for the metadata streams take effect synchronously underneath
//
// The reason this is the case is that handles/fileobjects place a reference
// on the device objects they overly. In the filesystem case, these references
- // are on our target devices. PnP correcly thinks that if references remain
+ // are on our target devices. PnP correctly thinks that if references remain
// on the device objects in the stack that someone has a handle, and that this
// counts as a reason to not succeed the query - even though every interrogated
// driver thinks that it is OK.
CdReleaseCdData( IrpContext );
//
- // Cleanup our IrpContext and complete the IRP if neccesary.
+ // Cleanup our IrpContext and complete the IRP if necessary.
//
CdCompleteRequest( IrpContext, Irp, Status );
// (the only case in which this will be the first warning).
//
// Note that it is entirely unlikely that we will be around
- // for a REMOVE in the first two cases, as we try to intiate
+ // for a REMOVE in the first two cases, as we try to initiate
// dismount.
//
//
// Now make our dismount happen. This may not vaporize the
// Vcb, of course, since there could be any number of handles
- // outstanding if we were not preceeded by a QUERY.
+ // outstanding if we were not preceded by a QUERY.
//
// PnP will take care of disconnecting this stack if we
// couldn't get off of it immediately.
}
//
- // If not acquired and the user didn't specifiy IgnoreWait then
+ // If not acquired and the user didn't specify IgnoreWait then
// raise CANT_WAIT.
//
CdUpdateVcbCondition( Vcb, VcbMountInProgress);
//
- // Refererence the Vcb for two reasons. The first is a reference
+ // Reference the Vcb for two reasons. The first is a reference
// that prevents the Vcb from going away on the last close unless
// dismount has already occurred. The second is to make sure
// we don't go into the dismount path on any error during mount
if (ARGUMENT_PRESENT( RawIsoVd )) {
//
- // Create the path table Fcb and refererence it and the Vcb.
+ // Create the path table Fcb and reference it and the Vcb.
//
CdLockVcb( IrpContext, Vcb );
ULONG RootDirectorySize;
//
- // Create the path table Fcb and refererence it and the Vcb.
+ // Create the path table Fcb and reference it and the Vcb.
//
CdLockVcb( IrpContext, Vcb );
This routine is called to delete a Vcb which failed mount or has been
dismounted. The dismount code should have already removed all of the
- open Fcb's. We do nothing here but clean up other auxilary structures.
+ open Fcb's. We do nothing here but clean up other auxiliary structures.
Arguments:
This routine is called to cleanup and possibly deallocate the Irp Context.
If the request is being posted or this Irp Context is possibly on the
- stack then we only cleanup any auxilary structures.
+ stack then we only cleanup any auxiliary structures.
Arguments:
Routine Description:
This routine is called to cleanup and deallocate an Fcb. We know there
- are no references remaining. We cleanup any auxilary structures and
+ are no references remaining. We cleanup any auxiliary structures and
deallocate this Fcb.
Arguments:
- Fcb - This is the Fcb to deallcoate.
+ Fcb - This is the Fcb to deallocate.
Return Value:
//
// We had some trouble trying to perform the verify or raised
// an error ourselves. So we'll abort the I/O request with
- // the error status that we get back from the execption code.
+ // the error status that we get back from the exception code.
//
Status = CdProcessException( IrpContext, Irp, GetExceptionCode() );
}
//
- // Raise the verify / error if neccessary.
+ // Raise the verify / error if necessary.
//
if (ForceVerify || !NT_SUCCESS( Status)) {
is to be returned
Length - Supplies the length of the buffer in byte. This variable
- upon return recieves the remaining bytes free in the buffer
+ upon return receives the remaining bytes free in the buffer
Return Value:
is to be returned
Length - Supplies the length of the buffer in byte. This variable
- upon return recieves the remaining bytes free in the buffer
+ upon return receives the remaining bytes free in the buffer
Return Value:
is to be returned
Length - Supplies the length of the buffer in byte. This variable
- upon return recieves the remaining bytes free in the buffer
+ upon return receives the remaining bytes free in the buffer
Return Value:
is to be returned
Length - Supplies the length of the buffer in byte. This variable
- upon return recieves the remaining bytes free in the buffer
+ upon return receives the remaining bytes free in the buffer
Return Value:
IN PIRP Irp
@@ -2294,9 +2295,9 @@
- Status = ObReferenceObjectByHandle( Handle,
- 0,
-- *IoFileObjectType,
-+ IoFileObjectType, /* ReactOS Change: GCC/LD Incompatibily with exported kernel data */
- KernelMode,
-- &FileToMarkBad,
-+ (PVOID*)&FileToMarkBad, /* ReactOS Change: GCC "passing argument 5 of 'ObReferenceObjectByHandle' from incompatible pointer type" */
+ Status = ObReferenceObjectByHandle( Handle,\r
+ 0,\r
+- *IoFileObjectType,\r
++ IoFileObjectType, /* ReactOS Change: GCC/LD Incompatibility with exported kernel data */\r
+ KernelMode,\r
+- &FileToMarkBad,\r
++ (PVOID*)&FileToMarkBad, /* ReactOS Change: GCC "passing argument 5 of 'ObReferenceObjectByHandle' from incompatible pointer type" */\r
NULL );
if (!NT_SUCCESS(Status)) {
Routine Description:
- This routine performs any neccessary work before STATUS_PENDING is
+ This routine performs any necessary work before STATUS_PENDING is
returned with the Fsd thread. This routine is called within the
filesystem and by the oplock package.
Routine Description:
- This routine is called to acually store the posted Irp to the Fsp
+ This routine is called to actually store the posted Irp to the Fsp
workque.
Arguments:
return STATUS_OBJECT_PATH_NOT_FOUND;
}
- /* Check for illegal characters and illegale dot sequences in the file name */
+ /* Check for illegal characters and illegal dot sequences in the file name */
PathNameU = FileObject->FileName;
c = PathNameU.Buffer + PathNameU.Length / sizeof(WCHAR);
last = c - 1;
index = longNameEntry->id & 0x3f; // Note: it can be 0 for corrupted FS
- /* Make sure index is valid and we have enaugh space in buffer
+ /* Make sure index is valid and we have enough space in buffer
(we count one char for \0) */
if (index > 0 &&
index * 13 < DirContext->LongNameU.MaximumLength / sizeof(WCHAR))
/*
* try to find contiguous entries frees in directory,
- * extend a directory if is neccesary
+ * extend a directory if is necessary
*/
BOOLEAN
vfatFindDirSpace(
FALSE);
if (!NT_SUCCESS(Status))
{
- DPRINT("VfatBlockDeviceIoControl faild (%x)\n", Status);
+ DPRINT("VfatBlockDeviceIoControl failed (%x)\n", Status);
return Status;
}
FALSE);
if (!NT_SUCCESS(Status))
{
- DPRINT("VfatBlockDeviceIoControl faild (%x)\n", Status);
+ DPRINT("VfatBlockDeviceIoControl failed (%x)\n", Status);
return Status;
}
{
/*
* FIXME:
- * Preformated floppy disks have very often a serial number of 0000:0000.
+ * Preformatted floppy disks have very often a serial number of 0000:0000.
* We should calculate a crc sum over the sectors from the root directory as secondary volume number.
* Each write to the root directory must update this crc sum.
*/
FILE_LOCK FileLock;
/*
- * Optimalization: caching of last read/write cluster+offset pair. Can't
+ * Optimization: caching of last read/write cluster+offset pair. Can't
* be in VFATCCB because it must be reset everytime the allocated clusters
* change.
*/
/* Make sure that we haven't already loaded the FS */
if (DeviceExtension->State != Loaded)
{
- /* Unregiser us, and set us as loaded */
+ /* Unregister us, and set us as loaded */
IoUnregisterFileSystem(DeviceObject);
DeviceExtension->State = Loaded;
}
0);
if (NT_SUCCESS(Status))
{
- /* We suceeded, close the handle */
+ /* We succeeded, close the handle */
ZwClose(FileHandle);
}
else if (Status != STATUS_OBJECT_NAME_NOT_FOUND)
// Block number of the block containing the first journal node.
UINT32 jp_journal_1st_block; /* where does journal start from on its device */
- // Journal device number (?? for if the journal is on a seperate drive ??)
+ // Journal device number (?? for if the journal is on a separate drive ??)
UINT32 jp_journal_dev; /* journal device st_rdev */
// Original journal size. (Needed when using partition on systems w/ different default journal sizes).
KeyName.MaximumLength = sizeof(L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Mup");
/* Simply query registry to know whether we have to disable DFS.
- * Unless explicitely stated in registry, we will try to enable DFS.
+ * Unless explicitly stated in registry, we will try to enable DFS.
*/
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
RtlMoveMemory(FullPath, UncProvider->DeviceName.Buffer, UncProvider->DeviceName.Length);
RtlMoveMemory((PWSTR)((ULONG_PTR)FullPath + UncProvider->DeviceName.Length), FileObject->FileName.Buffer, FileObject->FileName.Length);
- /* And redo the path in the file oject */
+ /* And redo the path in the file object */
ExFreePoolWithTag(FileObject->FileName.Buffer, 0);
FileObject->FileName.Buffer = FullPath;
FileObject->FileName.MaximumLength = TotalLength;
}
/* Otherwise, if the prefix was in the prefix table, just drop it:
- * we have a provider which superseeds the accepted prefix, so leave
+ * we have a provider which supersedes the accepted prefix, so leave
* room for the new prefix/provider
*/
ExAcquireResourceExclusiveLite(&MupPrefixTableLock, TRUE);
TableStatus = MupOrderedErrorList[0];
LatestPos = 0;
- /* Otherwise, time to compare statuteses, between the latest failed
+ /* Otherwise, time to compare statuses, between the latest failed
* and the current failure.
* We have an order table of failed status: the deeper you go in the
* table, the more the error is critical.
}
}
- //FIXME: Get cannonical path name (remove .'s, ..'s and extra separators)
+ //FIXME: Get canonical path name (remove .'s, ..'s and extra separators)
DPRINT("PathName to open: %S\n", FileName);
parentFCB = NULL;
- /* Parse filename and check each path element for existance and access */
+ /* Parse filename and check each path element for existence and access */
while (NtfsGetNextPathElement(currentElement) != 0)
{
/* Skip blank directory levels */
ULONG BytesAllocated; /* Allocated size of the FILE record */
ULONGLONG BaseFileRecord; /* File reference to the base FILE record */
USHORT NextAttributeNumber; /* Next Attribute Id */
- USHORT Pading; /* Align to 4 UCHAR boundary (XP) */
+ USHORT Padding; /* Align to 4 UCHAR boundary (XP) */
ULONG MFTRecordNumber; /* Number of this MFT Record (XP) */
} FILE_RECORD_HEADER, *PFILE_RECORD_HEADER;
NTSTATUS
FltpAttachDeviceObject(
_In_ PDEVICE_OBJECT SourceDevice,
- _In_ PDEVICE_OBJECT Targetevice,
+ _In_ PDEVICE_OBJECT TargetDevice,
_Out_ PDEVICE_OBJECT *AttachedToDeviceObject
);
}
/*
- * Try to get the storage stack (disk) device object accociated with
+ * Try to get the storage stack (disk) device object associated with
* this file system device object. Ignore the device if we don't have one
*/
Status = IoGetDiskDeviceObject(DeviceList[i],
&NewDeviceObject);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Failed to create a DO for attatching to a FS : 0x%X\n", Status);
+ DPRINT1("Failed to create a DO for attaching to a FS : 0x%X\n", Status);
return Status;
}
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = FltpFsControl;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = FltpDeviceControl;
- /* The FastIo diapatch table is stored in the pool along with a tag */
+ /* The FastIo dispatch table is stored in the pool along with a tag */
FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_IO_DISPATCH), FM_TAG_DISPATCH_TABLE);
if (FastIoDispatch == NULL) return STATUS_INSUFFICIENT_RESOURCES;
/* The file system we're attached to */
PDEVICE_OBJECT AttachedToDeviceObject;
- /* The storage stack(disk) accociated with the file system device object we're attached to */
+ /* The storage stack(disk) associated with the file system device object we're attached to */
PDEVICE_OBJECT StorageStackDeviceObject;
/* Either physical drive for volume device objects otherwise
return STATUS_BUFFER_TOO_SMALL;
}
- /* Copy symoblic name */
+ /* Copy symbolic name */
SymbolicName->Length = ReparseDataBuffer->MountPointReparseBuffer.SubstituteNameLength;
RtlCopyMemory(SymbolicName->Buffer,
(PWSTR)((ULONG_PTR)ReparseDataBuffer->MountPointReparseBuffer.PathBuffer +
goto Cleanup;
}
- /* Finish initating strings */
+ /* Finish initiating strings */
RtlCopyMemory(DatabaseName.Buffer, DeviceInformation->DeviceName.Buffer, DeviceInformation->DeviceName.Length);
RtlCopyMemory(DatabaseName.Buffer + (DeviceInformation->DeviceName.Length / sizeof(WCHAR)),
RemoteDatabase.Buffer, RemoteDatabase.Length);
}
}
- /* No, ensure that the device is not automonted nor removable */
+ /* No, ensure that the device is not automounted nor removable */
if (!DeviceExtension->NoAutoMount && !Removable)
{
if (DriveLetterInfo->DriveLetterWasAssigned)
FreePool(DeviceName.Buffer);
}
- /* Return found intormation */
+ /* Return found information */
if (NextEntry == &(DeviceExtension->DeviceListHead))
{
return STATUS_OBJECT_NAME_NOT_FOUND;
}
}
- /* Releave driver */
+ /* Release driver */
KeReleaseSemaphore(&(DeviceExtension->DeviceLock), IO_NO_INCREMENT, 1, FALSE);
}
}
IoReleaseCancelSpinLock(OldIrql);
- /* Then, notifiy them one by one */
+ /* Then, notify them one by one */
while (!IsListEmpty(&CopyList))
{
NextEntry = RemoveHeadList(&CopyList);
return Status;
}
- /* Size for volume namespace, litteral GUID, and null char */
+ /* Size for volume namespace, literal GUID, and null char */
VolumeName->MaximumLength = 0x14 + 0x4C + sizeof(UNICODE_NULL);
VolumeName->Buffer = AllocatePool(0x14 + 0x4C + sizeof(UNICODE_NULL));
if (!VolumeName->Buffer)
KeInitializeEvent(&Event, NotificationEvent, FALSE);
//
- // now allocte the irp
+ // now allocate the irp
//
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
if (!Irp)
if (DeviceExtension->PowerInterfaceName.MaximumLength == 0)
{
- /* We have never registred this interface ; do it */
+ /* We have never registered this interface ; do it */
Status = IoRegisterDeviceInterface(
DeviceExtension->Common.Pdo,
&GUID_DEVICE_SYS_BUTTON,
return;
}
}
- /* Enable the interface. This leads to receving a IOCTL_GET_SYS_BUTTON_CAPS,
+ /* Enable the interface. This leads to receiving a IOCTL_GET_SYS_BUTTON_CAPS,
* so we can report new capability */
Status = IoSetDeviceInterfaceState(
&DeviceExtension->PowerInterfaceName,
* PROJECT: ReactOS i8042 (ps/2 keyboard-mouse controller) driver
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/input/i8042prt/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
* PROGRAMMERS: Copyright 2006-2007 Hervé Poussineau (hpoussin@reactos.org)
*/
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
/* Register interface ; ignore the error (if any) as having
- * a registred interface is not so important... */
+ * a registered interface is not so important... */
Status = IoRegisterDeviceInterface(
Pdo,
&GUID_DEVINTERFACE_KEYBOARD,
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Keyboard class driver
* FILE: drivers/input/kbdclass/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
*
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
*/
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Mouse class driver
* FILE: drivers/input/mouclass/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
*
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
*/
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
/* Register interface ; ignore the error (if any) as having
- * a registred interface is not so important... */
+ * a registered interface is not so important... */
Status = IoRegisterDeviceInterface(
Pdo,
&GUID_DEVINTERFACE_MOUSE,
* PROJECT: ReactOS Serial mouse driver
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/input/sermouse/fdo.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
* PROGRAMMERS: Copyright 2005-2006 Hervé Poussineau (hpoussin@reactos.org)
*/
receiving mouse information (and if you are making mouse then send out
7 databits and 2 stop bits).
The byte marked with 1. is send first, then the others. The bit D6 in
- the first byte is used for syncronizing the software to mouse packets
+ the first byte is used for synchronizing the software to mouse packets
if it goes out of sync.
LB is the state of the left button (1 means pressed down)
Logitech serial mouse
Logitech uses the Microsoft serial mouse protocol in their mouses (for
- example Logitech Pilot mouse and others). The origianal protocol supports
+ example Logitech Pilot mouse and others). The original protocol supports
only two buttons, but logitech as added third button to some of their
mouse models. To make this possible logitech has made one extension to
the protocol.
if (AutomationTableA && AutomationTableB)
{
- // FIXME handle different propery item sizes
+ // FIXME handle different property item sizes
ASSERT(AutomationTableA->PropertyItemSize == AutomationTableB->PropertyItemSize);
}
/* sanity check */
ASSERT(ObjectHeader);
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
Clock = (PKSICLOCK)ObjectHeader->ObjectType;
Resolution->Error = Clock->DefaultClock->Error;
/* sanity check */
ASSERT(ObjectHeader);
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
Clock = (PKSICLOCK)ObjectHeader->ObjectType;
*State = Clock->DefaultClock->State;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation(Irp);
- /* santiy check */
+ /* sanity check */
ASSERT(IoStack->FileObject != NULL);
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
DataRange->FormatSize, DataRange->SampleSize, DataRange->Alignment, DataRange->Flags, DataRange->Reserved, DataLength);
/* FIXME implement KsPinDataIntersectionEx */
- /* Call miniport's properitary handler */
+ /* Call miniport's proprietary handler */
Status = This->Filter.Descriptor->PinDescriptors[Pin->PinId].IntersectHandler(&This->Filter,
Irp,
Pin,
if (Result && NT_SUCCESS(IoStatusBlock->Status))
{
- /* request was handeled and succeeded */
+ /* request was handled and succeeded */
return STATUS_SUCCESS;
}
}
if (Result && NT_SUCCESS(IoStatusBlock->Status))
{
- /* request was handeled and succeeded */
+ /* request was handled and succeeded */
return STATUS_SUCCESS;
}
}
if (Ret)
{
- /* the request was handeled */
+ /* the request was handled */
return IoStatusBlock->Status;
}
}
if (Ret)
{
- /* the request was handeled */
+ /* the request was handled */
return IoStatusBlock->Status;
}
}
/* sanity check */
ASSERT(ObjectHeader);
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
/* sanity check */
/* get the object header */
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
/* acquire control mutex */
/* get the object header */
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
/* setting allocator flags is not supported */
/* get the object header */
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
/* acquire control mutex */
/* get the object header */
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
- /* locate ks pin implemention from KSPIN offset */
+ /* locate ks pin implementation from KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
/* current irp stack */
/* get the object header */
ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2;
- /* locate ks pin implemention fro KSPIN offset */
+ /* locate ks pin implementation fro KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin);
if (This->Pin.Descriptor->Dispatch->Close)
/* sanity check */
ASSERT(Pin);
- /* locate ks pin implemention fro KSPIN offset */
+ /* locate ks pin implementation fro KSPIN offset */
This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin);
/* sanity check */
This->Pin.ResetState = KSRESET_END;
This->Pin.ClientState = KSSTATE_STOP;
- /* intialize allocator create item */
+ /* initialize allocator create item */
CreateItem[0].Context = (PVOID)&This->Pin;
CreateItem[0].Create = IKsPin_DispatchCreateAllocator;
CreateItem[0].Flags = KSCREATE_ITEM_FREEONSTOP;
RtlInitUnicodeString(&CreateItem[0].ObjectClass, KSSTRING_Allocator);
- /* intialize clock create item */
+ /* initialize clock create item */
CreateItem[1].Context = (PVOID)&This->Pin;
CreateItem[1].Create = IKsPin_DispatchCreateClock;
CreateItem[1].Flags = KSCREATE_ITEM_FREEONSTOP;
RtlInitUnicodeString(&CreateItem[1].ObjectClass, KSSTRING_Clock);
- /* intialize topology node create item */
+ /* initialize topology node create item */
CreateItem[2].Context = (PVOID)&This->Pin;
CreateItem[2].Create = IKsPin_DispatchCreateNode;
CreateItem[2].Flags = KSCREATE_ITEM_FREEONSTOP;
if (!KsWorker)
return STATUS_INSUFFICIENT_RESOURCES;
- /* initialze the work ctx */
+ /* initialize the work ctx */
ExInitializeWorkItem(&KsWorker->WorkItem, WorkItemRoutine, (PVOID)KsWorker);
/* setup type */
KsWorker->Type = WorkQueueType;
#define MIXER_INTERRUPT_SETUP_REGISTER 0x80
#define MIXER_DMA_SETUP_REGISTER 0x81
-#define MIXER_INTERRUP_STATUS_REGISTEER 0x82
+#define MIXER_INTERRUPT_STATUS_REGISTEER 0x82
void get_dma(SB16* sb16);
unsigned char read_mixer(unsigned short base,unsigned char reg);
sb16.buffer=((unsigned char*)tmp[i-1]);
/*
- * Because this is used by alomost every subsystem including irqs it
+ * Because this is used by almost every subsystem including irqs it
* must be atomic. The following code sequence disables interrupts after
* saving the previous state of the interrupt flag
*/
}
else
{
- /* Unexpected disconnect by the remote host or initial read after a graceful disconnnect */
+ /* Unexpected disconnect by the remote host or initial read after a graceful disconnect */
Status = FCB->LastReceiveStatus;
}
NextIrp->IoStatus.Status = Status;
/*
* The Irp parameter passed in is the IRP of the stream between AFD and
- * TDI driver. It's not very usefull to us. We need the IRPs of the stream
+ * TDI driver. It's not very useful to us. We need the IRPs of the stream
* between usermode and AFD. Those are chained from
* FCB->PendingIrpList[FUNCTION_SEND] and you'll see them in the code
* below as "NextIrp" ('cause they are the next usermode IRP to be
/* Define NOCARD to test NDIS without a card */
//#define NOCARD
-/* NE2000 sepcific constants */
+/* NE2000 specific constants */
#define NIC_DATA 0x10 /* Data register */
#define NIC_RESET 0x1F /* Reset register */
Adapter->LookaheadSize = GenericULONG;
break;
case OID_802_3_MULTICAST_LIST:
- /* Verify length. Must be multiplum of hardware address length */
+ /* Verify length. Must be multiple of hardware address length */
if ((InformationBufferLength % DRIVER_LENGTH_OF_ADDRESS) != 0) {
*BytesRead = 0;
*BytesNeeded = 0;
* 09-Sep-2003 vizzini - Created
* 10-Oct-2004 navaraf - Fix receive to work on VMware adapters (
* need to set busmaster bit on PCI).
- * - Indicate receive completition.
+ * - Indicate receive completion.
* - Implement packet transmitting.
* - Don't read slot number from registry and
* report itself as NDIS 5.0 miniport.
if (Descriptor->FLAGS2 & TD2_LCOL)
Adapter->Statistics.XmtLateCollisions++;
if (Descriptor->FLAGS2 & TD2_EXDEF)
- Adapter->Statistics.XmtExcessiveDefferals++;
+ Adapter->Statistics.XmtExcessiveDeferrals++;
if (Descriptor->FLAGS2 & TD2_UFLO)
Adapter->Statistics.XmtBufferUnderflows++;
if (Descriptor->FLAGS2 & TD2_BUFF)
IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3)
/*
- * FUNCTION: Periodially query media state
+ * FUNCTION: Periodically query media state
* ARGUMENTS:
* FunctionContext: Adapter context
* NOTES:
ULONG XmtLossesOfCarrier;
ULONG XmtCollisions;
ULONG XmtLateCollisions;
- ULONG XmtExcessiveDefferals;
+ ULONG XmtExcessiveDeferrals;
ULONG XmtBufferUnderflows;
ULONG XmtBufferErrors;
ULONG XmtOneRetry;
USHORT MCNT; /* message byte count ; always AND with 0x0fff */
UCHAR RPC; /* runt packet count */
UCHAR RCC; /* receive collision count */
- ULONG RES; /* resereved */
+ ULONG RES; /* reserved */
} RECEIVE_DESCRIPTOR, *PRECEIVE_DESCRIPTOR;
/* receive descriptor flags */
/*
* ReactOS AMD PCNet Driver
*
- * Copyright (C) 2000 Casper Hornstroup <chorns@users.sourceforge.net>
+ * Copyright (C) 2000 Casper Hornstrup <chorns@users.sourceforge.net>
* Copyright (C) 2003 Vizzini <vizzini@plasmic.com>
* Copyright (C) 2004 Filip Navara <navaraf@reactos.com>
*
Adapter->Statistics.XmtLossesOfCarrier +
Adapter->Statistics.XmtCollisions +
Adapter->Statistics.XmtLateCollisions +
- Adapter->Statistics.XmtExcessiveDefferals +
+ Adapter->Statistics.XmtExcessiveDeferrals +
Adapter->Statistics.XmtBufferUnderflows +
Adapter->Statistics.XmtBufferErrors;
break;
//EEPROM Commands
#define EE_READ_CMD 0x06
-#define RSR_MAR 0x8000 //Mulicast receive
+#define RSR_MAR 0x8000 //Multicast receive
#define RSR_PAM 0x4000 //Physical address match (directed packet)
#define RSR_BAR 0x2000 //Broadcast receive
#define RSR_ISE 0x0020 //Invalid symbol
/*!
* @brief Called by NDIS during NdisRegisterProtocol to set up initial
- * bindings, and periodically thereafer as new adapters come online
+ * bindings, and periodically thereafter as new adapters come online
*
* @param Status - Return value to NDIS
* @param BindContext - Handle provided by NDIS to track pending binding operations
exFreePool(Data);
}
- /* Finally free the NDIS packet discriptor */
+ /* Finally free the NDIS packet descriptor */
NdisFreePacket(Packet);
UntrackFL(File,Line,Packet);
}
DstSize -= BytesToCopy;
if (DstSize == 0) {
- /* No more bytes in desination buffer. Proceed to
+ /* No more bytes in destination buffer. Proceed to
the next buffer in the destination buffer chain */
NdisGetNextBuffer(DstBuffer, &DstBuffer);
if (!DstBuffer)
* Whenever a read operation is performed, the NDIS library allocates space and returns
* it. A linked list is kept associated with every handle of the memory allocated to
* it. When the handle is closed, the resources are systematically released.
- * - The NDIS_HANDLE Configuraiton context is no longer a registry handle. An opaque struct
+ * - The NDIS_HANDLE Configuration context is no longer a registry handle. An opaque struct
* had to be created to allow for resource tracking. This means that Miniports cannot just
* pass this NDIS_HANDLE to things like ZwQueryValueKey(). I don't thknk they do (they
* certainly should not), but it should be kept in mind.
/*
* FUNCTION: Construct an ethernet filter
* ARGUMENTS:
- * MaximumMulticastAddresses: Maximum number of multicast adderesses.
+ * MaximumMulticastAddresses: Maximum number of multicast addresses.
* AdapterAddress: Current ethernet address of the adapter.
* Filter: The created filter on successful return.
* RETURNS:
/*
* FUNCTION: Called back during reservation of map registers
* ARGUMENTS:
- * DeviceObject: Device object of the deivce setting up DMA
+ * DeviceObject: Device object of the device setting up DMA
* Irp: Reserved; must be ignored
* MapRegisterBase: Map registers assigned for transfer
* Context: LOGICAL_ADAPTER object of the requesting miniport
/*
* FUNCTION: Called back during reservation of map registers
* ARGUMENTS:
- * DeviceObject: Device object of the deivce setting up DMA
+ * DeviceObject: Device object of the device setting up DMA
* Irp: Reserved; must be ignored
* MapRegisterBase: Map registers assigned for transfer
* Context: LOGICAL_ADAPTER object of the requesting miniport
* NOTES:
* - Must be called at IRQL <= DISPATCH_LEVEL
* - The basic idea: call IoMapTransfer() in a loop as many times as it takes
- * in order to map all of the virtual memory to physical memoroy readable
+ * in order to map all of the virtual memory to physical memory readable
* by the device
* - The caller supplies storage for the physical address array.
*/
* ARGUMENTS:
* - MiniportAdapterHandle: handle originally input to MiniportInitialize
* - Buffer: NDIS_BUFFER to complete the mapping on
- * - PhyscialMapRegister: the chosen map register
+ * - PhysicalMapRegister: the chosen map register
* NOTES:
* - May be called at IRQL <= DISPATCH_LEVEL
*/
* ARGUMENTS:
* LogHandle: pointer to the driver object of the protocol logging the event
* EventCode: NDIS_STATUS_XXX describing the event
- * UniqueEventValue: identifiees this instance of the error value
+ * UniqueEventValue: identifies this instance of the error value
* NumStrings: number of strings in StringList
* StringList: list of strings to log
* DataSize: number of bytes in Data
/*
* FUNCTION: Handle the PnP start device event
* ARGUMENTS:
- * DeviceObejct = Functional Device Object
+ * DeviceObject = Functional Device Object
* Irp = IRP_MN_START_DEVICE I/O request packet
* RETURNS:
* Status of operation
/*
* FUNCTION: Handle the PnP stop device event
* ARGUMENTS:
- * DeviceObejct = Functional Device Object
+ * DeviceObject = Functional Device Object
* Irp = IRP_MN_STOP_DEVICE I/O request packet
* RETURNS:
* Status of operation
* Get name of the Linkage registry key for our adapter. It's located under
* the driver key for our driver and so we have basicly two ways to do it.
* Either we can use IoOpenDriverRegistryKey or compose it using information
- * gathered by IoGetDeviceProperty. I choosed the second because
+ * gathered by IoGetDeviceProperty. I chose the second because
* IoOpenDriverRegistryKey wasn't implemented at the time of writing.
*/
* MediumArray = Pointer to an array of NDIS_MEDIUMs called can support
* MediumArraySize = Number of elements in MediumArray
* NdisProtocolHandle = Handle returned by NdisRegisterProtocol
- * ProtocolBindingContext = Pointer to caller suplied context area
+ * ProtocolBindingContext = Pointer to caller supplied context area
* AdapterName = Pointer to buffer with name of adapter
* OpenOptions = Bitmask with flags passed to next-lower driver
* AddressingInformation = Optional pointer to buffer with NIC specific information
* Timer: pointer to the timer object to set
* MillisecondsPeriod: period of the timer
* NOTES:
- * - Minimum predictible interval is ~10ms
+ * - Minimum predictable interval is ~10ms
* - Must be called at IRQL <= DISPATCH_LEVEL
*/
{
* Timer: timer object to set
* MillisecondsToDelay: time to wait for the timer to expire
* NOTES:
- * - Minimum predictible interval is ~10ms
+ * - Minimum predictable interval is ~10ms
* - Must be called at IRQL <= DISPATCH_LEVEL
*/
{
* Timer: timer object to set
* MillisecondsToDelay: time to wait for the timer to expire
* NOTES:
- * - Minimum predictible interval is ~10ms
+ * - Minimum predictable interval is ~10ms
* - Must be called at IRQL <= DISPATCH_LEVEL
*/
{
switch (Adapter->Media)
{
case NdisMedium802_3:
- /* Ethernet and IEEE 802.3 frames can be destinguished by
+ /* Ethernet and IEEE 802.3 frames can be distinguished by
looking at the IEEE 802.3 length field. This field is
less than or equal to 1500 for a valid IEEE 802.3 frame
and larger than 1500 is it's a valid EtherType value.
IN PVOID SystemSpecific2)
/*
* FUNCTION: Called by NDIS during NdisRegisterProtocol to set up initial
- * bindings, and periodically thereafer as new adapters come online
+ * bindings, and periodically thereafter as new adapters come online
* ARGUMENTS:
* Status: Return value to NDIS
* BindContext: Handle provided by NDIS to track pending binding operations
* separated swab functions from cpu_to_XX,
* to clean up support for bizarre-endian architectures.
*
- * See asm-i386/byteorder.h and suches for examples of how to provide
+ * See asm-i386/byteorder.h and such for examples of how to provide
* architecture-dependent optimized versions
*
*/
#endif
/*
- * Macros for declaration and initialisaton of the datatypes
+ * Macros for declaration and initialisation of the datatypes
*/
#if WAITQUEUE_DEBUG
* The first 3 are only valid when the allocator as been build
* SLAB_DEBUG_SUPPORT.
*/
-#define SLAB_DEBUG_FREE 0x00000100UL /* Peform (expensive) checks on free */
+#define SLAB_DEBUG_FREE 0x00000100UL /* Perform (expensive) checks on free */
#define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */
#define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */
#define SLAB_POISON 0x00000800UL /* Poison objects */
/*
- * Scaleable version of the fd_set.
+ * Scalable version of the fd_set.
*/
typedef struct {
/* RTT measurement */
__u8 backoff; /* backoff */
- __u32 srtt; /* smothed round trip time << 3 */
+ __u32 srtt; /* smoothed round trip time << 3 */
__u32 mdev; /* medium deviation */
__u32 mdev_max; /* maximal mdev for the last rtt period */
__u32 rttvar; /* smoothed mdev_max */
*/
#define TCP_SYN_RETRIES 5 /* number of times to retry active opening a
- * connection: ~180sec is RFC minumum */
+ * connection: ~180sec is RFC minimum */
#define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a
- * connection: ~180sec is RFC minumum */
+ * connection: ~180sec is RFC minimum */
#define TCP_ORPHAN_RETRIES 7 /* number of times to retry on an orphaned
/* TCP timestamps are only 32-bits, this causes a slight
* complication on 64-bit systems since we store a snapshot
- * of jiffies in the buffer control blocks below. We decidely
+ * of jiffies in the buffer control blocks below. We decidedly
* only use of the low 32-bits of jiffies and hide the ugly
* casts with the following macro.
*/
#endif
}
-/* Set slow start threshould and cwnd not falling to slow start */
+/* Set slow start threshold and cwnd not falling to slow start */
static __inline void __tcp_enter_cwr(struct tcp_opt *tp)
{
#if 0
#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
#define TCP_MAXSEG 2 /* Limit MSS */
#define TCP_CORK 3 /* Never send partially complete segments */
-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
+#define TCP_KEEPIDLE 4 /* Start keepalives after this period */
#define TCP_KEEPINTVL 5 /* Interval between keepalives */
#define TCP_KEEPCNT 6 /* Number of keepalives before death */
#define TCP_SYNCNT 7 /* Number of SYN retransmits */
#define DD_RAWIP_DEVICE_NAME L"\\Device\\RawIp"
/* For NDIS protocol registration */
-/* The DDK says you have to register with the name that's regstered with SCM, e.g. tcpip */
+/* The DDK says you have to register with the name that's registered with SCM, e.g. tcpip */
#define IP_DEVICE_NAME L"\\Device\\Ip"
#define TCPIP_PROTOCOL_NAME L"Tcpip"
#endif /* _NTTEST_ */
PADDRESS_FILE AddressFile; /* Associated address file object (NULL if none) */
/* Requests */
- LIST_ENTRY ConnectRequest; /* Queued connect rqueusts */
+ LIST_ENTRY ConnectRequest; /* Queued connect requests */
LIST_ENTRY ListenRequest; /* Queued listen requests */
LIST_ENTRY ReceiveRequest; /* Queued receive requests */
LIST_ENTRY SendRequest; /* Queued send requests */
DstSize -= BytesToCopy;
if (DstSize == 0) {
- /* No more bytes in desination buffer. Proceed to
+ /* No more bytes in destination buffer. Proceed to
the next buffer in the destination buffer chain */
NdisGetNextBuffer(DstBuffer, &DstBuffer);
if (!DstBuffer)
ExFreePoolWithTag(Data, PACKET_BUFFER_TAG);
}
- /* Finally free the NDIS packet discriptor */
+ /* Finally free the NDIS packet descriptor */
NdisFreePacket(Packet);
}
if (Connection->AddressFile) {
ObDereferenceObject(FileObject);
UnlockObject(Connection, OldIrql);
- TI_DbgPrint(MID_TRACE, ("An address file is already asscociated.\n"));
+ TI_DbgPrint(MID_TRACE, ("An address file is already associated.\n"));
return STATUS_INVALID_PARAMETER;
}
DstSize -= BytesToCopy;
if (DstSize == 0) {
- /* No more bytes in desination buffer. Proceed to
+ /* No more bytes in destination buffer. Proceed to
the next buffer in the destination buffer chain */
NdisGetNextBuffer(DstBuffer, &DstBuffer);
if (!DstBuffer)
exFreePool(Data);
}
- /* Finally free the NDIS packet discriptor */
+ /* Finally free the NDIS packet descriptor */
UntrackFL(File,Line,Packet);
NdisFreePacket(Packet);
}
_AssertEqualValue(STATUS_SUCCESS, Status);
}
-_Dispatcher(IpreceiveTest, "IPReceive");
+_Dispatcher(IPReceiveTest, "IPReceive");
IN PMDL MdlChain
)
{
- /* This function is absolete */
+ /* This function is obsolete */
}
#define LPGETSTATUS 0x060b /* return LP_S(minor) */
#define LPRESET 0x060c /* reset printer */
-/* timeout for print'ing a timeout, in jiffies (100ths of a second).
+/* timeout for printing a timeout, in jiffies (100ths of a second).
This is also used for re-checking error conditions if LP_ABORT is
not set. This is the default behavior. */
break;
default:
- DPRINT1("Other ressource: \n");
+ DPRINT1("Other resource: \n");
break;
}
}
ULONG RemainingSize;
ULONG ProcessDataOffset;
// SYSTEM_PAGEFILE_INFORMATION PageFileInfo;
- // SYSTEM_PROCESS_INFORMATINO ProcessInfo;
+ // SYSTEM_PROCESS_INFORMATION ProcessInfo;
} SAC_SYSTEM_INFORMATION, *PSAC_SYSTEM_INFORMATION;
NTSTATUS
/* Set it as the current and SAC channel */
SacChannel = CurrentChannel = FoundChannel;
- /* Diasable writes for now and clear the display */
+ /* Disable writes for now and clear the display */
_InterlockedExchange(&FoundChannel->WriteEnabled, FALSE);
Status = HeadlessDispatch(HeadlessCmdClearDisplay, NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status))
PDEVICE_OBJECT DeviceObject, NextDevice;
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC UnloadHandler: Entering.\n");
- /* Go overy ever device part of the driver */
+ /* Go over every device part of the driver */
DeviceObject = DriverObject->DeviceObject;
while (DeviceObject)
{
{
ASSERT(GlobalMemoryList->Signature == GLOBAL_MEMORY_SIGNATURE);
- /* While outisde of the lock, save the next list and free this one */
+ /* While outside of the lock, save the next list and free this one */
KeReleaseSpinLock(&MemoryLock, OldIrql);
Next = GlobalMemoryList->Next;
ExFreePoolWithTag(GlobalMemoryList, 0);
InterlockedIncrement(&TotalFrees);
InterlockedExchangeAdd(&TotalBytesFreed, LocalDescriptor->Size);
- /* Acquire the memory alliocation lock */
+ /* Acquire the memory allocation lock */
GlobalDescriptor = GlobalMemoryList;
KeAcquireSpinLock(&MemoryLock, &OldIrql);
extern BOOLEAN CommandConsoleLaunchingEnabled;
//
-// Function to initailize a SAC Semaphore Lock
+// Function to initialize a SAC Semaphore Lock
//
FORCEINLINE
VOID
AlternateFont2,
AlternateFont3,
Alternatefont4,
- AlteronateFont5,
- AlteronateFont6,
+ AlternateFont5,
+ AlternateFont6,
AlternateFont7,
AlternateFont8,
AlternateFont9,
RTL_OSVERSIONINFOEXW VersionInformation;
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC Initialize Machine Information : Entering.\n");
- /* Don't do anything if we already quried this */
+ /* Don't do anything if we already queried this */
if (MachineInformation)
{
- SAC_DBG(SAC_DBG_MACHINE, "SAC Initialize Machine Information:: MachineInformationBuffer already initialzied.\n");
+ SAC_DBG(SAC_DBG_MACHINE, "SAC Initialize Machine Information:: MachineInformationBuffer already initialized.\n");
return;
}
SuiteTypeMessage = SAC_NO_SUITE_MSG;
}
- /* Get the string that correponds to the SKU type */
+ /* Get the string that corresponds to the SKU type */
MessageBuffer = GetMessage(SuiteTypeMessage);
if (!MessageBuffer)
{
NTAPI
InitializeCmdEventInfo(VOID)
{
- /* Check if we were already initailized */
+ /* Check if we were already initialized */
if (HaveUserModeServiceCmdEventInfo)
{
/* Full state expected */
Buffer = GetMessage(MessageIndex);
if (Buffer)
{
- /* Scan it looking for new lines, and increment the conut each time */
+ /* Scan it looking for new lines, and increment the count each time */
while (*Buffer) if (*Buffer++ == L'\n') ++LineCount;
}
Overflow = TRUE;
}
- /* Everything is done, set the positition one last time */
+ /* Everything is done, set the position one last time */
Position[1] = Channel->CursorRow;
Position[0] = Channel->CursorCol;
Status = VTUTF8ChannelAnsiDispatch(Channel,
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/dd/serenum/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
*
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
*/
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: Serial port driver
* FILE: drivers/dd/serial/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
*
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
*/
PortDeviceObject - to connect to SCSI port driver.
DeviceCount - Number of previously installed CDROMs.
PortCapabilities - Pointer to structure returned by SCSI port
- driver describing adapter capabilites (and limitations).
+ driver describing adapter capabilities (and limitations).
LunInfo - Pointer to configuration information for this device.
Return Value:
if (NT_SUCCESS(status) || (status == STATUS_NO_MEDIA_IN_DEVICE)) {
//
- // Using Read CD precludes issueing a mode select to
+ // Using Read CD precludes issuing a mode select to
// set the user data size. So, no buffer copy is
// necessary.
//
Irp->IoStatus.Status = STATUS_VERIFY_REQUIRED;
- DebugPrint((2, "ScsiCdRomStartIo: [%lx] Calling UpdateCapcity - "
+ DebugPrint((2, "ScsiCdRomStartIo: [%lx] Calling UpdateCapacity - "
"ioctl event = %lx\n",
Irp,
nextIrpStack->Parameters.Others.Argument1
cdb->SUBCHANNEL.SubQ = CDB_SUBCHANNEL_BLOCK;
//
- // Specify format of informatin to return
+ // Specify format of information to return
//
cdb->SUBCHANNEL.Format = inputBuffer->Format;
PortDeviceObject - to connect to SCSI port driver.
DeviceCount - Number of previously installed CDROMs.
PortCapabilities - Pointer to structure returned by SCSI port
- driver describing adapter capabilites (and limitations).
+ driver describing adapter capabilities (and limitations).
LunInfo - Pointer to configuration information for this device.
Return Value:
//
// the drive is target defect managed, and supports random writes
- // on sector-aligment. allow writes to occur by setting the error
+ // on sector-alignment. allow writes to occur by setting the error
// handler to point to a private media change detection handler.
//
Irp->IoStatus.Status = STATUS_VERIFY_REQUIRED;
TraceLog((CdromDebugTrace,
- "CdRomStartIo: [%p] Calling UpdateCapcity - "
+ "CdRomStartIo: [%p] Calling UpdateCapacity - "
"ioctl event = %p\n",
Irp,
nextIrpStack->Parameters.Others.Argument1
cdb->SUBCHANNEL.SubQ = CDB_SUBCHANNEL_BLOCK;
//
- // Specify format of informatin to return
+ // Specify format of information to return
//
cdb->SUBCHANNEL.Format = inputBuffer->Format;
Routine Description:
This routine creates a symbolic link to the cdrom device object
- under \dosdevices. The number of the cdrom device does not neccessarily
+ under \dosdevices. The number of the cdrom device does not necessarily
match between \dosdevices and \device, but usually will be the same.
Saves the buffer
ParameterName - parameter name to look up
- ParameterValuse - default parameter value
+ ParameterValue - default parameter value
Return Value:
ParameterName - parameter name
- ParameterValuse - parameter value
+ ParameterValue - parameter value
Return Value:
// SCSI_SENSE_NOT_READY/SCSI_ADSENSE_NO_MEDIA_IN_DEVICE
//
// These drives should not pass WHQL certification due
- // to this discrepency.
+ // to this discrepancy.
//
// However, we have to retry on 2/4/0 (Not ready, LUN not ready,
// no info) and also 3/2/0 (no seek complete).
// (0x01) in order to comply with WHQL standards.
//
// The default retry timeout of one second is acceptable to balance
- // these discrepencies. don't modify the status, though....
+ // these discrepancies. don't modify the status, though....
//
if (((sense->SenseKey & 0xf) == SCSI_SENSE_NOT_READY) &&
UCHAR Rpc0SystemRegion; // bitmask, one means prevent play
UCHAR Rpc0SystemRegionResetCount;
- ULONG Rpc0RetryRegistryCallback; // one until initial region choosen
+ ULONG Rpc0RetryRegistryCallback; // one until initial region chosen
KMUTEX Rpc0RegionMutex;
wearnes_devdesc = "Wearnes CD-ROM Drive"
gencdrom_devdesc = "CD-ROM Drive"
-;; Mitsumi Friendly name explictly listed
+;; Mitsumi Friendly name explicitly listed
Mitsumi_Generic_FriendlyName = "Mitsumi CD-ROM Drive"
;; Service descriptions
// these hitachi drives don't work properly in PIO mode
{ "HITACHI ", "CDR-1750S" , NULL, 0x0004 },
{ "HITACHI ", "CDR-3650/1650S" , NULL, 0x0004 },
- // this particular gem doesn't automatcially spin up
+ // this particular gem doesn't automatically spin up
// on some media access commands.
{ "" , "HITACHI GD-2000" , NULL, 0x0008 },
{ "" , "HITACHI DVD-ROM GD-2000" , NULL, 0x0008 },
LARGE_INTEGER delay;
- // completion routine should retry as neccessary.
+ // completion routine should retry as necessary.
// when success, clear the flag to allow startio to proceed.
// else fail original request when retries are exhausted.
ASSERT(Context == NULL);
//
- // NOTE: a remove lock is unneccessary, since the delayed irp
+ // NOTE: a remove lock is unnecessary, since the delayed irp
// will have said lock held for itself, preventing a remove.
//
CdRomPrepareUpdateCapabilitiesIrp(Fdo);
This routine builds and sends a request to the port driver to
get a pointer to a structure that describes the adapter's
- capabilities/limitations. This routine is sychronous.
+ capabilities/limitations. This routine is synchronous.
Arguments:
Routine Description:
Send command to SCSI unit to start or power up.
- Because this command is issued asynchronounsly, that is, without
+ Because this command is issued asynchronously, that is, without
waiting on it to complete, the IMMEDIATE flag is not set. This
means that the CDB will not return until the drive has powered up.
This should keep subsequent requests from being submitted to the
Routine Description:
This routine is called when an asynchronous I/O request
- which was issused by the class driver completes. Examples of such requests
+ which was issued by the class driver completes. Examples of such requests
are release queue or START UNIT. This routine releases the queue if
necessary. It then frees the context and the IRP.
DeviceObject - Pointer to the class device object to be addressed.
- Irp - Pointer to Irp the orginal request.
+ Irp - Pointer to Irp the original request.
Return Value:
DebugPrint((1,"ScsiClassSplitRequest: Can't allocate Irp\n"));
//
- // If an Irp can't be allocated then the orginal request cannot
+ // If an Irp can't be allocated then the original request cannot
// be executed. If this is the first request then just fail the
- // orginal request; otherwise just return. When the pending
+ // original request; otherwise just return. When the pending
// requests complete, they will complete the original request.
// In either case set the IRP status to failure.
//
//
// NOTICE: The SCSI-II specification indicates that this field should be
// zero; however, some target controllers ignore the logical unit number
- // in the INDENTIFY message and only look at the logical unit number field
+ // in the IDENTIFY message and only look at the logical unit number field
// in the CDB.
//
//
// If the error count has exceeded the error limit, then disable
// any tagged queuing, multiple requests per lu queueing
- // and sychronous data transfers.
+ // and synchronous data transfers.
//
if (deviceExtension->ErrorCount == 4) {
Srb - Supplies a Pointer to the SCSI request block to be retied.
- Assocaiated - Indicates this is an assocatied Irp created by split request.
+ Associated - Indicates this is an associated Irp created by split request.
Return Value:
Length - Supplies the length in bytes of the mode sense buffer.
- PageMode - Supplies the page or pages of mode sense data to be retrived.
+ PageMode - Supplies the page or pages of mode sense data to be retrieved.
Return Value:
the port driver.
Arguments:
- DeviceObject - Supplies the device object for the orginal request.
+ DeviceObject - Supplies the device object for the original request.
- Srb - Supplies a paritally build ScsiRequestBlock. In particular, the
+ Srb - Supplies a partially built ScsiRequestBlock. In particular, the
CDB and the SRB timeout value must be filled in. The SRB must not be
allocated from zone.
nextStack = IoGetNextIrpStackLocation(Irp);
//
- // Validiate the user buffer.
+ // Validate the user buffer.
//
if (irpStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(SCSI_PASS_THROUGH)){
scsiPass->Lun = deviceExtension->Lun;
//
- // NOTICE: The SCSI-II specificaiton indicates that this field
+ // NOTICE: The SCSI-II specification indicates that this field
// should be zero; however, some target controllers ignore the logical
- // unit number in the INDENTIFY message and only look at the logical
+ // unit number in the IDENTIFY message and only look at the logical
// unit number field in the CDB.
//
srb->Lun = deviceExtension->Lun;
//
- // NOTICE: The SCSI-II specificaiton indicates that this field should be
+ // NOTICE: The SCSI-II specification indicates that this field should be
// zero; however, some target controllers ignore the logical unit number
- // in the INDENTIFY message and only look at the logical unit number field
+ // in the IDENTIFY message and only look at the logical unit number field
// in the CDB.
//
// Partition number of this device object
//
// This field is set during driver initialization or when the partition
- // is created to identify a parition to the system.
+ // is created to identify a partition to the system.
//
ULONG PartitionNumber;
BOOLEAN BootIndicator;
//
- // DriveNotReady - inidicates that the this device is currenly not ready
+ // DriveNotReady - indicates that the this device is currently not ready
// because there is no media in the device.
//
} DISK_DATA, *PDISK_DATA;
//
-// Define a general structure of identfing disk controllers with bad
+// Define a general structure of identifying disk controllers with bad
// hardware.
//
status = ScsiClassReadDriveCapacity(deviceObject);
//
- // If the read capcity failed then just return, unless this is a
+ // If the read capacity failed then just return, unless this is a
// removable disk where a device object partition needs to be created.
//
physicalDeviceExtension->DMByteSkew = physicalDeviceExtension->DMSkew * bytesPerSector;
//
- // Save away the infomation that we need, since this deviceExtension will soon be
+ // Save away the information that we need, since this deviceExtension will soon be
// blown away.
//
if (!initData)
{
DebugPrint((1,
- "Disk.CreatePartionDeviceObjects - Allocation of initData failed\n"));
+ "Disk.CreatePartitionDeviceObjects - Allocation of initData failed\n"));
status = STATUS_INSUFFICIENT_RESOURCES;
goto CreatePartitionDeviceObjectsExit;
if (((PDISK_DATA)(deviceExtension + 1))->DriveNotReady) {
//
- // Flag this as a user errror so that a popup is generated.
+ // Flag this as a user error so that a popup is generated.
//
Irp->IoStatus.Status = STATUS_DEVICE_NOT_READY;
} else if (NT_SUCCESS(status)) {
- // ReadDriveCapacity was allright, create Partition Objects
+ // ReadDriveCapacity was alright, create Partition Objects
if (physicalDiskData->PartitionListState == NotInitialized) {
status = CreatePartitionDeviceObjects(deviceExtension->PhysicalDevice, NULL);
else if (diskData->PartitionNumber == 0) {
//
- // Paritition zero is not a partition so this is not a
+ // Partition zero is not a partition so this is not a
// reasonable request.
//
else if (diskData->PartitionNumber == 0) {
//
- // Paritition zero is not a partition so this is not a
+ // Partition zero is not a partition so this is not a
// reasonable request.
//
//
// The disk layout has been returned in the partitionList
// buffer. Determine its size and, if the data will fit
- // into the intermediatery buffer, return it.
+ // into the intermediary buffer, return it.
//
tempSize = FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION,PartitionEntry[0]);
0,
TRUE);
- DebugPrint((1, "ScsiDiskShutdownFlush: Synchonize cache sent. Status = %lx\n", status ));
+ DebugPrint((1, "ScsiDiskShutdownFlush: Synchronize cache sent. Status = %lx\n", status ));
}
//
The routine performs the necessary functions to determine if a device is
really a floppy rather than a harddisk. This is done by a mode sense
- command. First, a check is made to see if the medimum type is set. Second
+ command. First, a check is made to see if the media type is set. Second
a check is made for the flexible parameters mode page. Also a check is
made to see if the write cache is enabled.
Routine Description:
The routine queries the registry to determine if this disk is visible to
- the BIOS. If the disk is visable to the BIOS, then the geometry information
+ the BIOS. If the disk is visible to the BIOS, then the geometry information
is updated.
Arguments:
ExFreePool(keyData);
//
- // Readjust indentifier string if necessary.
+ // Readjust identifier string if necessary.
//
if (!diskData->MbrCheckSum) {
Routine Description:
The routine queries the registry to determine if this disk is visible to
- the BIOS. If the disk is visable to the BIOS, then the geometry information
+ the BIOS. If the disk is visible to the BIOS, then the geometry information
is updated.
Arguments:
//
// Check that the data is long enough to hold a full resource descriptor,
- // and that the last resouce list is device-specific and long enough.
+ // and that the last resource list is device-specific and long enough.
//
if (keyData->DataLength < sizeof(CM_FULL_RESOURCE_DESCRIPTOR) ||
Return Value:
- Returns the status of the opertion.
+ Returns the status of the operation.
--*/
{
diskData = (PDISK_DATA) (deviceExtension + 1);
//
- // Read the drive capcity. If that fails, give up.
+ // Read the drive capacity. If that fails, give up.
//
status = ScsiClassReadDriveCapacity(deviceExtension->PhysicalDevice);
}
//
- // Read the partition table agian.
+ // Read the partition table again.
//
status = IoReadPartitionTable(deviceExtension->PhysicalDevice,
partitionNumber = diskData->PartitionNumber - 1;
//
- // Update the partition information for this parition.
+ // Update the partition information for this partition.
//
diskData->PartitionType =
} else if (diskData->PartitionNumber != 0) {
//
- // The paritition does not exist. Zero all the data.
+ // The partition does not exist. Zero all the data.
//
diskData->PartitionType = 0;
}
//
- // Free the parition list allocate by I/O read partition table.
+ // Free the partition list allocate by I/O read partition table.
//
ExFreePool(partitionList);
Routine Description:
- This function checks to see if an SCSI logical unit requires speical
+ This function checks to see if an SCSI logical unit requires special
flags to be set.
Arguments:
if(DasdAccessOnly) {
//
- // Inidicate that only RAW should be allowed to mount on the root
+ // Indicate that only RAW should be allowed to mount on the root
// partition object. This ensures that a file system can't doubly
// mount on a super-floppy by mounting once on P0 and once on P1.
//
if (!NT_SUCCESS(status)) {
//
- // Flag this as a user errror so that a popup is generated.
+ // Flag this as a user error so that a popup is generated.
//
DebugPrint((1, "DiskReadWriteVerification: ReadyStatus is %lx\n",
//
// Plan ahead and get the container's container before
- // modifing the current size.
+ // modifying the current size.
//
nextContainerPartition =
0,
TRUE);
- DebugPrint((1, "DiskShutdownFlush: Synchonize cache sent. Status = %lx\n", status ));
+ DebugPrint((1, "DiskShutdownFlush: Synchronize cache sent. Status = %lx\n", status ));
}
//
IoFreeWorkItem(Context->WorkItem);
- DebugPrint((1, "Disk.DiskIoctlVerify: Spliting up the request\n"));
+ DebugPrint((1, "Disk.DiskIoctlVerify: Splitting up the request\n"));
//
// Add disk offset to starting the sector
Routine Description:
- This function checks to see if an SCSI logical unit requires speical
+ This function checks to see if an SCSI logical unit requires special
flags to be set.
Arguments:
//
// We will attempt (twice) to issue the mode select with the page.
- // Make the setting persistant so that we don't have to turn it back
+ // Make the setting persistent so that we don't have to turn it back
// on after a bus reset.
//
if (inputBufferLength < listSize) {
//
- // The remaning size of the input buffer not big enough to
+ // The remaining size of the input buffer not big enough to
// hold the additional partition entries
//
}
//
- // Convert the parititon information structure into an extended
+ // Convert the partition information structure into an extended
// structure.
//
if (inputBufferLength < listSize) {
//
- // The remaning size of the input buffer not big enough to
+ // The remaining size of the input buffer not big enough to
// hold the additional partition entries
//
// The HAL routines IoGet- and IoSetPartitionInformation were
// developed before support of dynamic partitioning and therefore
// don't distinguish between partition ordinal (that is the order
- // of a paritition on a disk) and the partition number. (The
+ // of a partition on a disk) and the partition number. (The
// partition number is assigned to a partition to identify it to
// the system.) Use partition ordinals for these legacy calls.
//
// The HAL routines IoGet- and IoSetPartitionInformation were
// developed before support of dynamic partitioning and therefore
// don't distinguish between partition ordinal (that is the order
- // of a paritition on a disk) and the partition number. (The
+ // of a partition on a disk) and the partition number. (The
// partition number is assigned to a partition to identify it to
// the system.) Use partition ordinals for these legacy calls.
//
//
// ReadyStatus - STATUS_SUCCESS indicates that the drive is ready for
- // use. Any error status is to be returned as an explaination for why
+ // use. Any error status is to be returned as an explanation for why
// a request is failed.
//
// This was done solely for the zero-length partition case of having no
#if defined(_X86_)
//
- // This flag indiciates that a non-default geometry for this drive has
+ // This flag indicates that a non-default geometry for this drive has
// already been determined by the disk driver. This field is ignored
// for removable media drives.
//
} DISK_DATA, *PDISK_DATA;
-// Define a general structure of identfing disk controllers with bad
+// Define a general structure of identifying disk controllers with bad
// hardware.
//
//
// See if this is an IDE drive that supports SMART. If so enable SMART
- // and then ensure that it suports the SMART READ STATUS command
+ // and then ensure that it supports the SMART READ STATUS command
//
status = DiskGetIdentifyInfo(FdoExtension,
&supportFP);
When NT boots, failure prediction is not automatically enabled, although
- it may have been persistantly enabled on a previous boot. Polling is also
+ it may have been persistently enabled on a previous boot. Polling is also
not automatically enabled. When the first data block that accesses SMART
such as SmartStatusGuid, SmartDataGuid, SmartPerformFunction, or
SmartEventGuid is accessed then SMART is automatically enabled in the
Routine Description:
The routine queries the registry to determine which disks are visible to
- the BIOS. If a disk is visable to the BIOS then the geometry information
+ the BIOS. If a disk is visible to the BIOS then the geometry information
is updated with the disk's signature and MBR checksum.
Arguments:
Return Value:
- Inidicates whether the "RealGeometry" in the data block is now valid.
+ Indicates whether the "RealGeometry" in the data block is now valid.
--*/
Return Value:
- Returns the status of the opertion.
+ Returns the status of the operation.
--*/
{
This routine will return the current layout information for the disk.
If the cached information is still valid then it will be returned,
- otherwise the layout will be retreived from the kernel and cached for
+ otherwise the layout will be retrieved from the kernel and cached for
future use.
This routine must be called with the partitioning lock held. The
status = ClassReadDriveCapacity(Fdo);
//
- // If the read capcity failed then just return, unless this is a
+ // If the read capacity failed then just return, unless this is a
// removable disk where a device object partition needs to be created.
//
fdoExtension->DMByteSkew = fdoExtension->DMSkew * bytesPerSector;
//
- // Save away the infomation that we need, since this deviceExtension will soon be
+ // Save away the information that we need, since this deviceExtension will soon be
// blown away.
//
DiskCreateSymbolicLinks(Fdo);
//
- // Determine the type of disk and enable failure preiction in the hardware
+ // Determine the type of disk and enable failure prediction in the hardware
// and enable failure prediction polling.
//
The call to StartNextPacket may occur before this routine is completed.
the operational change notifications are informational in nature, and
- while useful, are not neccessary to ensure proper operation. For example,
+ while useful, are not necessary to ensure proper operation. For example,
if the device morphs to no longer supporting WRITE commands, all further
write commands will fail. There exists a small timing window wherein
IOCTL_IS_DISK_WRITABLE may be called and get an incorrect response. If
key "Autorun" in the service key (for legacy reasons), and then look in
the device-specific key to potentially override that setting.
- If MCN is to be enabled, all neccessary structures and memory are
+ If MCN is to be enabled, all necessary structures and memory are
allocated and initialized.
This routine MUST be called only from the ClassInit() callback.
//
// ASSERT that we never get two queries in a row, as
- // this will severly mess up the state machine
+ // this will severely mess up the state machine
//
ASSERT(commonExtension->CurrentState != irpStack->MinorFunction);
commonExtension->PreviousState = commonExtension->CurrentState;
CLASSP_REG_PERF_RESTORE_VALUE_NAME,
&t);
if (t >= CLASS_PERF_RESTORE_MINIMUM) {
- fdoExtension->PrivateFdoData->Perf.ReEnableThreshhold = t;
+ fdoExtension->PrivateFdoData->Perf.ReEnableThreshold = t;
}
}
If the device object is a PDO (partition object) then the request will
simply be adjusted for Partition0 and issued to the lower device driver.
- IF the device object is an FDO (paritition 0 object), the number of bytes
+ IF the device object is an FDO (partition 0 object), the number of bytes
in the request are checked against the maximum byte counts that the adapter
supports and requests are broken up into
smaller sizes if necessary.
Routine Description:
Send command to SCSI unit to start or power up.
- Because this command is issued asynchronounsly, that is, without
+ Because this command is issued asynchronously, that is, without
waiting on it to complete, the IMMEDIATE flag is not set. This
means that the CDB will not return until the drive has powered up.
This should keep subsequent requests from being submitted to the
//
// ISSUE-2000/02/03-peterwie
- // This code path was inheritted from the NT 4.0 class2.sys driver.
+ // This code path was inherited from the NT 4.0 class2.sys driver.
// It needs to be changed to survive low-memory conditions.
//
//
// ISSUE-2000/02/03-peterwie
- // This code path was inheritted from the NT 4.0 class2.sys driver.
+ // This code path was inherited from the NT 4.0 class2.sys driver.
// It needs to be changed to survive low-memory conditions.
//
Routine Description:
This routine is called when an asynchronous I/O request
- which was issused by the class driver completes. Examples of such requests
+ which was issued by the class driver completes. Examples of such requests
are release queue or START UNIT. This routine releases the queue if
necessary. It then frees the context and the IRP.
BOOLEAN retry;
//
- // NOTE: This code is only pagable because we are not freezing
- // the queue. Allowing the queue to be frozen from a pagable
+ // NOTE: This code is only pageable because we are not freezing
+ // the queue. Allowing the queue to be frozen from a pageable
// routine could leave the queue frozen as we try to page in
// the code to unfreeze the queue. The result would be a nice
// case of deadlock. Therefore, since we are unfreezing the
SCSI_SENSE_NOT_READY/SCSI_ADSENSE_NO_MEDIA_IN_DEVICE
These drives should not pass WHQL certification due
- to this discrepency.
+ to this discrepancy.
*/
retry = FALSE;
Length - Supplies the length in bytes of the mode sense buffer.
- PageMode - Supplies the page or pages of mode sense data to be retrived.
+ PageMode - Supplies the page or pages of mode sense data to be retrieved.
Return Value:
Arguments:
- Fdo - Supplies the functional device object for the orginal request.
+ Fdo - Supplies the functional device object for the original request.
- Srb - Supplies a paritally build ScsiRequestBlock. In particular, the
+ Srb - Supplies a partially built ScsiRequestBlock. In particular, the
CDB and the SRB timeout value must be filled in. The SRB must not be
allocated from zone.
//PSCSI_PASS_THROUGH scsiPass;
//
- // Validiate the user buffer.
+ // Validate the user buffer.
//
#if defined (_WIN64)
Routine Description:
This routine is called to handle the "removal" of a device. It will
- forward the request downwards if necesssary, call into the driver
+ forward the request downwards if necessary, call into the driver
to release any necessary resources (memory, events, etc) and then
will delete the device object.
(PPHYSICAL_DEVICE_EXTENSION) commonExtension;
//
- // See if this device is in the child list (if this was a suprise
+ // See if this device is in the child list (if this was a surprise
// removal it might be) and remove it.
//
lowerDevice = fdoExtension->CommonExtension.LowerDeviceObject;
//
- // we raise irql seperately so we're not swapped out or suspended
+ // we raise irql separately so we're not swapped out or suspended
// while holding the release queue irp in this routine. this lets
// us release the spin lock before lowering irql.
//
Routine Description:
This routine is called when an asynchronous I/O request
- which was issused by the class driver completes. Examples of such requests
+ which was issued by the class driver completes. Examples of such requests
are release queue or START UNIT. This routine releases the queue if
necessary. It then frees the context and the IRP.
struct {
ULONG OriginalSrbFlags;
ULONG SuccessfulIO;
- ULONG ReEnableThreshhold; // 0 means never
+ ULONG ReEnableThreshold; // 0 means never
} Perf;
ULONG_PTR HackFlags;
}
//
- // If the irp is not a WMI irp or it is not targetted at this device
- // or this device has not regstered with WMI then just forward it on.
+ // If the irp is not a WMI irp or it is not targeted at this device
+ // or this device has not registered with WMI then just forward it on.
minorFunction = irpStack->MinorFunction;
if ((minorFunction > IRP_MN_EXECUTE_METHOD) ||
(irpStack->Parameters.WMI.ProviderId != (ULONG_PTR)DeviceObject) ||
commonExtension->RemoveTrackingUntrackedCount++;
DebugPrint((ClassDebugWarning, ">>>>>ClassAcquireRemoveLock: "
- "Cannot track Tag %p - currently %d untracked requsts\n",
+ "Cannot track Tag %p - currently %d untracked requests\n",
Tag, commonExtension->RemoveTrackingUntrackedCount));
KeReleaseSpinLock(&commonExtension->RemoveTrackingSpinlock,
Srb - Supplies a Pointer to the SCSI request block to be retied.
- Assocaiated - Indicates this is an assocatied Irp created by split request.
+ Associated - Indicates this is an associated Irp created by split request.
RetryInterval - How long, in seconds, before retrying the request.
BOOLEAN retry;
- DebugPrint((1, "(%p)\tError occured when issueing STOP_UNIT "
+ DebugPrint((1, "(%p)\tError occured when issuing STOP_UNIT "
"command to device. Srb %p, Status %lx\n",
Irp,
&context->Srb,
DebugPrint((1, "(%p)\tFreeing srb and completing\n", Irp));
context->InUse = FALSE;
- status = context->FinalStatus; // allow failure to propogate
+ status = context->FinalStatus; // allow failure to propagate
context = NULL;
if(Irp->PendingReturned) {
//
// whenever there is an error, immediately grab the spin lock. the
// MP perf hit here is acceptable, since we're in an error path. this
-// is also neccessary because we are guaranteed to be modifying the
+// is also necessary because we are guaranteed to be modifying the
// SRB flags here, setting SuccessfulIO to zero, and incrementing the
// actual error count (which is always done within this spinlock).
//
// whenever there is no error, increment a counter. if there have been
// errors on the device, and we've enabled dynamic perf, *and* we've
-// just crossed the perf threshhold, then grab the spin lock and
-// double check that the threshhold has, indeed been hit(*). then
+// just crossed the perf threshold, then grab the spin lock and
+// double check that the threshold has, indeed been hit(*). then
// decrement the error count, and if it's dropped sufficiently, undo
// some of the safety changes made in the SRB flags due to the errors.
//
// * this works in all cases. even if lots of ios occur after the
// previous guy went in and cleared the successfulio counter, that
-// just means that we've hit the threshhold again, and so it's proper
+// just means that we've hit the threshold again, and so it's proper
// to run the inner loop again.
//
//
// If the error count has exceeded the error limit, then disable
// any tagged queuing, multiple requests per lu queueing
- // and sychronous data transfers.
+ // and synchronous data transfers.
//
// Clearing the no queue freeze flag prevents the port driver
// from sending multiple requests per logical unit.
return;
}
- if (fdoData->Perf.ReEnableThreshhold == 0) {
+ if (fdoData->Perf.ReEnableThreshold == 0) {
return;
}
succeeded = InterlockedIncrement((PLONG)&fdoData->Perf.SuccessfulIO);
- if (succeeded < fdoData->Perf.ReEnableThreshhold) {
+ if (succeeded < fdoData->Perf.ReEnableThreshold) {
return;
}
//
// re-read the value, so we don't run this multiple times
- // for a single threshhold being hit. this keeps errorcount
+ // for a single threshold being hit. this keeps errorcount
// somewhat useful.
//
succeeded = fdoData->Perf.SuccessfulIO;
if ((FdoExtension->ErrorCount != 0) &&
- (fdoData->Perf.ReEnableThreshhold <= succeeded)
+ (fdoData->Perf.ReEnableThreshold <= succeeded)
) {
fdoData->Perf.SuccessfulIO = 0; // implicit interlock
SRB_FLAGS_NO_QUEUE_FREEZE);
}
}
- } // end of threshhold definitely being hit for first time
+ } // end of threshold definitely being hit for first time
KeReleaseSpinLock(&fdoData->SpinLock, oldIrql);
return;
* PROJECT: ReactOS Floppy Disk Controller Driver
* LICENSE: GNU GPLv2 only as published by the Free Software Foundation
* FILE: drivers/storage/fdc/fdc/fdc.rc
- * PURPOSE: Resrouce definition file
+ * PURPOSE: Resource definition file
* PROGRAMMERS: Eric Kohl
*/
DriveInfo->FloppyDeviceData.MaximumTrackValue = FloppyDeviceData->MaximumTrackValue;
DriveInfo->FloppyDeviceData.DataTransferLength = FloppyDeviceData->DataTransferLength;
- /* Once it's all set up, acknowledge its existance in the controller info object */
+ /* Once it's all set up, acknowledge its existence in the controller info object */
DeviceExtension->ControllerInfo.NumberOfDrives++;
}
* You wouldn't want to turn on the motor and then cancel the timer, because the
* cancel dpc might fire in the meantime, and that'd un-do what you just did. If you
* cancel the timer first, but KeCancelTimer returns false, the dpc is already running,
- * so you have to wait until the dpc is completly done running, or else you'll race
+ * so you have to wait until the dpc is completely done running, or else you'll race
* with the turner-offer
* - PAGED_CODE because we wait
*/
DriveInfo->FloppyDeviceData.MaximumTrackValue = FloppyDeviceData->MaximumTrackValue;
DriveInfo->FloppyDeviceData.DataTransferLength = FloppyDeviceData->DataTransferLength;
- /* Once it's all set up, acknowledge its existance in the controller info object */
+ /* Once it's all set up, acknowledge its existence in the controller info object */
gControllerInfo[gNumberOfControllers].NumberOfDrives++;
}
* triggered, this is safe to not do here, as we can just wait for the DPC.
* - Either way, we don't want to do this here. The controller shouldn't interrupt again, so we'll
* schedule a DPC to take care of it.
- * - This driver really cannot shrare interrupts, as I don't know how to conclusively say
+ * - This driver really cannot share interrupts, as I don't know how to conclusively say
* whether it was our controller that interrupted or not. I just have to assume that any time
* my ISR gets called, it was my board that called it. Dumb design, yes, but it goes back to
* the semantics of ISA buses. That, and I don't know much about ISA drivers. :-)
* - This function just kicks off whatever the SynchEvent is and returns. We depend on
* the thing that caused the drive to interrupt to handle the work of clearing the interrupt.
* This enables us to get back to PASSIVE_LEVEL and not hog system time on a really stupid,
- * slow, screwed-up piece of hardare.
+ * slow, screwed-up piece of hardware.
* - If nothing is waiting for us to set the event, the interrupt is effectively lost and will
* never be dismissed. I wonder if this will become a problem.
* - Called at DISPATCH_LEVEL
continue;
}
- /* 2c: Set the controller's initlized flag so we know to release stuff in Unload */
+ /* 2c: Set the controller's initialized flag so we know to release stuff in Unload */
gControllerInfo[i].Initialized = TRUE;
/* 3: per-drive setup */
ZwClose(ThreadHandle);
/*
- * Start the device discovery proces. Returns STATUS_SUCCESS if
+ * Start the device discovery process. Returns STATUS_SUCCESS if
* it finds even one drive attached to one controller.
*/
if(!AddControllers(DriverObject))
* PROJECT: ReactOS Floppy Driver
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/storage/floppy/floppy.rc
- * PURPOSE: Resrouce definition file
+ * PURPOSE: Resource definition file
* PROGRAMMERS: Vizzini (vizzini@plasmic.com)
*/
* StepRateTime: Step rate time
* NonDma: TRUE to disable DMA mode
* RETURNS:
- * STATUS_SUCCESS if the contrller is successfully programmed
+ * STATUS_SUCCESS if the controller is successfully programmed
* STATUS_UNSUCCESSFUL if not
* NOTES:
* - Does not interrupt
#define DSRB_MOTOR_ENABLE_1 0x2
#define DSRB_WRITE_ENABLE 0x4
#define DSRB_READ_DATA 0x8
-#define DSRB_WRTITE_DATA 0x10
+#define DSRB_WRITE_DATA 0x10
#define DSRB_DRIVE_SELECT 0x20
/* DIGITAL_OUTPUT_REGISTER */
VOID NTAPI
DeviceIoctlPassive(PDRIVE_INFO DriveInfo, PIRP Irp)
/*
- * FUNCTION: Handlees IOCTL requests at PASSIVE_LEVEL
+ * FUNCTION: Handles IOCTL requests at PASSIVE_LEVEL
* ARGUMENTS:
* DriveInfo: Drive that the IOCTL is directed at
* Irp: IRP with the request in it
if(CurCylinder != Cylinder)
{
- WARN_(FLOPPY, "RWSeekToTrack(): Seeek to track failed; current cylinder is 0x%x\n", CurCylinder);
+ WARN_(FLOPPY, "RWSeekToTrack(): Seek to track failed; current cylinder is 0x%x\n", CurCylinder);
return STATUS_UNSUCCESSFUL;
}
* greatly (and I even wrote some of the kernel's DMA code, so if it confuses me, it
* probably confuses at least a couple of other people too).
*
- * MmGetMdlVirtualAddress() returns the virtal address, as mapped in the buffer's original
+ * MmGetMdlVirtualAddress() returns the virtual address, as mapped in the buffer's original
* process context, of the MDL. In other words: say you start with a buffer at address X, then
* you build an MDL out of that buffer called Mdl. If you call MmGetMdlVirtualAddress(Mdl), it
* will return X.
ScsiPortWritePortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow, 0xAA);
//
- // Check if indentifier can be read back.
+ // Check if identifier can be read back.
//
if ((statusByte = ScsiPortReadPortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow)) != 0xAA) {
}// preConfig check
//
- // Save the Interrupe Mode for later use
+ // Save the Interrupt Mode for later use
//
deviceExtension->InterruptMode = ConfigInfo->InterruptMode;
ScsiPortWritePortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow, 0xAA);
//
- // Check if indentifier can be read back.
+ // Check if identifier can be read back.
//
if ((statusByte = ScsiPortReadPortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow)) != 0xAA) {
atapiOnly = FALSE;
//
- // Save the Interrupe Mode for later use
+ // Save the Interrupt Mode for later use
//
deviceExtension->InterruptMode = ConfigInfo->InterruptMode;
ScsiPortWritePortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow, 0xAA);
//
- // Check if indentifier can be read back.
+ // Check if identifier can be read back.
//
if ((statusByte = ScsiPortReadPortUchar(&((PIDE_REGISTERS_1)ioSpace)->CylinderLow)) != 0xAA) {
atapiOnly = FALSE;
//
- // Save the Interrupe Mode for later use
+ // Save the Interrupt Mode for later use
//
deviceExtension->InterruptMode = ConfigInfo->InterruptMode;
PSENSE_DATA senseData = (PSENSE_DATA) srb->DataBuffer;
if (status == SRB_STATUS_DATA_OVERRUN) {
- // Check to see if we at least get mininum number of bytes
+ // Check to see if we at least get minimum number of bytes
if ((srb->DataTransferLength - deviceExtension->WordsLeft) >
(FIELD_OFFSET (SENSE_DATA, AdditionalSenseLength) + sizeof(senseData->AdditionalSenseLength))) {
status = SRB_STATUS_SUCCESS;
}
//
- // Zero the ouput buffer as the input buffer info. has been saved off locally (the buffers are the same).
+ // Zero the output buffer as the input buffer info. has been saved off locally (the buffers are the same).
//
for (i = 0; i < (sizeof(SENDCMDOUTPARAMS) + READ_ATTRIBUTE_BUFFER_SIZE - 1); i++) {
}
//
- // Zero the ouput buffer as the input buffer info. has been saved off locally (the buffers are the same).
+ // Zero the output buffer as the input buffer info. has been saved off locally (the buffers are the same).
//
for (i = 0; i < (sizeof(SENDCMDOUTPARAMS) - 1); i++) {
srb->Length = sizeof(SCSI_REQUEST_BLOCK);
//
- // Set flags to disable synchronous negociation.
+ // Set flags to disable synchronous negotiation.
//
srb->SrbFlags = SRB_FLAGS_DATA_IN | SRB_FLAGS_DISABLE_SYNCH_TRANSFER;
srb->Length = sizeof(SCSI_REQUEST_BLOCK);
//
- // Set flags to disable synchronous negociation.
+ // Set flags to disable synchronous negotiation.
//
srb->SrbFlags = SRB_FLAGS_DATA_IN | SRB_FLAGS_DISABLE_SYNCH_TRANSFER;
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: PCI IDE bus driver extension
* FILE: drivers/storage/pciidex/misc.c
- * PURPOSE: Misceallenous operations
+ * PURPOSE: Miscellaneous operations
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
*/
//
// always clear the busmaster interrupt on every interrupt
- // generated by the device. Normnally, it should be FALSE
+ // generated by the device. Normally, it should be FALSE
//
BOOLEAN AlwaysClearBusMasterInterrupt;
//
-// To initailize PCI IDE mini driver
+// To initialize PCI IDE mini driver
//
NTSTATUS
PciIdeXInitialize(
UCHAR Reserved[3];
UCHAR Prevent : 1;
- UCHAR Persistant : 1;
+ UCHAR Persistent : 1;
UCHAR Reserved3 : 6;
UCHAR Control;
//
// File description :The driver for BusLogic-BT958 SCSI Host adapter card.
// This driver assumes that the host adapter(HA from now on) is a PCI device.
-// This is an effort to build a driver for this card for the windows XP ennvironment
+// This is an effort to build a driver for this card for the windows XP environment
// since the native XP installation doesnt provide this driver.
//
-// The technical refernece for this device is at :
+// The technical reference for this device is at :
//
// Author: Namita Lal, Sirish Raghuram Calsoft Pvt Ltd
// Date: 5th Feb 2003
hwInitializationData.HwAdapterControl = BT958HwAdapterControl;
hwInitializationData.HwFindAdapter = BT958HwFindAdapter;
- // Inidicate no buffer mapping but will need physical addresses
+ // Indicate no buffer mapping but will need physical addresses
hwInitializationData.NeedPhysicalAddresses = TRUE;
// Indicate Auto request sense is supported
if ((*ConfigInfo->AccessRanges)[0].RangeLength != 0)
{
// check if the system supplied bus-relative address is valid and has not been
- // claimed by anyother device
+ // claimed by another device
if ( ScsiPortValidateRange(deviceExtension,
ConfigInfo->AdapterInterfaceType,
ConfigInfo->SystemIoBusNumber,
// Should we change this to double-word aligned to increase performance
ConfigInfo->AlignmentMask = 0x0;
- if (!Buslogic_InitBT958(deviceExtension,ConfigInfo)) // harware specific initializations. Find what's for our card
+ if (!Buslogic_InitBT958(deviceExtension,ConfigInfo)) // hardware specific initializations. Find what's for our card
{
ScsiPortLogError(deviceExtension,
NULL,
break;
}
- // if inspite of waiting for time out period , if it didn't et set, then something is wrong-- so just return.
+ // if in spite of waiting for time out period , if it didn't et set, then something is wrong-- so just return.
if (TimeoutCounter < 0)
return FALSE;
// BusLogic_TargetDeviceInquiry inquires about the Target Devices accessible
// through Host Adapter.
// Arguments:
-// 1. Host Adpater structure
+// 1. Host Adapter structure
// 2.
// Return Value:
// TRUE : Inquiry successful
// Routine Description:
// BusLogic_QueueCommand creates a CCB for Command
// Arguments:
-// 1. HwDeviceExtemsion: device extension
+// 1. HwDeviceExtension: device extension
// 2. Srb: Pointe to the SRB
// 3. CCB: POinter to the buffer containing the space for CCB
// Return Value:
// Arguments:
// 1. device extension
// Return Value:
-// TRUE : initialzation successful
+// TRUE : initialization successful
// FALSE : initialization failed
//_______________________________________________________________________________
{
//_________________________________________________________________________________________
//
// File description :The header file the driver for BusLogic-958 SCSI Host adapter card.
-// The technical refernece for this driver is at :
+// The technical reference for this driver is at :
//
// Author: Namita Lal, Sirish Raghuram ( Calsoft Pvt Ltd)
// Date: 10th June 2002
UCHAR WideTransfersActiveID8to15; /* Byte 33 */
}BusLogic_SetupInformation_T;
-// Something has to be done about the packing machanism of these structures - Namita
+// Something has to be done about the packing mechanism of these structures - Namita
// Define the Inquire Extended Setup Information reply structure.
typedef struct BusLogic_ExtendedSetupInformation
{
#pragma pack ()
//_________________________________________________________________________________________
-// function declaractions
+// function declarations
//_________________________________________________________________________________________
ULONG
NTAPI
}
//_________________________________________________________________________________________
-// Declarations for the device registers and rewading and writing to them
+// Declarations for the device registers and reading and writing to them
//_________________________________________________________________________________________
// Define the BusLogic SCSI Host Adapter I/O Register Offsets.
//put a time stamp on the output message
sprintf(buf,"%10u-%10u %s",time.HighPart,time.LowPart,messagebuf);
- //format the string to make sure it appends a newline carrage-return to the
+ //format the string to make sure it appends a newline carriage-return to the
//end of the string.
Length=strlen(buf);
if(buf[Length-1]=='\n')
ASSERT(Srb->DataTransferLength >= sizeof(ULONG));
ASSERT(Srb->DataBuffer);
- // Check if the WMI SRB is targetted for the adapter or one of the disks
+ // Check if the WMI SRB is targeted for the adapter or one of the disks
if (!(Srb->WMIFlags & SRB_WMI_FLAGS_ADAPTER_REQUEST))
{
- // This is targetted to one of the disks, since there are no per disk
+ // This is targeted to one of the disks, since there are no per disk
// wmi information we return an error. Note that if there was per
// disk information, then you'd likely have a differen WmiLibContext
// and a different set of guids.
Srb->DataTransferLength,
Srb->DataBuffer);
- // We assune that the wmi request will never pend so that we can
+ // We assume that the wmi request will never pend so that we can
// allocate the requestContext from stack. If the WMI request could
// ever pend then we'd need to allocate the request context from
// the SRB extension.
then this can be returned as NULL.
*Pdo returns with the device object for the PDO associated with this
- device if the WMIREG_FLAG_INSTANCE_PDO flag is retured in
+ device if the WMIREG_FLAG_INSTANCE_PDO flag is returned in
*RegFlags.
Return Value:
SrbExtension = (PVOID *)CommonBuffer;
DeviceExtension->FreeSrbExtensions = SrbExtension;
- /* Fill the remainding pointers (if we have more than 1 SRB) */
+ /* Fill the remaining pointers (if we have more than 1 SRB) */
while (CommonBufferLength >= 2 * BufSize)
{
*SrbExtension = (PVOID*)((PCHAR)SrbExtension + BufSize);
for (i = 0; i < DeviceExtension->InterruptCount; i++)
{
- /* Determing IRQ sharability as usual */
+ /* Determine IRQ sharability as usual */
if (PortConfig->AdapterInterfaceType == MicroChannel ||
InterruptMode[i] == LevelSensitive)
{
DPRINT("Notify: RequestComplete (Srb %p)\n", Srb);
- /* Make sure Srb is allright */
+ /* Make sure Srb is alright */
ASSERT(Srb->SrbStatus != SRB_STATUS_PENDING);
ASSERT(Srb->Function != SRB_FUNCTION_EXECUTE_SCSI || Srb->SrbStatus != SRB_STATUS_SUCCESS || Srb->ScsiStatus == SCSISTAT_GOOD);
LunExtension->PendingRequest = Srb->OriginalRequest;
LunExtension->Flags |= LUNEX_REQUEST_PENDING | SCSI_PORT_LU_ACTIVE;
- /* Relese the spinlock and return */
+ /* Release the spinlock and return */
KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock);
return NULL;
}
DPRINT("Busy SRB status %x\n", Srb->SrbStatus);
- /* Requeu, if needed */
+ /* Requeue, if needed */
if (LunExtension->Flags & (LUNEX_FROZEN_QUEUE | LUNEX_BUSY))
{
DPRINT("it's being requeued\n");
/* If LUN is busy, we have to requeue it in order to allow request sense */
if (LunExtension->Flags & LUNEX_BUSY)
{
- DPRINT("Requeueing busy request to allow request sense\n");
+ DPRINT("Requeuing busy request to allow request sense\n");
if (!KeInsertByKeyDeviceQueue(&LunExtension->DeviceQueue,
&LunExtension->BusyRequest->Tail.Overlay.DeviceQueueEntry,
Srb->TargetId,
Srb->Lun);
- /* We have to check special cases if request is unsuccessfull*/
+ /* We have to check special cases if request is unsuccessful*/
if (Srb->SrbStatus != SRB_STATUS_SUCCESS)
{
/* Check if we need request sense by a few conditions */
Status = USBCCGP_SyncUrbRequest(DeviceExtension->NextDeviceObject, Urb);
//
- // did it succeeed
+ // did it succeed
//
if (NT_SUCCESS(Status))
{
/* Init event */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
- /* Now allocte the irp */
+ /* Now allocate the irp */
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
if (!Irp)
{
if (Found)
{
- /* the choosen one */
+ /* the chosen one */
return InterfaceDescriptor;
}
VOID
NTAPI
-EhciDefferedRoutine(
+EhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
// friend function
friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext);
- friend VOID NTAPI EhciDefferedRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
+ friend VOID NTAPI EhciDeferredRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
friend VOID NTAPI StatusChangeWorkItemRoutine(PVOID Context);
// constructor / destructor
CUSBHardwareDevice(IUnknown *OuterUnknown){}
case CmResourceTypeInterrupt:
{
KeInitializeDpc(&m_IntDpcObject,
- EhciDefferedRoutine,
+ EhciDeferredRoutine,
this);
Status = IoConnectInterrupt(&m_Interrupt,
}
VOID NTAPI
-EhciDefferedRoutine(
+EhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
This = (CUSBHardwareDevice*) SystemArgument1;
CStatus = (ULONG) SystemArgument2;
- DPRINT("EhciDefferedRoutine CStatus %lx\n", CStatus);
+ DPRINT("EhciDeferredRoutine CStatus %lx\n", CStatus);
//
// check for completion of async schedule
PQUEUE_HEAD AsyncListQueueHead; // async queue head
LIST_ENTRY m_CompletedRequestAsyncList; // completed async request list
LIST_ENTRY m_PendingRequestAsyncList; // pending async request list
- ULONG m_MaxPeriodicListEntries; // max perdiodic list entries
+ ULONG m_MaxPeriodicListEntries; // max periodic list entries
ULONG m_MaxPollingInterval; // max polling interval
PHYSICAL_ADDRESS m_SyncFrameListAddr; // physical address of sync frame list
PULONG m_SyncFrameList; // virtual address of sync frame list
// called when the completion queue is cleaned up
VOID QueueHeadCleanup(PQUEUE_HEAD QueueHead);
- // intializes the sync schedule
+ // initializes the sync schedule
NTSTATUS InitializeSyncSchedule(IN PEHCIHARDWAREDEVICE Hardware, IN PDMAMEMORYMANAGER MemManager);
// links interrupt queue head
}
//
- // check if the request was successfull
+ // check if the request was successful
//
if (!NT_SUCCESS(NtStatusCode))
{
/* Init event */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
- /* Now allocte the irp */
+ /* Now allocate the irp */
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
if (!Irp)
{
}
NTSTATUS
-FowardUrbToRootHub(
+ForwardUrbToRootHub(
PDEVICE_OBJECT RootHubDeviceObject,
IN ULONG IoControlCode,
PIRP Irp,
//
// Send the request to RootHub
//
- Status = FowardUrbToRootHub(RootHubDeviceObject, IOCTL_INTERNAL_USB_SUBMIT_URB, Irp, Urb, NULL);
+ Status = ForwardUrbToRootHub(RootHubDeviceObject, IOCTL_INTERNAL_USB_SUBMIT_URB, Irp, Urb, NULL);
return Status;
}
//
VOID
NTAPI
-OhciDefferedRoutine(
+OhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
// friend function
friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext);
- friend VOID NTAPI OhciDefferedRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
+ friend VOID NTAPI OhciDeferredRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
friend VOID NTAPI StatusChangeWorkItemRoutine(PVOID Context);
// constructor / destructor
CUSBHardwareDevice(IUnknown *OuterUnknown){}
KeInitializeSpinLock(&m_Lock);
//
- // intialize status change work item
+ // initialize status change work item
//
ExInitializeWorkItem(&m_StatusChangeWorkItem, StatusChangeWorkItemRoutine, PVOID(this));
case CmResourceTypeInterrupt:
{
KeInitializeDpc(&m_IntDpcObject,
- OhciDefferedRoutine,
+ OhciDeferredRoutine,
this);
Status = IoConnectInterrupt(&m_Interrupt,
}
//
- // intialize descriptor
+ // initialize descriptor
//
Descriptor->Flags = OHCI_ENDPOINT_SKIP;
Descriptor->HeadPhysicalDescriptor = 0;
VOID
NTAPI
-OhciDefferedRoutine(
+OhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
CStatus = (ULONG) SystemArgument1;
DoneHead = (ULONG)SystemArgument2;
- DPRINT("OhciDefferedRoutine Status %x DoneHead %x\n", CStatus, DoneHead);
+ DPRINT("OhciDeferredRoutine Status %x DoneHead %x\n", CStatus, DoneHead);
if (CStatus & OHCI_WRITEBACK_DONE_HEAD)
{
Index++;
}
- DPRINT("InterruptInterval %lu Selected InterruptIndex %lu Choosen Interval %lu\n", InterruptInterval, Index, Power);
+ DPRINT("InterruptInterval %lu Selected InterruptIndex %lu Chosen Interval %lu\n", InterruptInterval, Index, Power);
//
// return endpoint
ASSERT(Buffer);
//
- // FIXME: support requests which spans serveral pages
+ // FIXME: support requests which spans several pages
//
ASSERT(ADDRESS_AND_SIZE_TO_SPAN_PAGES(MmGetMdlVirtualAddress(m_TransferBufferMDL), MmGetMdlByteCount(m_TransferBufferMDL)) <= 2);
}
//
- // intialize descriptor
+ // initialize descriptor
//
Descriptor->Flags = OHCI_ENDPOINT_SKIP;
Status = USBSTOR_SyncUrbRequest(DeviceExtension->LowerDeviceObject, Urb);
//
- // did it succeeed
+ // did it succeed
//
if (NT_SUCCESS(Status))
{
ULONG LastCharacterPosition = 0;
//
- // scan the field and return last positon which contains a valid character
+ // scan the field and return last position which contains a valid character
//
for(Index = 0; Index < MaxLength; Index++)
{
}
//
- // intialize irp queue
+ // initialize irp queue
//
USBSTOR_QueueInitialize(DeviceExtension);
}
//
- // FIXME: use constant - derrived from http://en.wikipedia.org/wiki/SCSI_Peripheral_Device_Type
+ // FIXME: use constant - derived from http://en.wikipedia.org/wiki/SCSI_Peripheral_Device_Type
//
switch (InquiryData->DeviceType)
{
}
//
- // FIXME: use constant - derrived from http://en.wikipedia.org/wiki/SCSI_Peripheral_Device_Type
+ // FIXME: use constant - derived from http://en.wikipedia.org/wiki/SCSI_Peripheral_Device_Type
//
switch (InquiryData->DeviceType)
{
UCHAR LogicalBlockByte2; // lba byte 2
UCHAR LogicalBlockByte3; // lba byte 3
UCHAR Reserved; // reserved 0x00
- UCHAR ContiguousLogicBlocksByte0; // msb contigious logic blocks byte
- UCHAR ContiguousLogicBlocksByte1; // msb contigious logic blocks
+ UCHAR ContiguousLogicBlocksByte0; // msb contiguous logic blocks byte
+ UCHAR ContiguousLogicBlocksByte1; // msb contiguous logic blocks
UCHAR Reserved1[3]; // reserved 0x00
}UFI_READ_WRITE_CMD;
#define UFI_CAPACITY_CMD_LEN 0xA //FIXME support length 16 too if requested
//
-// UFI Read Capcacity command response
+// UFI Read Capacity command response
//
typedef struct
{
UCHAR BlockLengthByte2;
}UFI_CAPACITY_DESCRIPTOR, *PUFI_CAPACITY_DESCRIPTOR;
-#define UNFORMATED_MEDIA_CODE_DESCRIPTORY_TYPE (1)
+#define UNFORMATTED_MEDIA_CODE_DESCRIPTORY_TYPE (1)
#define FORMAT_MEDIA_CODE_DESCRIPTOR_TYPE (2)
#define CARTRIDGE_MEDIA_CODE_DESCRIPTOR_TYPE (3)
VOID
NTAPI
-UhciDefferedRoutine(
+UhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
// friend function
friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext);
- friend VOID NTAPI UhciDefferedRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
+ friend VOID NTAPI UhciDeferredRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
friend VOID NTAPI TimerDpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
friend VOID NTAPI StatusChangeWorkItemRoutine(PVOID Context);
VOID WriteRegister8(IN ULONG Register, IN UCHAR value);
KeInitializeSpinLock(&m_Lock);
//
- // intialize status change work item
+ // initialize status change work item
//
//ExInitializeWorkItem(&m_StatusChangeWorkItem, StatusChangeWorkItemRoutine, PVOID(this));
case CmResourceTypeInterrupt:
{
KeInitializeDpc(&m_IntDpcObject,
- UhciDefferedRoutine,
+ UhciDeferredRoutine,
this);
Status = IoConnectInterrupt(&m_Interrupt,
VOID
NTAPI
-UhciDefferedRoutine(
+UhciDeferredRoutine(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
//
This = (CUSBHardwareDevice*)DeferredContext;
- DPRINT("UhciDefferedRoutine\n");
+ DPRINT("UhciDeferredRoutine\n");
//
// get status
#define UHCI_USBCMD_RS 0x01 // Run/Stop
#define UHCI_USBCMD_HCRESET 0x02 // Host Controller Reset
#define UHCI_USBCMD_GRESET 0x04 // Global Reset
-#define UHCI_USBCMD_EGSM 0x08 // Enter Global Suspensd mode
+#define UHCI_USBCMD_EGSM 0x08 // Enter Global Suspend mode
#define UHCI_USBCMD_FGR 0x10 // Force Global resume
#define UHCI_USBCMD_SWDBG 0x20 // Software Debug
#define UHCI_USBCMD_CF 0x40 // Configure Flag
//---------------------------------------------------------------------------
//
-// Object Hierachy
+// Object Hierarchy
// --------------------------------------------------------------------
// | IRootHCDController |
// | IHCDController Intel USB Universal Host Controller - 3A37 |
//
//
// Each IHCDController creates an IUSBHardwareDevice class upon initialization. The
-// IUSBHardwardeDevice class is used to abstract usb controller specifics. The IHubController
+// IUSBHardwareDevice class is used to abstract usb controller specifics. The IHubController
// manages all attached devices and handles hub control ioctl requests.
//
// Each IUSBHardwareDevice has one IDMAMemoryManager and one IUSBQueue. The IDMAMemoryManager
printf("Failed to get iocaps %lx\n", GetLastError());
}
}
- printf("WDMAUD: Capabilites NumChannels %x dwFormats %lx\n", DeviceInfo.u.WaveOutCaps.wChannels, DeviceInfo.u.WaveOutCaps.dwFormats);
+ printf("WDMAUD: Capabilities NumChannels %x dwFormats %lx\n", DeviceInfo.u.WaveOutCaps.wChannels, DeviceInfo.u.WaveOutCaps.dwFormats);
DeviceInfo.u.WaveFormatEx.cbSize = sizeof(WAVEFORMATEX);
DeviceInfo.u.WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
NTAPI
CDmaChannelInit::PhysicalAddress()
{
- DPRINT("CDmaChannelInit_PhysicalAdress: this %p Virtuell %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
+ DPRINT("CDmaChannelInit_PhysicalAddress: this %p Virtual %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
return m_Address;
}
CDmaChannelInit::PhysicalAddress(
PPHYSICAL_ADDRESS Address)
{
- DPRINT("CDmaChannelInit_PhysicalAdress: this %p Virtuell %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
+ DPRINT("CDmaChannelInit_PhysicalAddress: this %p Virtual %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
PHYSICAL_ADDRESS Result;
|| (lengthIO == 0)
)
{
- DPRINT("Unknown ResourceList configuraton");
+ DPRINT("Unknown ResourceList configuration");
ntStatus = STATUS_DEVICE_CONFIGURATION_ERROR;
}
if (PinWorkContext->Pin->m_ConnectDetails->Interface.Id == KSINTERFACE_STANDARD_LOOPED_STREAMING && PinWorkContext->Pin->m_State == KSSTATE_STOP)
{
- /* FIXME complete pending irps with successfull state */
+ /* FIXME complete pending irps with successful state */
PinWorkContext->Pin->m_IrpQueue->CancelBuffers();
}
//HACK
Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
RtlStringFromGUID(Property->Set, &GuidString);
- DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
+ DPRINT("Unhandled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
}
}
//determine state of reset request
if (ResetValue == KSRESET_BEGIN)
{
- // start reset procress
+ // start reset process
// incoming read/write requests will be rejected
m_ResetState = KSRESET_BEGIN;
m_CommonBufferSize = m_DmaChannel->AllocatedBufferSize();
m_CommonBuffer = m_DmaChannel->SystemAddress();
m_Capture = Capture;
- // delay of 10 milisec
+ // delay of 10 millisec
m_Delay = Int32x32To64(10, -10000);
// sanity checks
//Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
#if 0
RtlStringFromGUID(Property->Set, &GuidString);
- //DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
+ //DPRINT("Unhandled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
#endif
}
}
RtlStringFromGUID(Property->Set, &GuidString);
- DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
+ DPRINT("Unhandled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
goto cleanup;
m_Stream->GetHWLatency(&Latency);
- // delay of 10 milisec
+ // delay of 10 millisec
m_Delay = Int32x32To64(10, -10000);
Status = m_Stream->AllocateAudioBuffer(16384 * 11, &m_Mdl, &m_CommonBufferSize, &m_CommonBufferOffset, &m_CacheType);
if (!m_bInitialized)
{
- DPRINT("IPortDMus_fnNewRegistryKey called w/o initiazed\n");
+ DPRINT("IPortDMus_fnNewRegistryKey called w/o initialized\n");
return STATUS_UNSUCCESSFUL;
}
if (!NT_SUCCESS(Status))
{
- DPRINT("Failed to create descriptior\n");
+ DPRINT("Failed to create descriptor\n");
if (Miniport)
Miniport->Release();
if (!m_bInitialized)
{
- DPRINT("IPortTopology_fnNewRegistryKey called w/o initiazed\n");
+ DPRINT("IPortTopology_fnNewRegistryKey called w/o initialized\n");
return STATUS_UNSUCCESSFUL;
}
m_pPowerNotify = PowerNotify;
}
- DPRINT("IPortWavePci_Init sucessfully initialized\n");
+ DPRINT("IPortWavePci_Init successfully initialized\n");
return STATUS_SUCCESS;
}
if (!m_bInitialized)
{
- DPRINT("IPortWaveRT_fnNewRegistryKey called w/o initiazed\n");
+ DPRINT("IPortWaveRT_fnNewRegistryKey called w/o initialized\n");
return STATUS_UNSUCCESSFUL;
}
for(Index = 0; Index < MultipleItem->Count; Index++)
{
- // Call miniport's properitary handler
+ // Call miniport's proprietary handler
PC_ASSERT(Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRangesCount);
PC_ASSERT(Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[0]);
Status = SubDevice->DataRangeIntersection(Pin->PinId, DataRange, (PKSDATARANGE)Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[0],
}
else
{
- // check curent irql
+ // check current irql
if (KeGetCurrentIrql() > DISPATCH_LEVEL)
{
//insert dpc to queue
SubDeviceDescriptor->FilterPropertySet[PropertySetIndex].PropertiesCount = 0;
}
- // as the property set has been indentified, now search for duplicate property set item entries
+ // as the property set has been identified, now search for duplicate property set item entries
FilterPropertyItem = (PKSPROPERTY_ITEM)SubDeviceDescriptor->FilterPropertySet[PropertySetIndex].PropertyItem;
bFound = FALSE;
DumpAutomationTable(
IN PPCAUTOMATION_TABLE AutomationTable,
IN LPCWSTR DebugPrefix,
- IN LPCWSTR DebugIdentation)
+ IN LPCWSTR DebugIndentation)
{
PPCPROPERTY_ITEM PropertyItem;
PPCEVENT_ITEM EventItem;
}
DPRINT("=====================================================================\n");
- DPRINT("%S%S AutomationTable %p\n", DebugIdentation, DebugPrefix, AutomationTable);
- DPRINT("%S%S PropertyCount %lu\n", DebugIdentation, DebugPrefix, AutomationTable->PropertyCount);
- DPRINT("%S%S EventCount %lu\n", DebugIdentation, DebugPrefix, AutomationTable->EventCount);
- DPRINT("%S%S MethodCount %lu\n", DebugIdentation, DebugPrefix, AutomationTable->MethodCount);
+ DPRINT("%S%S AutomationTable %p\n", DebugIndentation, DebugPrefix, AutomationTable);
+ DPRINT("%S%S PropertyCount %lu\n", DebugIndentation, DebugPrefix, AutomationTable->PropertyCount);
+ DPRINT("%S%S EventCount %lu\n", DebugIndentation, DebugPrefix, AutomationTable->EventCount);
+ DPRINT("%S%S MethodCount %lu\n", DebugIndentation, DebugPrefix, AutomationTable->MethodCount);
// print properties
if (AutomationTable->PropertyCount)
{
// convert to printable string
RtlStringFromGUID(*PropertyItem->Set, &GuidString);
- DPRINT("%SPropertyItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIdentation, Index, PropertyItem, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags);
+ DPRINT("%SPropertyItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIndentation, Index, PropertyItem, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags);
RtlFreeUnicodeString(&GuidString);
// move to next item
PropertyItem = (PPCPROPERTY_ITEM)((ULONG_PTR)PropertyItem + AutomationTable->PropertyItemSize);
{
// convert to printable string
RtlStringFromGUID(*EventItem->Set, &GuidString);
- DPRINT("%SEventItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIdentation, Index, EventItem, GuidString.Buffer, EventItem->Id, EventItem->Flags);
+ DPRINT("%SEventItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIndentation, Index, EventItem, GuidString.Buffer, EventItem->Id, EventItem->Flags);
RtlFreeUnicodeString(&GuidString);
// move to next item
{
// convert to printable string
RtlStringFromGUID(*MethodItem->Set, &GuidString);
- DPRINT("%SMethodItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIdentation, Index, MethodItem, GuidString.Buffer, MethodItem->Id, MethodItem->Flags);
+ DPRINT("%SMethodItemIndex %lu %p GUID %S Id %u Flags %x\n", DebugIndentation, Index, MethodItem, GuidString.Buffer, MethodItem->Id, MethodItem->Flags);
RtlFreeUnicodeString(&GuidString);
// move to next item
0.9.5:
- recording support for Windows Vista
-- selection of spdif-in suppported
+- selection of spdif-in supported
- recording mixer fix for XP
0.9.4a:
}
/*
- Retrieves DRM Content rights that have been assigend to a DRM Content ID.
+ Retrieves DRM Content rights that have been assigned to a DRM Content ID.
*/
/*
* @unimplemented
ULONG Index;
PHDA_PDO_DEVICE_EXTENSION DeviceExtension;
- DPRINT1("HDA_TransferCodecVerbs Coun %lu CodecTransfer %p Callback %p Context %p\n", Count, CodecTransfer, Callback, Context);
+ DPRINT1("HDA_TransferCodecVerbs Count %lu CodecTransfer %p Callback %p Context %p\n", Count, CodecTransfer, Callback, Context);
/* get device extension */
DeviceExtension = (PHDA_PDO_DEVICE_EXTENSION)_context;
value = READ_REGISTER_USHORT((PUSHORT)(DeviceExtension->RegBase + HDAC_CORB_WRITE_POS)) & HDAC_CORB_WRITE_POS_MASK;
WRITE_REGISTER_USHORT((PUSHORT)(DeviceExtension->RegBase + HDAC_CORB_WRITE_POS), value);
- // Reset CORB read pointer. Preseve bits marked as RsvdP.
+ // Reset CORB read pointer. Preserve bits marked as RsvdP.
// After setting the reset bit, we must wait for the hardware
// to acknowledge it, then manually unset it and wait for that
// to be acknowledged as well.
case IOCTL_GETVOLUME:
case IOCTL_SETVOLUME:
- DPRINT1("Unhandeled %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode);
+ DPRINT1("Unhandled %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode);
break;
}
/* store mdl address */
Mdl = Irp->MdlAddress;
- /* remove mdladdress as KsProbeStreamIrp will interprete it as an already probed audio buffer */
+ /* remove mdladdress as KsProbeStreamIrp will interpret it as an already probed audio buffer */
Irp->MdlAddress = NULL;
if (IoStack->MajorFunction == IRP_MJ_WRITE)
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
/// Result: is returned in hDevice
-/// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
-/// Prequsites: none
+/// Return Code: STATUS_SUCCESS indicates success, otherwise appropriate error code
+/// Prerequisites: none
#define IOCTL_OPEN_WDMAUD \
CTL_CODE(FILE_DEVICE_SOUND, \
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: DeviceType, DeviceIndex and hDevice must be set
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: openend device
+/// Prerequisites: openend device
#define IOCTL_CLOSE_WDMAUD \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The DeviceType contains the requested device type.
/// Result: The result is returned in DeviceCount
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: none
+/// Prerequisites: none
#define IOCTL_GETNUMDEVS_TYPE \
CTL_CODE(FILE_DEVICE_SOUND, \
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_SETDEVICE_STATE \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The DeviceType and hDevice must be set
/// Result: The result is returned in DeviceIndex
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETDEVID \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The DeviceType and hDevice must be set
/// Result: The result is returned in Volume
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETVOLUME \
CTL_CODE(FILE_DEVICE_SOUND, \
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: The DeviceType, hDevice and Volume must be set
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_SETVOLUME \
CTL_CODE(FILE_DEVICE_SOUND, \
FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
-/// IOCTL_GETCAPABILTIES
+/// IOCTL_GETCAPABILITIES
///
-/// Description: This IOCTL retrieves the capabilties of an specific device
+/// Description: This IOCTL retrieves the capabilities of an specific device
///
/// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: The DeviceType and DeviceIndex must be set
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: none
+/// Prerequisites: none
#define IOCTL_GETCAPABILITIES \
CTL_CODE(FILE_DEVICE_SOUND, \
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_WRITEDATA \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The DeviceType and hDevice must be set
/// Result: The result is returned in Position
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETPOS \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The DeviceType and hDevice must be set
/// Result: The result is returned in FrameSize
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETFRAMESIZE \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The hDevice member must be set
/// Result: The result is returned in MixLine
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETLINEINFO \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The hDevice member must be set
/// Result: The result is returned in MixControls
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETLINECONTROLS \
CTL_CODE(FILE_DEVICE_SOUND, \
/// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
/// Note: The hDevice member must be set
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_SETCONTROLDETAILS \
CTL_CODE(FILE_DEVICE_SOUND, \
/// Note: The hDevice member must be set
/// Result: The result is returned in MixDetails
/// ReturnCode: STATUS_SUCCESS indicates success
-/// Prequsites: opened device
+/// Prerequisites: opened device
#define IOCTL_GETCONTROLDETAILS \
CTL_CODE(FILE_DEVICE_SOUND, \
return MM_STATUS_UNSUCCESSFUL;
}
- /* intialize key name */
+ /* initialize key name */
RtlInitUnicodeString(&KeyName, *DeviceName);
/* open device interface key */
}
RtlStringFromGUID(&Property->Set, &GuidString);
- DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
+ DPRINT1("Unhandled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
}
NextDeviceObject = IoAttachDeviceToDeviceStack(DeviceObject, PhysicalDeviceObject);
KsSetDevicePnpAndBaseObject(DeviceExtension->KsDeviceHeader, NextDeviceObject, DeviceObject);
- /* register shutdown notfication */
+ /* register shutdown notification */
IoRegisterShutdownNotification(DeviceObject);
* PROJECT: ReactOS WMI driver
* COPYRIGHT: GPL - See COPYING in the top level directory
* FILE: drivers/wmi/wmilib.c
- * PURPOSE: Windows Management Intstrumentation
+ * PURPOSE: Windows Management Instrumentation
* PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
*
*/