Skip to content

Commit

Permalink
IB/ipath: fix return value from ipath_poll
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bryan O'Sullivan authored and Roland Dreier committed Sep 22, 2006
1 parent d821f02 commit e35d710
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/infiniband/hw/ipath/ipath_file_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ static unsigned int ipath_poll(struct file *fp,
struct ipath_portdata *pd;
u32 head, tail;
int bit;
unsigned pollflag = 0;
struct ipath_devdata *dd;

pd = port_fp(fp);
Expand Down Expand Up @@ -1186,17 +1187,20 @@ static unsigned int ipath_poll(struct file *fp,
clear_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag);
pd->port_rcvwait_to++;
}
else
pollflag = POLLIN | POLLRDNORM;
}
else {
/* it's already happened; don't do wait_event overhead */
pollflag = POLLIN | POLLRDNORM;
pd->port_rcvnowait++;
}

clear_bit(bit, &dd->ipath_rcvctrl);
ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
dd->ipath_rcvctrl);

return 0;
return pollflag;
}

static int try_alloc_port(struct ipath_devdata *dd, int port,
Expand Down

0 comments on commit e35d710

Please sign in to comment.