Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197310
b: refs/heads/master
c: 972b952
h: refs/heads/master
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 53b92b6 commit 3be7784
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3810b0ef61d23f37ace99ed0fb180b62fcb3f68
refs/heads/master: 972b9529ccfa604bd473c43589f5120066161edd
2 changes: 1 addition & 1 deletion trunk/drivers/staging/hv/BlkVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int BlkVscInitialize(struct hv_driver *Driver)
storDriver = (struct storvsc_driver_object *)Driver;

/* Make sure we are at least 2 pages since 1 page is used for control */
ASSERT(storDriver->RingBufferSize >= (PAGE_SIZE << 1));
/* ASSERT(storDriver->RingBufferSize >= (PAGE_SIZE << 1)); */

Driver->name = gBlkDriverName;
memcpy(&Driver->deviceType, &gBlkVscDeviceType, sizeof(struct hv_guid));
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/hv/Connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static void VmbusProcessChannelEvent(void *context)
struct vmbus_channel *channel;
u32 relId = (u32)(unsigned long)context;

ASSERT(relId > 0);
/* ASSERT(relId > 0); */

/*
* Find the channel based on this relid and invokes the
Expand Down
49 changes: 24 additions & 25 deletions trunk/drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static void PutNetDevice(struct hv_device *Device)
struct netvsc_device *netDevice;

netDevice = Device->Extension;
ASSERT(netDevice);
/* ASSERT(netDevice); */

atomic_dec(&netDevice->RefCount);
}
Expand Down Expand Up @@ -184,14 +184,15 @@ int NetVscInitialize(struct hv_driver *drv)
sizeof(struct vmtransfer_page_packet_header));

/* Make sure we are at least 2 pages since 1 page is used for control */
ASSERT(driver->RingBufferSize >= (PAGE_SIZE << 1));
/* ASSERT(driver->RingBufferSize >= (PAGE_SIZE << 1)); */

drv->name = gDriverName;
memcpy(&drv->deviceType, &gNetVscDeviceType, sizeof(struct hv_guid));

/* Make sure it is set by the caller */
ASSERT(driver->OnReceiveCallback);
ASSERT(driver->OnLinkStatusChanged);
/* FIXME: These probably should still be tested in some way */
/* ASSERT(driver->OnReceiveCallback); */
/* ASSERT(driver->OnLinkStatusChanged); */

/* Setup the dispatch table */
driver->Base.OnDeviceAdd = NetVscOnDeviceAdd;
Expand Down Expand Up @@ -222,9 +223,9 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
DPRINT_EXIT(NETVSC);
return -1;
}
ASSERT(netDevice->ReceiveBufferSize > 0);
/* ASSERT(netDevice->ReceiveBufferSize > 0); */
/* page-size grandularity */
ASSERT((netDevice->ReceiveBufferSize & (PAGE_SIZE - 1)) == 0);
/* ASSERT((netDevice->ReceiveBufferSize & (PAGE_SIZE - 1)) == 0); */

netDevice->ReceiveBuffer =
osd_PageAlloc(netDevice->ReceiveBufferSize >> PAGE_SHIFT);
Expand All @@ -236,8 +237,8 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
goto Cleanup;
}
/* page-aligned buffer */
ASSERT(((unsigned long)netDevice->ReceiveBuffer & (PAGE_SIZE - 1)) ==
0);
/* ASSERT(((unsigned long)netDevice->ReceiveBuffer & (PAGE_SIZE - 1)) == */
/* 0); */

DPRINT_INFO(NETVSC, "Establishing receive buffer's GPADL...");

Expand Down Expand Up @@ -294,8 +295,8 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
}

/* Parse the response */
ASSERT(netDevice->ReceiveSectionCount == 0);
ASSERT(netDevice->ReceiveSections == NULL);
/* ASSERT(netDevice->ReceiveSectionCount == 0); */
/* ASSERT(netDevice->ReceiveSections == NULL); */

netDevice->ReceiveSectionCount = initPacket->Messages.Version1Messages.SendReceiveBufferComplete.NumSections;

Expand Down Expand Up @@ -355,7 +356,7 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
}
ASSERT(netDevice->SendBufferSize > 0);
/* page-size grandularity */
ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0);
/* ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0); */

netDevice->SendBuffer =
osd_PageAlloc(netDevice->SendBufferSize >> PAGE_SHIFT);
Expand All @@ -366,7 +367,7 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
goto Cleanup;
}
/* page-aligned buffer */
ASSERT(((unsigned long)netDevice->SendBuffer & (PAGE_SIZE - 1)) == 0);
/* ASSERT(((unsigned long)netDevice->SendBuffer & (PAGE_SIZE - 1)) == 0); */

DPRINT_INFO(NETVSC, "Establishing send buffer's GPADL...");

Expand Down Expand Up @@ -912,7 +913,7 @@ static void NetVscOnSendCompletion(struct hv_device *Device,
NvspMessage1TypeSendRNDISPacketComplete) {
/* Get the send context */
nvscPacket = (struct hv_netvsc_packet *)(unsigned long)Packet->TransactionId;
ASSERT(nvscPacket);
/* ASSERT(nvscPacket); */

/* Notify the layer above us */
nvscPacket->Completion.Send.OnSendCompletion(nvscPacket->Completion.Send.SendCompletionContext);
Expand Down Expand Up @@ -1096,8 +1097,8 @@ static void NetVscOnReceive(struct hv_device *Device,

/* This is how much we can satisfy */
xferpagePacket->Count = count - 1;
ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <=
vmxferpagePacket->RangeCount);
/* ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <= */
/* vmxferpagePacket->RangeCount); */

if (xferpagePacket->Count != vmxferpagePacket->RangeCount) {
DPRINT_INFO(NETVSC, "Needed %d netvsc pkts to satisy this xfer "
Expand Down Expand Up @@ -1125,9 +1126,9 @@ static void NetVscOnReceive(struct hv_device *Device,
vmxferpagePacket->Ranges[i].ByteCount;
netvscPacket->PageBufferCount = 1;

ASSERT(vmxferpagePacket->Ranges[i].ByteOffset +
vmxferpagePacket->Ranges[i].ByteCount <
netDevice->ReceiveBufferSize);
/* ASSERT(vmxferpagePacket->Ranges[i].ByteOffset + */
/* vmxferpagePacket->Ranges[i].ByteCount < */
/* netDevice->ReceiveBufferSize); */

netvscPacket->PageBuffers[0].Length =
vmxferpagePacket->Ranges[i].ByteCount;
Expand Down Expand Up @@ -1165,7 +1166,7 @@ static void NetVscOnReceive(struct hv_device *Device,
if (bytesRemain == 0)
break;
}
ASSERT(bytesRemain == 0);
/* ASSERT(bytesRemain == 0); */
}
DPRINT_DBG(NETVSC, "[%d] - (abs offset %u len %u) => "
"(pfn %llx, offset %u, len %u)", i,
Expand All @@ -1181,7 +1182,7 @@ static void NetVscOnReceive(struct hv_device *Device,
NetVscOnReceiveCompletion(netvscPacket->Completion.Recv.ReceiveCompletionContext);
}

ASSERT(list_empty(&listHead));
/* ASSERT(list_empty(&listHead)); */

PutNetDevice(Device);
DPRINT_EXIT(NETVSC);
Expand Down Expand Up @@ -1245,7 +1246,7 @@ static void NetVscOnReceiveCompletion(void *Context)

DPRINT_ENTER(NETVSC);

ASSERT(packet->XferPagePacket);
/* ASSERT(packet->XferPagePacket); */

/*
* Even though it seems logical to do a GetOutboundNetDevice() here to
Expand All @@ -1263,7 +1264,7 @@ static void NetVscOnReceiveCompletion(void *Context)
/* Overloading use of the lock. */
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);

ASSERT(packet->XferPagePacket->Count > 0);
/* ASSERT(packet->XferPagePacket->Count > 0); */
packet->XferPagePacket->Count--;

/*
Expand Down Expand Up @@ -1305,7 +1306,7 @@ static void NetVscOnChannelCallback(void *Context)

DPRINT_ENTER(NETVSC);

ASSERT(device);
/* ASSERT(device); */

packet = kzalloc(NETVSC_PACKET_SIZE * sizeof(unsigned char),
GFP_KERNEL);
Expand Down Expand Up @@ -1377,8 +1378,6 @@ static void NetVscOnChannelCallback(void *Context)
}

bufferlen = bytesRecvd;
} else {
ASSERT(0);
}
} while (1);

Expand Down

0 comments on commit 3be7784

Please sign in to comment.