Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321481
b: refs/heads/master
c: ae9e63b
h: refs/heads/master
i:
  321479: 6410962
v: v3
  • Loading branch information
Haiyang Zhang authored and David S. Miller committed Aug 3, 2012
1 parent 478576f commit 043b15c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 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: 2207b60ffb6545040e2e2620fced13deba7643c2
refs/heads/master: ae9e63bb2c0cf5437d9d13d822b27149336c6e0e
7 changes: 0 additions & 7 deletions trunk/drivers/net/hyperv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ int netvsc_device_remove(struct hv_device *device)
unsigned long flags;

net_device = hv_get_drvdata(device);
spin_lock_irqsave(&device->channel->inbound_lock, flags);
net_device->destroy = true;
spin_unlock_irqrestore(&device->channel->inbound_lock, flags);

/* Wait for all send completions */
wait_event(net_device->wait_drain,
atomic_read(&net_device->num_outstanding_sends) == 0);

netvsc_disconnect_vsp(net_device);

Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/hyperv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
{
struct rndis_request *request;
struct rndis_halt_request *halt;
struct netvsc_device *nvdev = dev->net_dev;
struct hv_device *hdev = nvdev->dev;
ulong flags;

/* Attempt to do a rndis device halt */
request = get_rndis_request(dev, RNDIS_MSG_HALT,
Expand All @@ -735,6 +738,14 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
dev->state = RNDIS_DEV_UNINITIALIZED;

cleanup:
spin_lock_irqsave(&hdev->channel->inbound_lock, flags);
nvdev->destroy = true;
spin_unlock_irqrestore(&hdev->channel->inbound_lock, flags);

/* Wait for all send completions */
wait_event(nvdev->wait_drain,
atomic_read(&nvdev->num_outstanding_sends) == 0);

if (request)
put_rndis_request(dev, request);
return;
Expand Down

0 comments on commit 043b15c

Please sign in to comment.