scsi: libsas: Pass gfp_t flags to event notifiers
authorAhmed S. Darwish <a.darwish@linutronix.de>
Mon, 18 Jan 2021 10:09:44 +0000 (11:09 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 23 Jan 2021 02:31:08 +0000 (21:31 -0500)
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()

Link: https://lore.kernel.org/r/20210118100955.1761652-9-a.darwish@linutronix.de
Cc: Jason Yan <yanaijie@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_event.c
drivers/scsi/libsas/sas_init.c

index ba266a1..25f3aae 100644 (file)
@@ -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);
 }
index f8ae1f0..9ce0cd2 100644 (file)
@@ -404,7 +404,8 @@ 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);
                }
        }