• Bart Van Assche's avatar
    IB/srp: reduce lock coverage of command completion · 94a9174c
    Bart Van Assche authored
    We only need the lock to cover list and credit manipulations, so push
    those into srp_remove_req() and update the call chains.
    
    We reorder the request removal and command completion in
    srp_process_rsp() to avoid the SCSI mid-layer sending another command
    before we've released our request and added any credits returned by the
    target. This prevents us from returning HOST_BUSY unneccesarily.
    Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
    [ broken out, small cleanups, and modified to avoid potential extraneous
      HOST_BUSY returns by David Dillow ]
    Signed-off-by: default avatarDavid Dillow <dillowda@ornl.gov>
    94a9174c
ib_srp.c 57.8 KB