diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_file_ops.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index e7fbb31a48a..4277014d6f8 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -742,7 +742,8 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport, | |||
742 | * updated and correct itself, even in the face of software | 742 | * updated and correct itself, even in the face of software |
743 | * bugs. | 743 | * bugs. |
744 | */ | 744 | */ |
745 | *(volatile u64 *)pd->port_rcvhdrtail_kvaddr = 0; | 745 | if (pd->port_rcvhdrtail_kvaddr) |
746 | ipath_clear_rcvhdrtail(pd); | ||
746 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, | 747 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, |
747 | &dd->ipath_rcvctrl); | 748 | &dd->ipath_rcvctrl); |
748 | } else | 749 | } else |
@@ -1391,7 +1392,10 @@ static unsigned int ipath_poll_next(struct ipath_portdata *pd, | |||
1391 | pollflag = ipath_poll_hdrqfull(pd); | 1392 | pollflag = ipath_poll_hdrqfull(pd); |
1392 | 1393 | ||
1393 | head = ipath_read_ureg32(dd, ur_rcvhdrhead, pd->port_port); | 1394 | head = ipath_read_ureg32(dd, ur_rcvhdrhead, pd->port_port); |
1394 | tail = *(volatile u64 *)pd->port_rcvhdrtail_kvaddr; | 1395 | if (pd->port_rcvhdrtail_kvaddr) |
1396 | tail = ipath_get_rcvhdrtail(pd); | ||
1397 | else | ||
1398 | tail = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port); | ||
1395 | 1399 | ||
1396 | if (head != tail) | 1400 | if (head != tail) |
1397 | pollflag |= POLLIN | POLLRDNORM; | 1401 | pollflag |= POLLIN | POLLRDNORM; |
@@ -1932,7 +1936,8 @@ static int ipath_do_user_init(struct file *fp, | |||
1932 | * We explictly set the in-memory copy to 0 beforehand, so we don't | 1936 | * We explictly set the in-memory copy to 0 beforehand, so we don't |
1933 | * have to wait to be sure the DMA update has happened. | 1937 | * have to wait to be sure the DMA update has happened. |
1934 | */ | 1938 | */ |
1935 | *(volatile u64 *)pd->port_rcvhdrtail_kvaddr = 0ULL; | 1939 | if (pd->port_rcvhdrtail_kvaddr) |
1940 | ipath_clear_rcvhdrtail(pd); | ||
1936 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, | 1941 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, |
1937 | &dd->ipath_rcvctrl); | 1942 | &dd->ipath_rcvctrl); |
1938 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, | 1943 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, |