Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9398278pxu; Mon, 28 Dec 2020 15:11:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAfAOJHDk4qAEl5O315AHRiCkSv3XlA/F4n0RLhwzw2aMVa21wo4bR4Q7mwMAexax9nmNR X-Received: by 2002:a17:906:ae43:: with SMTP id lf3mr40618147ejb.130.1609197079997; Mon, 28 Dec 2020 15:11:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609197079; cv=none; d=google.com; s=arc-20160816; b=OtThHPovOZB/+JpyauCocpvEi26zBITlo3DxXgs5N7bslEXlcV81ZTb8lFB1BWuEvp BlXVV/UoG2XTILaHJZsI+zBsB/Ak3YL6GiIpuTdvqDpR0R3uOkSwhrdIK+fNO2GjZnxU dhQ5y4u5wf5IQpYFx+BUS34pWzC7TY4AuDlnD0o5QgS584xiT5QKNdGwecyFH+195enh mX08OsZi92SmMc0fTI/BSRojcMw+5KnLn7CHzPz5G1ZD3BIRPUdBwaGvEvxvlCKUrva9 i72XmI7PcumtDmorKsbk4mMJzRygK9Adt3zkejfL4X1VxbiTI6EIr6dZfmaMuIEg4g46 J14g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CyADOeu93Y02yxWlSiIputmJC6yjJ4l1pxkvgcO7yxo=; b=eXva6LoLgXjcECUJtnhSYjYWXK/LOqQJYpmQZl0wWAkvF6UC5rYOXT0If9AoTY1I+8 18q3cWmmTcarA1PSqLsEEN0xPY54pYPysL4a17EYke66mTlgKbavQ5ERinhPyOAHzdDo PfQ94LWuK8Plmrp+2Fa6U+HoJcLhBjsahRIfPNqUT2iW+32hs7iMi2/y0mUK4lsWfShH RuuQZeLYWqt5HztdGgmW+2nrzczpoiSBMzr0RFyw9oCWlOwtlJDqNGfIZ9RDJCDp3CnX 7AZ0sXvDyZMD12GqAIvhzGkk0MjcXc4zJCGpyvhceSbeaEMQ72EhOy4Tmjz7cMXsiqhU 8ffw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BesVMMOb; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si21751769edv.195.2020.12.28.15.10.55; Mon, 28 Dec 2020 15:11:19 -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=@linuxfoundation.org header.s=korg header.b=BesVMMOb; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439935AbgL1OMo (ORCPT + 99 others); Mon, 28 Dec 2020 09:12:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:46804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439885AbgL1OMb (ORCPT ); Mon, 28 Dec 2020 09:12:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A542B206C3; Mon, 28 Dec 2020 14:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164736; bh=0npDmd/In9O/OjMT3VJo/+arTiDEArAeDeK+0HAJKmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BesVMMObGa/WYC/mw+SpwDjks0ZO+rrscHoLZrNH6EDABkf4L9ZqwkHh9PIndaLAB quuw+z0n+DPjL88yaPF4D8V4f3pxrtS2aHx+YH9Z5k5vvVDMJDtb29QjAuHU90ruFq NmcqNtuwcI/VNchgHu+gBmGFIWxumbpbYQf4gW8w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vikram Auradkar , Jack Wang , "Ahmed S. Darwish" , Sebastian Andrzej Siewior , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 248/717] scsi: pm80xx: Do not sleep in atomic context Date: Mon, 28 Dec 2020 13:44:06 +0100 Message-Id: <20201228125032.869230554@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ahmed S. Darwish [ Upstream commit 4ba9e516573e60c471c01bb369144651f6f8d50b ] hw_event_sas_phy_up() is used in hardirq/softirq context: pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet => PM8001_CHIP_DISP->isr() = pm80xx_chip_isr() => process_oq() [spin_lock_irqsave(&pm8001_ha->lock,)] => process_one_iomb() => mpi_hw_event() => hw_event_sas_phy_up() => msleep(200) Revert the msleep() back to an mdelay() to avoid sleeping in atomic context. Link: https://lore.kernel.org/r/20201126132952.2287996-2-bigeasy@linutronix.de Fixes: 4daf1ef3c681 ("scsi: pm80xx: Convert 'long' mdelay to msleep") Cc: Vikram Auradkar Cc: Jack Wang Acked-by: Jack Wang Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/pm8001/pm80xx_hwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 7593f248afb2c..155382ce84698 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -3363,7 +3363,7 @@ hw_event_sas_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb) pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr); spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags); if (pm8001_ha->flags == PM8001F_RUN_TIME) - msleep(200);/*delay a moment to wait disk to spinup*/ + mdelay(200); /* delay a moment to wait for disk to spin up */ pm8001_bytes_dmaed(pm8001_ha, phy_id); } -- 2.27.0