Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236028
b: refs/heads/master
c: 5d8ffd7
h: refs/heads/master
v: v3
  • Loading branch information
Haiyang Zhang authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent ebb7e99 commit 72495be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 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: d97ae00ea6a632bd97b99431db87d9b505b633a1
refs/heads/master: 5d8ffd71090ddd166206bf9b47a84294d73db6a5
34 changes: 0 additions & 34 deletions trunk/drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ static void put_net_device(struct hv_device *device)
struct netvsc_device *net_device;

net_device = device->ext;
/* ASSERT(netDevice); */

atomic_dec(&net_device->refcnt);
}
Expand Down Expand Up @@ -186,9 +185,6 @@ int netvsc_initialize(struct hv_driver *drv)
sizeof(struct nvsp_message),
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)); */

drv->name = driver_name;
memcpy(&drv->dev_type, &netvsc_device_type, sizeof(struct hv_guid));

Expand Down Expand Up @@ -220,9 +216,6 @@ static int netvsc_init_recv_buf(struct hv_device *device)
"device being destroyed?");
return -1;
}
/* ASSERT(netDevice->ReceiveBufferSize > 0); */
/* page-size grandularity */
/* ASSERT((netDevice->ReceiveBufferSize & (PAGE_SIZE - 1)) == 0); */

net_device->recv_buf =
(void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
Expand All @@ -234,9 +227,6 @@ static int netvsc_init_recv_buf(struct hv_device *device)
ret = -1;
goto cleanup;
}
/* page-aligned buffer */
/* ASSERT(((unsigned long)netDevice->ReceiveBuffer & (PAGE_SIZE - 1)) == */
/* 0); */

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

Expand Down Expand Up @@ -299,8 +289,6 @@ static int netvsc_init_recv_buf(struct hv_device *device)
}

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

net_device->recv_section_cnt = init_packet->msg.
v1_msg.send_recv_buf_complete.num_sections;
Expand Down Expand Up @@ -363,9 +351,6 @@ static int netvsc_init_send_buf(struct hv_device *device)
goto cleanup;
}

/* page-size grandularity */
/* ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0); */

net_device->send_buf =
(void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
get_order(net_device->send_buf_size));
Expand All @@ -375,8 +360,6 @@ static int netvsc_init_send_buf(struct hv_device *device)
ret = -1;
goto cleanup;
}
/* page-aligned buffer */
/* ASSERT(((unsigned long)netDevice->SendBuffer & (PAGE_SIZE - 1)) == 0); */

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

Expand Down Expand Up @@ -639,8 +622,6 @@ static int netvsc_connect_vsp(struct hv_device *device)
goto cleanup;
}

/* Now, check the response */
/* ASSERT(initPacket->Messages.InitMessages.InitComplete.MaximumMdlChainLength <= MAX_MULTIPAGE_BUFFER_COUNT); */
DPRINT_INFO(NETVSC, "NvspMessageTypeInit status(%d) max mdl chain (%d)",
init_packet->msg.init_msg.init_complete.status,
init_packet->msg.init_msg.
Expand Down Expand Up @@ -895,7 +876,6 @@ static void netvsc_send_completion(struct hv_device *device,
/* Get the send context */
nvsc_packet = (struct hv_netvsc_packet *)(unsigned long)
packet->trans_id;
/* ASSERT(nvscPacket); */

/* Notify the layer above us */
nvsc_packet->completion.send.send_completion(
Expand Down Expand Up @@ -1072,8 +1052,6 @@ static void netvsc_receive(struct hv_device *device,

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

if (xferpage_packet->count != vmxferpage_packet->range_cnt) {
DPRINT_INFO(NETVSC, "Needed %d netvsc pkts to satisy this xfer "
Expand Down Expand Up @@ -1101,10 +1079,6 @@ static void netvsc_receive(struct hv_device *device,
vmxferpage_packet->ranges[i].byte_count;
netvsc_packet->page_buf_cnt = 1;

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

netvsc_packet->page_buf[0].len =
vmxferpage_packet->ranges[i].byte_count;

Expand Down Expand Up @@ -1147,7 +1121,6 @@ static void netvsc_receive(struct hv_device *device,
if (bytes_remain == 0)
break;
}
/* ASSERT(bytesRemain == 0); */
}
DPRINT_DBG(NETVSC, "[%d] - (abs offset %u len %u) => "
"(pfn %llx, offset %u, len %u)", i,
Expand All @@ -1165,8 +1138,6 @@ static void netvsc_receive(struct hv_device *device,
completion.recv.recv_completion_ctx);
}

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

put_net_device(device);
}

Expand Down Expand Up @@ -1225,8 +1196,6 @@ static void netvsc_receive_completion(void *context)
bool fsend_receive_comp = false;
unsigned long flags;

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

/*
* Even though it seems logical to do a GetOutboundNetDevice() here to
* send out receive completion, we are using GetInboundNetDevice()
Expand All @@ -1242,7 +1211,6 @@ static void netvsc_receive_completion(void *context)
/* Overloading use of the lock. */
spin_lock_irqsave(&net_device->recv_pkt_list_lock, flags);

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

/*
Expand Down Expand Up @@ -1280,8 +1248,6 @@ static void netvsc_channel_cb(void *context)
unsigned char *buffer;
int bufferlen = NETVSC_PACKET_SIZE;

/* ASSERT(device); */

packet = kzalloc(NETVSC_PACKET_SIZE * sizeof(unsigned char),
GFP_ATOMIC);
if (!packet)
Expand Down

0 comments on commit 72495be

Please sign in to comment.