]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
IB/ipath: Set LID filtering for HCAs that support it.
authorDave Olson <dave.olson@qlogic.com>
Thu, 17 Apr 2008 04:09:29 +0000 (21:09 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 17 Apr 2008 04:09:29 +0000 (21:09 -0700)
Whenever the LID is set, notify the HCA specific code so that the
appropriate HW registers can be updated. Also log the info on the
console at low priority.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_driver.c

index 5e1dcb3dbc577f133b6af869545d823c2f3e1338..1245180f210cc3e8e74067a1ee999d95501f1543 100644 (file)
@@ -2006,11 +2006,16 @@ bail:
        return ret;
 }
 
-int ipath_set_lid(struct ipath_devdata *dd, u32 arg, u8 lmc)
+int ipath_set_lid(struct ipath_devdata *dd, u32 lid, u8 lmc)
 {
-       dd->ipath_lid = arg;
+       dd->ipath_lid = lid;
        dd->ipath_lmc = lmc;
 
+       dd->ipath_f_set_ib_cfg(dd, IPATH_IB_CFG_LIDLMC, lid |
+               (~((1U << lmc) - 1)) << 16);
+
+       dev_info(&dd->pcidev->dev, "We got a lid: 0x%x\n", lid);
+
        return 0;
 }