lkml.org 
[lkml]   [2021]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 08/19] scsi: libsas: Pass gfp_t flags to event notifiers
    Date
    Use the new libsas event notifiers API, which requires callers to
    explicitly pass the gfp_t memory allocation flags.

    Context analysis:

    - sas_enable_revalidation(): process, acquires mutex
    - sas_resume_ha(): process, calls wait_event_timeout()

    Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
    Cc: John Garry <john.garry@huawei.com>
    Cc: Jason Yan <yanaijie@huawei.com>
    ---
    drivers/scsi/libsas/sas_event.c | 3 ++-
    drivers/scsi/libsas/sas_init.c | 2 +-
    2 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/drivers/scsi/libsas/sas_event.c b/drivers/scsi/libsas/sas_event.c
    index 31fc32b9bb4e..922056644da5 100644
    --- a/drivers/scsi/libsas/sas_event.c
    +++ b/drivers/scsi/libsas/sas_event.c
    @@ -109,7 +109,8 @@ void sas_enable_revalidation(struct sas_ha_struct *ha)

    sas_phy = container_of(port->phy_list.next, struct asd_sas_phy,
    port_phy_el);
    - sas_notify_port_event(sas_phy, PORTE_BROADCAST_RCVD);
    + sas_notify_port_event_gfp(sas_phy,
    + PORTE_BROADCAST_RCVD, GFP_KERNEL);
    }
    mutex_unlock(&ha->disco_mutex);
    }
    diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
    index 1c78347fbcc6..b8567902f0ce 100644
    --- a/drivers/scsi/libsas/sas_init.c
    +++ b/drivers/scsi/libsas/sas_init.c
    @@ -404,7 +404,7 @@ void sas_resume_ha(struct sas_ha_struct *ha)

    if (phy->suspended) {
    dev_warn(&phy->phy->dev, "resume timeout\n");
    - sas_notify_phy_event(phy, PHYE_RESUME_TIMEOUT);
    + sas_notify_phy_event_gfp(phy, PHYE_RESUME_TIMEOUT, GFP_KERNEL);
    }
    }

    --
    2.30.0
    \
     
     \ /
      Last update: 2021-01-12 12:09    [W:7.503 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site