aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_file_ops.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2007-12-21 04:50:59 -0500
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:36 -0500
commitd8274869d742c3d8082e1428de47e54d12104928 (patch)
tree128d36e05d5facbff15652eb24faf03cbec3da8e /drivers/infiniband/hw/ipath/ipath_file_ops.c
parentc59a80aca0bfc491d90534ed5606d5493eca24a3 (diff)
IB/ipath: Generalize some xxx_SHIFT macros
In preparation for upcoming chips that have different values for INFINIPATH_R_PORTENABLE_SHIFT, INFINIPATH_R_INTRAVAIL_SHIFT, INFINIPATH_R_TAILUPD_SHIFT, and portcfg_shift, remove the shared #defines and use device-specific variables instead. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_file_ops.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 4277014d6f8e..65da7a9808ec 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -744,10 +744,10 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
744 */ 744 */
745 if (pd->port_rcvhdrtail_kvaddr) 745 if (pd->port_rcvhdrtail_kvaddr)
746 ipath_clear_rcvhdrtail(pd); 746 ipath_clear_rcvhdrtail(pd);
747 set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, 747 set_bit(dd->ipath_r_portenable_shift + pd->port_port,
748 &dd->ipath_rcvctrl); 748 &dd->ipath_rcvctrl);
749 } else 749 } else
750 clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, 750 clear_bit(dd->ipath_r_portenable_shift + pd->port_port,
751 &dd->ipath_rcvctrl); 751 &dd->ipath_rcvctrl);
752 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 752 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
753 dd->ipath_rcvctrl); 753 dd->ipath_rcvctrl);
@@ -1405,7 +1405,7 @@ static unsigned int ipath_poll_next(struct ipath_portdata *pd,
1405 /* flush waiting flag so we don't miss an event */ 1405 /* flush waiting flag so we don't miss an event */
1406 wmb(); 1406 wmb();
1407 1407
1408 set_bit(pd->port_port + INFINIPATH_R_INTRAVAIL_SHIFT, 1408 set_bit(pd->port_port + dd->ipath_r_intravail_shift,
1409 &dd->ipath_rcvctrl); 1409 &dd->ipath_rcvctrl);
1410 1410
1411 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 1411 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
@@ -1938,10 +1938,11 @@ static int ipath_do_user_init(struct file *fp,
1938 */ 1938 */
1939 if (pd->port_rcvhdrtail_kvaddr) 1939 if (pd->port_rcvhdrtail_kvaddr)
1940 ipath_clear_rcvhdrtail(pd); 1940 ipath_clear_rcvhdrtail(pd);
1941 set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, 1941 set_bit(dd->ipath_r_portenable_shift + pd->port_port,
1942 &dd->ipath_rcvctrl); 1942 &dd->ipath_rcvctrl);
1943 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 1943 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
1944 dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD); 1944 dd->ipath_rcvctrl &
1945 ~(1ULL << dd->ipath_r_tailupd_shift));
1945 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 1946 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
1946 dd->ipath_rcvctrl); 1947 dd->ipath_rcvctrl);
1947 /* Notify any waiting slaves */ 1948 /* Notify any waiting slaves */
@@ -2050,9 +2051,9 @@ static int ipath_close(struct inode *in, struct file *fp)
2050 if (dd->ipath_kregbase) { 2051 if (dd->ipath_kregbase) {
2051 int i; 2052 int i;
2052 /* atomically clear receive enable port and intr avail. */ 2053 /* atomically clear receive enable port and intr avail. */
2053 clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, 2054 clear_bit(dd->ipath_r_portenable_shift + port,
2054 &dd->ipath_rcvctrl); 2055 &dd->ipath_rcvctrl);
2055 clear_bit(pd->port_port + INFINIPATH_R_INTRAVAIL_SHIFT, 2056 clear_bit(pd->port_port + dd->ipath_r_intravail_shift,
2056 &dd->ipath_rcvctrl); 2057 &dd->ipath_rcvctrl);
2057 ipath_write_kreg( dd, dd->ipath_kregs->kr_rcvctrl, 2058 ipath_write_kreg( dd, dd->ipath_kregs->kr_rcvctrl,
2058 dd->ipath_rcvctrl); 2059 dd->ipath_rcvctrl);