Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp891929ybz; Fri, 17 Apr 2020 11:55:53 -0700 (PDT) X-Google-Smtp-Source: APiQypLO+/0spbVk3dGa89H1dOyJu88ZT7CeIp8DRfNpx4hXzPL5sknmlAG7KFnE9x2w6OQ9bOQQ X-Received: by 2002:a50:a685:: with SMTP id e5mr4172051edc.243.1587149753112; Fri, 17 Apr 2020 11:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587149753; cv=none; d=google.com; s=arc-20160816; b=qOnf0t3G5tFkqFkwGNzpxLFV7yXpjWsX0qQ0wj40EXeXfFWHhEx3AkD51oAj8xQWZ6 aeUFZYR8njeyimVncNve6w8K6GmNgr7C5dFK+W+GSiZcD7LPOV3+KDmr2FZrrz1i4gR6 SkRubDo+A+LSP263LqU5zxgM97gUMraaoQ9U0lHmIatgFxVkoi+KNQuIf73tnWFDasuh xdF3Z3nsi2DQHG+Hv+Xj53bd81s773S9A78SHcfqNJY5B7q7s69BcLnowsy7no8VUApe RoS6HSvf8q72kENZxtK21vjDdkEdClQEOm0DEs2wdZXeybVOst64pV1mS6vSla1FMttA T3bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=21Z3XZpk5doVQ7kvJjQwghYdVAHE9CLZRZ7gAMPbpEs=; b=ZBMiJkM+t8LJMGEudNcRpSpelV2N0yVkRR1D+gdFqJ89U3hnevmJS5uzxb+L26pv// du/vHYsUFFKAO5ygnrpiEC9WRlN4VizjSmgc1W8uHUktFKftY/qX84UuwBLsOjSdeWdS A135G7RvtITCgHjIcqRJN0AF5ZvmDufgha8Zjm0dwYi3UQayEBpmIxW+05YaaS20Ov8j eaZb/R7obyfFdi/Gd95RmYHVJkMGeaAQzXWtn0cJGijELzGE8CqXzuxiCUKULUt9ie7W YeuSQeZmPujI6z95S0QZNDfGUekSWtAxkJ6TOYiSOM2K32ARZtb7ju53URIkDBC7bHS5 iUgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@b1c1l1.com header.s=alpha header.b=njX+6R2n; 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=REJECT sp=REJECT dis=NONE) header.from=b1c1l1.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si14300936ejk.225.2020.04.17.11.55.30; Fri, 17 Apr 2020 11:55:53 -0700 (PDT) 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=@b1c1l1.com header.s=alpha header.b=njX+6R2n; 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=REJECT sp=REJECT dis=NONE) header.from=b1c1l1.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730347AbgDQSyJ (ORCPT + 99 others); Fri, 17 Apr 2020 14:54:09 -0400 Received: from vip1.b1c1l1.com ([64.57.102.218]:25934 "EHLO vip1.b1c1l1.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726432AbgDQSyJ (ORCPT ); Fri, 17 Apr 2020 14:54:09 -0400 X-Greylist: delayed 436 seconds by postgrey-1.27 at vger.kernel.org; Fri, 17 Apr 2020 14:54:08 EDT Received: by vip1.b1c1l1.com (Postfix) with ESMTPSA id A87BB2736E; Fri, 17 Apr 2020 18:46:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=b1c1l1.com; s=alpha; t=1587149211; bh=21Z3XZpk5doVQ7kvJjQwghYdVAHE9CLZRZ7gAMPbpEs=; h=From:To:Cc:Subject:Date; b=njX+6R2n2qQaGQZkVFPai/Q7+U1sUK2OFxcjHcPXIr0BWt7WhOo6Ght71tRsaoUG8 +GbvZ9x/cp0vgaDcogTwKGo2vyK3zsSxtbqsTHbDAUO3L3f2ebKOEPo3PfCzr3gx3c T4tKLpTB23Qyoehsn8+xB3xSxGmz+BgbF6zeGvVKq7anIOPZjNwyjF5YkGLmE1UnoL opdDcvSN9ktHI3G+MSENg7U2I+6stXxajknPQ9wZvcwEXPo9zA0zWBVOBuzieUvuHu rPMVRjV6GnZJyvvxU3UaJeF3aaEyAShsBvqNDMTRLYTftKUQTUKk5XWhCYb09ypOwA jGO6GCiKZKSug== From: Benjamin Lee To: Alexander Usyskin , Tomas Winkler , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Benjamin Lee Subject: [PATCH] mei: me: fix irq number stored in hw struct Date: Fri, 17 Apr 2020 11:45:38 -0700 Message-Id: <20200417184538.349550-1-ben@b1c1l1.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 261b3e1f2a01 ("mei: me: store irq number in the hw struct.") stores the irq number in the hw struct before MSI is enabled. This caused a regression for mei_me_synchronize_irq() waiting for the wrong irq number. On my laptop this causes a hang on shutdown. Fix the issue by storing the irq number after enabling MSI. Fixes: 261b3e1f2a01 ("mei: me: store irq number in the hw struct.") Signed-off-by: Benjamin Lee --- drivers/misc/mei/pci-me.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 3d21c38e2dbb..0c390fe421ad 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c @@ -203,11 +203,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } hw = to_me_hw(dev); hw->mem_addr = pcim_iomap_table(pdev)[0]; - hw->irq = pdev->irq; hw->read_fws = mei_me_read_fws; pci_enable_msi(pdev); + hw->irq = pdev->irq; + /* request and enable interrupt */ irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT : IRQF_SHARED; -- 2.26.1