[ofa-general] [PATCH] IPoIB: on pkey_change event, invoke dev_stop() before doing delay_open()
Jack Morgenstein
jackm at dev.mellanox.co.il
Wed Feb 13 06:23:50 PST 2008
IPoIB: do ipoib_ib_dev_stop() on pkey_event when cannot find the old pkey.
In Pkey-event handling, if the old pkey is no longer available, the driver
must call ipoib_ib_dev_stop() -- just as it does when the pkey is still
available (see procedure __ipoib_ib_dev_flush() ).
When a pkey becomes available, the driver will perform ipoib_open() --
which assumes that, for example, the QP is in RESET, the cm_id has been
destroyed/deleted, etc.
If ipoib_ib_dev_stop() is not called as described above, then these
assumptions will be false.
Found by: Mellanox QA.
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2008-02-13 15:49:28.000000000 +0200
+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2008-02-13 15:54:31.439439000 +0200
@@ -952,6 +952,7 @@ static void __ipoib_ib_dev_flush(struct
if (ib_find_pkey(priv->ca, priv->port, priv->pkey, &new_index)) {
clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
ipoib_ib_dev_down(dev, 0);
+ ipoib_ib_dev_stop(dev, 0);
ipoib_pkey_dev_delay_open(dev);
return;
}
More information about the general
mailing list