• J
    scsi: libsas: only clear phy->in_shutdown after shutdown event done · 0c6a0b9a
    Jason Yan 提交于
    mainline inclusion
    from mainline-5.2-rc6
    commit 04cf8b32bc6d3fbc640d5f62b3a14df207d3e1db
    category: bugfix
    bugzilla: 16823
    CVE: NA
    
    ---------------------------
    
    When the event queue is full of phy up and down events and reached the
    threshold, we will queue a shutdown-event, and set phy->in_shutdown so that
    we will not queue a shutdown-event again. But before the shutdown-event can
    be executed, every phy-down event will clear
    phy->in_shutdown and a new shutdown-event will be queued. The queue will
    be full of these shutdown-events.
    
    Fix this by only clear phy->in_shutdown in sas_phye_shutdown(), that is
    after the first shutdown-event has been executed.
    
    Fixes: f12486e0 ("scsi: libsas: shut down the PHY if events reached the threshold")
    Signed-off-by: NJason Yan <yanaijie@huawei.com>
    CC: John Garry <john.garry@huawei.com>
    CC: Johannes Thumshirn <jthumshirn@suse.de>
    CC: Ewan Milne <emilne@redhat.com>
    CC: Christoph Hellwig <hch@lst.de>
    CC: Tomas Henzl <thenzl@redhat.com>
    CC: Dan Williams <dan.j.williams@intel.com>
    CC: Hannes Reinecke <hare@suse.com>
    Reviewed-by: NJohn Garry <john.garry@huawei.com>
    Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
    [zhengbin: do not merge patch 71a4a9923122 & 3c236f8cc63b, cause
    these patches just modify printk info in function sas_phye_shutdown]
    Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
    Reviewed-by: NJason Yan <yanaijie@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    0c6a0b9a
sas_phy.c 4.8 KB