• Roland Dreier's avatar
    [PATCH] InfiniBand/mthca: add needed rmb() in event queue poll · e02b65fc
    Roland Dreier authored
    Add an rmb() between checking the ownership bit of an event queue entry and
    reading the contents of the EQE.  Without this barrier, the CPU could read
    stale contents of the EQE before HW writes the EQE but have the read of the
    ownership bit reordered until after HW finishes writing, which leads to the
    driver processing an incorrect event.  This was actually observed to happen
    when multiple completion queues are in heavy use on an IBM JS20 PowerPC 970
    system.
    
    Also explain the existing rmb() in completion queue poll (there for the same
    reason) and slightly improve debugging output.
    Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    e02b65fc
mthca_cq.c 20.5 KB