diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-08-25 14:24:46 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-22 18:22:39 -0400 |
commit | e35d710d0c5b74bc9833d6a3791706bd577a3724 (patch) | |
tree | 3bb24378144082c7f521e83194d027914c65afbc /drivers/infiniband | |
parent | d821f02a6ebed97e35e0bc7575452cfc6f9073cb (diff) |
IB/ipath: fix return value from ipath_poll
This stops the generic poll code from waiting for a timeout.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 6ba9a2d1e6ec..29930e22318e 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -1150,6 +1150,7 @@ static unsigned int ipath_poll(struct file *fp, | |||
1150 | struct ipath_portdata *pd; | 1150 | struct ipath_portdata *pd; |
1151 | u32 head, tail; | 1151 | u32 head, tail; |
1152 | int bit; | 1152 | int bit; |
1153 | unsigned pollflag = 0; | ||
1153 | struct ipath_devdata *dd; | 1154 | struct ipath_devdata *dd; |
1154 | 1155 | ||
1155 | pd = port_fp(fp); | 1156 | pd = port_fp(fp); |
@@ -1186,9 +1187,12 @@ static unsigned int ipath_poll(struct file *fp, | |||
1186 | clear_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag); | 1187 | clear_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag); |
1187 | pd->port_rcvwait_to++; | 1188 | pd->port_rcvwait_to++; |
1188 | } | 1189 | } |
1190 | else | ||
1191 | pollflag = POLLIN | POLLRDNORM; | ||
1189 | } | 1192 | } |
1190 | else { | 1193 | else { |
1191 | /* it's already happened; don't do wait_event overhead */ | 1194 | /* it's already happened; don't do wait_event overhead */ |
1195 | pollflag = POLLIN | POLLRDNORM; | ||
1192 | pd->port_rcvnowait++; | 1196 | pd->port_rcvnowait++; |
1193 | } | 1197 | } |
1194 | 1198 | ||
@@ -1196,7 +1200,7 @@ static unsigned int ipath_poll(struct file *fp, | |||
1196 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, | 1200 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, |
1197 | dd->ipath_rcvctrl); | 1201 | dd->ipath_rcvctrl); |
1198 | 1202 | ||
1199 | return 0; | 1203 | return pollflag; |
1200 | } | 1204 | } |
1201 | 1205 | ||
1202 | static int try_alloc_port(struct ipath_devdata *dd, int port, | 1206 | static int try_alloc_port(struct ipath_devdata *dd, int port, |