• Yuval Mintz's avatar
    qed: Change locking scheme for VF channel · b0bccb69
    Yuval Mintz authored
    Each VF employees a lock that's supposed to serialize its usage of the
    HW channel for communication with its PF, but the critical section is
    ill-defined:
    
      - VFs currently release the lock whenever the PF response arrives,
        prior to actually processing the reply buffer [which was also supposed
        to have been protected by same lock].
    
      - The lock would be released on first response, ignoring the possibilty
        the sw flow isn't over [as might be the case of the acquisition flow].
        As a result, the flow would run unprotected and would cause a double
        mutex release [as the additional message completion would release it
        while its actually already free].
    
    Change the flow to have a dedicated function to be called at end of each
    flow and release the lock.
    Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b0bccb69
qed_vf.c 34.7 KB