• K
    [SCSI] mptsas : FW event thread and scsi mid layer deadlock in SYNCHRONIZE CACHE command · 9766096d
    Kashyap, Desai 提交于
    Normally In HBA reset path MPT driver will flush existing work in current work
    queue (mpt/0) . This is just a dummy activity for MPT driver point of
    view, since HBA reset will turn off Work queue events.
    
    It means we will simply returns from work queue without doing anything.
    But for the case where Work is already done (half the way), we have to have
    that work to be done.
    
    Considering above condition we stuck forever since Deadlock in scsi midlayer
    and MPT driver. sd_sync_cache() will wait forever since HBA is not in
    Running state, and it will never come into Running state since
    sd_sync_cache() is called from HBA reset context.
    Now new code will not wait for half cooked work to be finished
    before returning from HBA reset.
    
    Once we are out of HBA reset, EH thread will change host state to running from
    recovery and work waiting for running state of HBA will be finished.
    New code is turning ON firmware event from another special work called
    Rescan toplogy.
    Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
    Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
    9766096d
mptsas.c 133.8 KB