lkml.org 
[lkml]   [2006]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 21 of 23] IB/ipath - fix return value from ipath_poll
    Date
    From
    This stops the generic poll code from waiting for a timeout.

    Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>

    diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
    --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c Fri Aug 25 11:19:45 2006 -0700
    +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c Fri Aug 25 11:19:45 2006 -0700
    @@ -1150,6 +1150,7 @@ static unsigned int ipath_poll(struct fi
    struct ipath_portdata *pd;
    u32 head, tail;
    int bit;
    + unsigned pollflag = 0;
    struct ipath_devdata *dd;

    pd = port_fp(fp);
    @@ -1186,9 +1187,12 @@ static unsigned int ipath_poll(struct fi
    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++;
    }

    @@ -1196,7 +1200,7 @@ static unsigned int ipath_poll(struct fi
    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,
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-08-25 20:31    [W:0.020 / U:29.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site