[ofa-general] Re: [PATCHv2 1/2] ipoib: handle pkey change events
Michael S. Tsirkin
mst at dev.mellanox.co.il
Tue May 8 09:27:27 PDT 2007
> @@ -622,13 +623,24 @@ int ipoib_ib_dev_init(struct net_device
> return 0;
> }
>
> -void ipoib_ib_dev_flush(struct work_struct *work)
> +static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv, int restart_qp)
> {
> - struct ipoib_dev_priv *cpriv, *priv =
> - container_of(work, struct ipoib_dev_priv, flush_task);
> + struct ipoib_dev_priv *cpriv;
> struct net_device *dev = priv->dev;
>
> - if (!test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags) ) {
> + mutex_lock(&priv->vlan_mutex);
> +
> + /* Flush any child interfaces */
> + list_for_each_entry(cpriv, &priv->child_intfs, list)
> + __ipoib_ib_dev_flush(cpriv, restart_qp);
> +
> + mutex_unlock(&priv->vlan_mutex);
> +
> + /*
> + * If the device is not initiallized since it needs a pkey -
> + * try to reopen it
> + */
Kill this comment - typos and all.
> + if (!test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags)) {
> ipoib_dbg(priv, "Not flushing - IPOIB_FLAG_INITIALIZED not set.\n");
> return;
> }
--
MST
More information about the general
mailing list