diff options
author | Robert Walsh <robert.walsh@qlogic.com> | 2007-06-18 17:24:49 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:26 -0400 |
commit | f2d042313e420002b06715675963cfab48ed2597 (patch) | |
tree | ae149c8d21220aff9157952e39a7632be8c7ba61 /drivers/infiniband/hw/ipath/ipath_intr.c | |
parent | b506e1dc59726a1c608f26e7294b9fe186255139 (diff) |
IB/ipath: ipath_poll fixups and enhancements
Fix ipath_poll and enhance it so we can poll for urgent packets or
regular packets and receive notifications of when a header queue
overflows.
Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_intr.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_intr.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 948091f7d5a..f8aac8e932f 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -680,6 +680,17 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
680 | chkerrpkts = 1; | 680 | chkerrpkts = 1; |
681 | dd->ipath_lastrcvhdrqtails[i] = tl; | 681 | dd->ipath_lastrcvhdrqtails[i] = tl; |
682 | pd->port_hdrqfull++; | 682 | pd->port_hdrqfull++; |
683 | if (test_bit(IPATH_PORT_WAITING_OVERFLOW, | ||
684 | &pd->port_flag)) { | ||
685 | clear_bit( | ||
686 | IPATH_PORT_WAITING_OVERFLOW, | ||
687 | &pd->port_flag); | ||
688 | set_bit( | ||
689 | IPATH_PORT_WAITING_OVERFLOW, | ||
690 | &pd->int_flag); | ||
691 | wake_up_interruptible( | ||
692 | &pd->port_wait); | ||
693 | } | ||
683 | } | 694 | } |
684 | } | 695 | } |
685 | } | 696 | } |
@@ -877,14 +888,25 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat) | |||
877 | dd->ipath_i_rcvurg_mask); | 888 | dd->ipath_i_rcvurg_mask); |
878 | for (i = 1; i < dd->ipath_cfgports; i++) { | 889 | for (i = 1; i < dd->ipath_cfgports; i++) { |
879 | struct ipath_portdata *pd = dd->ipath_pd[i]; | 890 | struct ipath_portdata *pd = dd->ipath_pd[i]; |
880 | if (portr & (1 << i) && pd && pd->port_cnt && | 891 | if (portr & (1 << i) && pd && pd->port_cnt) { |
881 | test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) { | 892 | if (test_bit(IPATH_PORT_WAITING_RCV, |
882 | clear_bit(IPATH_PORT_WAITING_RCV, | 893 | &pd->port_flag)) { |
883 | &pd->port_flag); | 894 | clear_bit(IPATH_PORT_WAITING_RCV, |
884 | clear_bit(i + INFINIPATH_R_INTRAVAIL_SHIFT, | 895 | &pd->port_flag); |
885 | &dd->ipath_rcvctrl); | 896 | set_bit(IPATH_PORT_WAITING_RCV, |
886 | wake_up_interruptible(&pd->port_wait); | 897 | &pd->int_flag); |
887 | rcvdint = 1; | 898 | clear_bit(i + INFINIPATH_R_INTRAVAIL_SHIFT, |
899 | &dd->ipath_rcvctrl); | ||
900 | wake_up_interruptible(&pd->port_wait); | ||
901 | rcvdint = 1; | ||
902 | } else if (test_bit(IPATH_PORT_WAITING_URG, | ||
903 | &pd->port_flag)) { | ||
904 | clear_bit(IPATH_PORT_WAITING_URG, | ||
905 | &pd->port_flag); | ||
906 | set_bit(IPATH_PORT_WAITING_URG, | ||
907 | &pd->int_flag); | ||
908 | wake_up_interruptible(&pd->port_wait); | ||
909 | } | ||
888 | } | 910 | } |
889 | } | 911 | } |
890 | if (rcvdint) { | 912 | if (rcvdint) { |