• Shyam Sundar's avatar
    scsi: qedf: Cleanup rrq_work after QEDF_CMD_OUTSTANDING is cleared · faea5719
    Shyam Sundar authored
    Here is the relevant logs for the problem we are solving:
    
    qedf_flush_active_ios:1707]:3: Flush active i/o's num=0x17 fcport=0xffff948168fbcc80 port_id=0x550200 scsi_id=0.
    qedf_flush_active_ios:1708]:3: Locking flush mutex.
    qedf_flush_active_ios:1758]:3: Not outstanding, xid=0xaaf, cmd_type=3 refcount=1.
    qedf_flush_active_ios:1896]:3: Flushed 0x16 I/Os, active=0x1.
    qedf_flush_active_ios:1901]:3: Flushed 0x16 I/Os, active=0x1 cnt=60.
    qedf_send_rrq:295]:3: Sending RRQ orig io = ffffb48b8f7d7158, orig_xid = 0xaaf
    qedf_initiate_els:37]:3: Sending ELS
    qedf_initiate_els:68]:3: initiate_els els_req = 0xffffb48b8f6d3098 cb_arg = ffff948fd5e4de80 xid = 4c6
    qedf_init_mp_req:2172]:3: Entered.
    qedf_init_mp_task:727]:3: Initializing MP task for cmd_type=4
    qedf_initiate_els:134]:3: Ringing doorbell for ELS req
    qedf_flush_active_ios:1901]:3: Flushed 0x16 I/Os, active=0x2 cnt=20.
    qedf_cmd_timeout:96]:3: ELS timeout, xid=0x4c6.
    qedf_rrq_compl:186]:3: Entered.
    qedf_rrq_compl:204]:3: rrq_compl: orig io = ffffb48b8f7d7158, orig xid = 0xaaf, rrq_xid = 0x4c6, refcount=1
    qedf_flush_active_ios:1935]:3: Unlocking flush mutex.
    qedf_upload_connection:1579]:3: Uploading connection port_id=550200.
    
    We found an ABTS command for which CMD_OUTSTANDING was cleared (line 3).
    For this command, delayed send_rrq was queued, but would take 10 secs to
    execute.  Adding capability to detect that (based on io_req->state that is
    being introduced), and attempt to cancel rrq_work. If we succeed, we drop
    the reference and free the io_req. If we cannot, then the els will get sent
    out and we will wait for 10 secs for it to complete.
    Signed-off-by: default avatarShyam Sundar <ssundar@marvell.com>
    Signed-off-by: default avatarSaurav Kashyap <skashyap@marvell.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    faea5719
qedf.h 16.7 KB