Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3039800pxb; Tue, 12 Jan 2021 05:02:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaG45YHT5Dww/BAM/E3ZaVt4NsM/8xUYxXLOARN+h0W1Lw4gqbuNpOCCq7busvyikoO/l1 X-Received: by 2002:a17:906:fb1a:: with SMTP id lz26mr3192246ejb.194.1610456553037; Tue, 12 Jan 2021 05:02:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456553; cv=none; d=google.com; s=arc-20160816; b=CNUKCmWxmNLKpfo1mdOhEPtDdIhbrwUVSk5LZHM5U3XUkUW3O8CIpdfXBNND9yrxD6 lq6BznjCyehPKinjZJGr0rnj7uuhR5N64h4/ImJ3hrj+DjOE2DCnuOqj//VdnR9YBCrQ KwF7GKAQAgFa+ILXeEemkFTaKTtxmN1zRO+qxMbtGafb5ZuF1FUDDTNq+EbNqs2YFWAm xnIDQF5JBnDpuFW66CLYXY6xthJGqJKo6O+8FJB/IfBd9m2O4eLMnMI3o+cKDjCw0Pat QzoTWYGeelgkB4y/lrOIpGfuW2OOJ7jf0NlFKtdcxEhDiHPhJ6K1VQJx6hldylnFwp+g OkCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=HPSAiQuTaUq/+UoZvR6qPMlwgesT7E3LJM84qLoAvp4=; b=tTL2qXU3NFJ9Vpw1owwk/rb1XpDOE7LnO+gYBXfI2BhaOd+BLmDGcdjJzrjs3K4dDa 0Aus2rubGEdPvq1uKLmDqjbFIeJSu/BSorwvhIqGmgwij3Q9WNJcueWrLBniJ3gRkUz+ TZBoNFBnixtsXZ2wLy1wCyQo4KsktrG5tVJq3wpGT6a64LB6KOyh3hgs3WAadb9cZV/Q RPv0WDAZpBUuNPKTUk9MHqBxCbkG143lVJQ2g9kEyYNxfABJY1/f1AfbzFXpvoTbDF/+ 3SF45WRgzfxVt5jBN4N8XR9HveqfGQhP7Sq4HMEUcLHDgRmFK29wygGs9d1lEPWQFCqz m86w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JmLRKdM2; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt33si1135587ejc.320.2021.01.12.05.02.08; Tue, 12 Jan 2021 05:02:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JmLRKdM2; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730545AbhALLIL (ORCPT + 99 others); Tue, 12 Jan 2021 06:08:11 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45196 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbhALLIK (ORCPT ); Tue, 12 Jan 2021 06:08:10 -0500 From: "Ahmed S. Darwish" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1610449648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPSAiQuTaUq/+UoZvR6qPMlwgesT7E3LJM84qLoAvp4=; b=JmLRKdM2nfQLDBLW5YyXZkwFTOjZMp7hRVy3Gj+nBmQC5/iSz5ltuvbVHJ0UmOekBrWB7G iYXFtF+ZuurJMxnanfNPwWcTgConeHsy14MTDUBp+NfN4Gn/jT+fOtB2kHRY/mwjx9nYEW l9S1OkXD/5iRIs3KRBMDXYFrbha0GImZMOJwTvlbHI8mcZARNEVyAit+7oPVU+nzQzEeGY XSxxhDa+WRYgewoTyey5BkRAcUmbgqQJMfbj7OzX4SZSyQ4NGudQoQZ0o/Fi59LBnjDSIS yjt0UHKuWcG5KXmCOQ4TNNcpiNPb6/BcekEhtkRyDn9RUELci3nvgyix3Fvzng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1610449648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPSAiQuTaUq/+UoZvR6qPMlwgesT7E3LJM84qLoAvp4=; b=AoTq9zRUqYV74afnIh76mx5CqVLjDUFPI/eWwFneHtLLegLYeu6+Rb0HSM0wXUELMFU8Le DDzYyN5qYCo39ZDw== To: "James E.J. Bottomley" , "Martin K. Petersen" , John Garry , Jason Yan , Daniel Wagner , Artur Paszkiewicz , Jack Wang Cc: linux-scsi@vger.kernel.org, intel-linux-scu@intel.com, LKML , Thomas Gleixner , "Sebastian A. Siewior" , "Ahmed S. Darwish" Subject: [PATCH v2 08/19] scsi: libsas: Pass gfp_t flags to event notifiers Date: Tue, 12 Jan 2021 12:06:36 +0100 Message-Id: <20210112110647.627783-9-a.darwish@linutronix.de> In-Reply-To: <20210112110647.627783-1-a.darwish@linutronix.de> References: <20210112110647.627783-1-a.darwish@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: John Garry Cc: Jason Yan --- 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