• François Romieu's avatar
    [PATCH] via-velocity: received ring wrong index and missing barriers · 2f652923
    François Romieu authored
    There were several receive ring related bugs.
    
    In velocity_give_many_rx_descs(), index calculation was incorrect.
    This and bugs in velocity_rx_srv() described in the following paragraph
    caused packet loss, truncation and infinite error interrupt generation.
    
    In velocity_rx_srv(), velocity_rx_refill() could be called without any
    dirty slot.  With proper timing, This can result in refilling yet
    unreceived packets and pushing dirty pointer ahead of the current pointer.
    And vptr->rd_curr which is used by velocity_rx_refill() was updated after
    calling velocity_rx_refill() thus screwing receive descriptor ring.
    Also, between checking owner and reading the packet, rmb() is missing.
    Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
    2f652923
via-velocity.c 85.7 KB