diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_driver.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 3a15efee7387..47c9d15557c8 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -2116,5 +2116,22 @@ bail: | |||
2116 | return ret; | 2116 | return ret; |
2117 | } | 2117 | } |
2118 | 2118 | ||
2119 | int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv) | ||
2120 | { | ||
2121 | u64 val; | ||
2122 | if ( new_pol_inv > INFINIPATH_XGXS_RX_POL_MASK ) { | ||
2123 | return -1; | ||
2124 | } | ||
2125 | if ( dd->ipath_rx_pol_inv != new_pol_inv ) { | ||
2126 | dd->ipath_rx_pol_inv = new_pol_inv; | ||
2127 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_xgxsconfig); | ||
2128 | val &= ~(INFINIPATH_XGXS_RX_POL_MASK << | ||
2129 | INFINIPATH_XGXS_RX_POL_SHIFT); | ||
2130 | val |= ((u64)dd->ipath_rx_pol_inv) << | ||
2131 | INFINIPATH_XGXS_RX_POL_SHIFT; | ||
2132 | ipath_write_kreg(dd, dd->ipath_kregs->kr_xgxsconfig, val); | ||
2133 | } | ||
2134 | return 0; | ||
2135 | } | ||
2119 | module_init(infinipath_init); | 2136 | module_init(infinipath_init); |
2120 | module_exit(infinipath_cleanup); | 2137 | module_exit(infinipath_cleanup); |