Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21955
b: refs/heads/master
c: 0b3ea08
h: refs/heads/master
i:
  21953: a2565ef
  21951: a1d1780
v: v3
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Mar 20, 2006
1 parent e847b79 commit 47ef627
Show file tree
Hide file tree
Showing 5 changed files with 15 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: 8b9ab02b690e988f19c9d740ef642d7d833d23d5
refs/heads/master: 0b3ea0829cbcdaee6e018a83a2949ef458213f3b
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev);

int ipoib_ib_dev_open(struct net_device *dev);
int ipoib_ib_dev_up(struct net_device *dev);
int ipoib_ib_dev_down(struct net_device *dev);
int ipoib_ib_dev_down(struct net_device *dev, int flush);
int ipoib_ib_dev_stop(struct net_device *dev);

int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ int ipoib_ib_dev_up(struct net_device *dev)
return ipoib_mcast_start_thread(dev);
}

int ipoib_ib_dev_down(struct net_device *dev)
int ipoib_ib_dev_down(struct net_device *dev, int flush)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);

Expand All @@ -450,10 +450,11 @@ int ipoib_ib_dev_down(struct net_device *dev)
set_bit(IPOIB_PKEY_STOP, &priv->flags);
cancel_delayed_work(&priv->pkey_task);
mutex_unlock(&pkey_mutex);
flush_workqueue(ipoib_workqueue);
if (flush)
flush_workqueue(ipoib_workqueue);
}

ipoib_mcast_stop_thread(dev, 1);
ipoib_mcast_stop_thread(dev, flush);
ipoib_mcast_dev_flush(dev);

ipoib_flush_paths(dev);
Expand Down Expand Up @@ -591,7 +592,7 @@ void ipoib_ib_dev_flush(void *_dev)

ipoib_dbg(priv, "flushing\n");

ipoib_ib_dev_down(dev);
ipoib_ib_dev_down(dev, 0);

/*
* The device could have been brought down between the start and when
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ static int ipoib_stop(struct net_device *dev)

netif_stop_queue(dev);

ipoib_ib_dev_down(dev);
/*
* Now flush workqueue to make sure a scheduled task doesn't
* bring our internal state back up.
*/
flush_workqueue(ipoib_workqueue);

ipoib_ib_dev_down(dev, 1);
ipoib_ib_dev_stop(dev);

if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,6 @@ void ipoib_event(struct ib_event_handler *handler,
record->event == IB_EVENT_LID_CHANGE ||
record->event == IB_EVENT_SM_CHANGE) {
ipoib_dbg(priv, "Port active event\n");
schedule_work(&priv->flush_task);
queue_work(ipoib_workqueue, &priv->flush_task);
}
}

0 comments on commit 47ef627

Please sign in to comment.