{
PADAPTER_OBJECT MasterAdapter;
PGROW_WORK_ITEM WorkItem;
- ULONG Index = ~0U;
+ ULONG Index = MAXULONG;
ULONG Result;
KIRQL OldIrql;
{
Index = RtlFindClearBitsAndSet(
MasterAdapter->MapRegisters, NumberOfMapRegisters, 0);
- if (Index != ~0U)
+ if (Index != MAXULONG)
{
AdapterObject->MapRegisterBase =
MasterAdapter->MapRegisterBase + Index;
}
}
- if (Index == ~0U)
+ if (Index == MAXULONG)
{
WorkItem = ExAllocatePoolWithTag(
NonPagedPool, sizeof(GROW_WORK_ITEM), TAG_DMA);
PADAPTER_OBJECT MasterAdapter;
PKDEVICE_QUEUE_ENTRY DeviceQueueEntry;
PWAIT_CONTEXT_BLOCK WaitContextBlock;
- ULONG Index = ~0;
+ ULONG Index = MAXULONG;
ULONG Result;
KIRQL OldIrql;
Index = RtlFindClearBitsAndSet(
MasterAdapter->MapRegisters,
WaitContextBlock->NumberOfMapRegisters, 0);
- if (Index != ~0U)
+ if (Index != MAXULONG)
{
AdapterObject->MapRegisterBase =
MasterAdapter->MapRegisterBase + Index;
}
}
- if (Index == ~0U)
+ if (Index == MAXULONG)
{
InsertTailList(&MasterAdapter->AdapterQueue, &AdapterObject->AdapterQueue);
KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
MasterAdapter->MapRegisters,
AdapterObject->NumberOfMapRegisters,
MasterAdapter->NumberOfMapRegisters);
- if (Index == ~0U)
+ if (Index == MAXULONG)
{
InsertHeadList(&MasterAdapter->AdapterQueue, ListEntry);
break;
{
if ((ULONG_PTR)MapRegisterBase & MAP_BASE_SW_SG)
{
- if (RealMapRegisterBase->Counter != ~0U)
+ if (RealMapRegisterBase->Counter != MAXULONG)
{
if (SlaveDma && !AdapterObject->IgnoreCount)
Length -= HalReadDmaCounter(AdapterObject);
PhysicalAddress = RealMapRegisterBase->PhysicalAddress;
PhysicalAddress.QuadPart += ByteOffset;
TransferLength = *Length;
- RealMapRegisterBase->Counter = ~0;
+ RealMapRegisterBase->Counter = MAXULONG;
Counter = 0;
}
else
PhysicalAddress.QuadPart += ByteOffset;
if ((ULONG_PTR)MapRegisterBase & MAP_BASE_SW_SG)
{
- RealMapRegisterBase->Counter = ~0;
+ RealMapRegisterBase->Counter = MAXULONG;
Counter = 0;
}
}
0);
/* Check if nothing was found */
- if (MapRegisterNumber == (ULONG)-1)
+ if (MapRegisterNumber == MAXULONG)
{
/* No free registers found, so use the base registers */
RtlSetBits(MasterAdapter->MapRegisters,