lkml.org 
[lkml]   [2016]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.6 12/56] qed: Fix setting/clearing bit in completion bitmap
    Date
    4.6-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Manish Chopra <manish.chopra@qlogic.com>

    [ Upstream commit 59d3f1ceb69b54569685d0c34dff16a1e0816b19 ]

    Slowpath completion handling is incorrectly changing
    SPQ_RING_SIZE bits instead of a single one.

    Fixes: 76a9a3642a0b ("qed: fix handling of concurrent ramrods")
    Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
    Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/qlogic/qed/qed_spq.c | 7 +++----
    1 file changed, 3 insertions(+), 4 deletions(-)

    --- a/drivers/net/ethernet/qlogic/qed/qed_spq.c
    +++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c
    @@ -791,13 +791,12 @@ int qed_spq_completion(struct qed_hwfn *
    * in a bitmap and increasing the chain consumer only
    * for the first successive completed entries.
    */
    - bitmap_set(p_spq->p_comp_bitmap, pos, SPQ_RING_SIZE);
    + __set_bit(pos, p_spq->p_comp_bitmap);

    while (test_bit(p_spq->comp_bitmap_idx,
    p_spq->p_comp_bitmap)) {
    - bitmap_clear(p_spq->p_comp_bitmap,
    - p_spq->comp_bitmap_idx,
    - SPQ_RING_SIZE);
    + __clear_bit(p_spq->comp_bitmap_idx,
    + p_spq->p_comp_bitmap);
    p_spq->comp_bitmap_idx++;
    qed_chain_return_produced(&p_spq->chain);
    }

    \
     
     \ /
      Last update: 2016-09-17 09:56    [W:4.071 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site