Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2AA62FB08C; Wed, 25 Feb 2026 06:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002687; cv=none; b=BFvc63SsbEuJL8+CK6tf9CSD5bCN7AAC+8M7tgJ7uJzk03oltH8Hcez8HSSW6OqlG/Pby6BzWXlTnmaQXcyWmTSdcCWYFm5V6/wa6dJk8zJ7Pqp09kk9p7oodEvmleIoIuF6BWchgvZp4dk3K9amHtIMddlIFqfO7C5+vDj7kJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002687; c=relaxed/simple; bh=RUUUhEGVfDSxUsGlOSNdXjo5EvQYlY6HgV7LSwWv1Gw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TEKMhAor92unD1aGGxA3aT35rI+HEe2+UvXDcCAnpxLxn75B/HsTzOLoagSsPS6wINERPgtKGDY/0S6DqQxcZB3VDJ0Fr6TbE9704d8n07QFn1ve8Vhoct6BF9Gw38GNhz9JWo8uCARs0c9hwtc4RT0BPw1RkqHMugbfigwA9kU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vQJtVrMc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vQJtVrMc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB5A9C19422; Wed, 25 Feb 2026 06:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772002687; bh=RUUUhEGVfDSxUsGlOSNdXjo5EvQYlY6HgV7LSwWv1Gw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQJtVrMcCIm2GqWzFKECQtRtF+QOl0b4rdsWTNFVo8t8yV44J90YZRbKLLNabTfbi 6Ye6KbD4Nn10y/zEyHA0SPXOdZu5ZSltB73VcU5BmjWffN2EDtspNfx/nXTMhUEGwL zrp9rEwgDEekfgtDl5NhmKg8lCGY2rfwSrj7Bvu4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Justin Chen , Florian Fainelli , Sasha Levin Subject: [PATCH 6.18 480/641] usb: bdc: fix sleep during atomic Date: Tue, 24 Feb 2026 17:23:26 -0800 Message-ID: <20260225012400.146907372@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012348.915798704@linuxfoundation.org> References: <20260225012348.915798704@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Justin Chen [ Upstream commit f1195ca3b4bbd001d3f1264dce91f83dec7777f5 ] bdc_run() can be ran during atomic context leading to a sleep during atomic warning. Fix this by replacing read_poll_timeout() with read_poll_timeout_atomic(). Fixes: 75ae051efc9b ("usb: gadget: bdc: use readl_poll_timeout() to simplify code") Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20260120200754.2488765-1-justin.chen@broadcom.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/gadget/udc/bdc/bdc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index 5c3d8b64c0e76..f47aac078f6be 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -35,8 +35,8 @@ static int poll_oip(struct bdc *bdc, u32 usec) u32 status; int ret; - ret = readl_poll_timeout(bdc->regs + BDC_BDCSC, status, - (BDC_CSTS(status) != BDC_OIP), 10, usec); + ret = readl_poll_timeout_atomic(bdc->regs + BDC_BDCSC, status, + (BDC_CSTS(status) != BDC_OIP), 10, usec); if (ret) dev_err(bdc->dev, "operation timedout BDCSC: 0x%08x\n", status); else -- 2.51.0