From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 184B52D2488 for ; Wed, 17 Jun 2026 03:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781667798; cv=none; b=RZSCIWnGYeOJ8+Ui7saktEUtSOwDw+ipSj8EBYbox0buhpz5p3/OeOfMyegIfrUCrwIHlgmsJJd9pdJTew1RoImPumQ872wyLCEHKlSw/h03CyVxQiMi7UFcfF3qPSp3zGwR7YcHoR6wTNFFBdNcAGnC6oIMKOGUp/bOe6VaMJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781667798; c=relaxed/simple; bh=WEOH9Zij855NRo72iOFHZ0pZ8rnJx31sv+Yqu0Mcwmo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aQfxBgs0/kfmM84kaJbiRfCqICeMJCkvvywdj4qzX4kZR/0Eanp/1tBDO7Xq2uDC3SBcMU2opbDGz6J1pVz4zkToSC+u/6iJidvceU50ym9zYB7jjcaUBWT2vHT5ulQlw6P4LIaow/JtLx678NLEKgVMrtqJBRSE6PuMWfTsOwk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=hWXLpXN/; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hWXLpXN/" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2c6b3f71648so9153325ad.2 for ; Tue, 16 Jun 2026 20:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1781667796; x=1782272596; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gKMvxmzWdS3ilWkE9VoEtw0e2IYGWSUEtrr2tn3P3Fk=; b=hWXLpXN/MWUO0Wtme1JSHHZl+NrYmmatzqBuMhEGTq5BPtN0v7TQsjJuiQ8YUwVokN gdWr3vMUevKFeA5aqkGYxvkbj5fXt2JNGy5N1PYzaqBo5x2PCg1DVa4nMUJ2WvcV1Zve T89Hdr2+mngHjZm54sSJKYmU4r9oiKlnTIx4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781667796; x=1782272596; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gKMvxmzWdS3ilWkE9VoEtw0e2IYGWSUEtrr2tn3P3Fk=; b=fyT3TvS8SWXAkuDsqGMaBhwcXKHN+1HoP91hNlMxNgaN64ThpggFavl33AWH9yIji7 nYTlwCmNF2AzKPDZ6nDN3agJ/pvw91qAxPAReCiU7svw7YCQjRS4VCdiDxgPc/cDsHX9 Uaghp81eZKMer/WmM9KMI3ldgx1hi/7mRkhkk56AnKSjbhV+CLCr5i7RxBGHG0v9/lr4 juhLvDW1imHI2WaTiwX/VlyUKPBTPcuaiOhDiU32sHjpCab7WivjvHUzdq90yky6IWSh obP8bLboz1INDb3Oa/PcuEc1m187Y237fB856ZRj+Gl57GaMKawRNT/T4R97oXu2MeF8 O8cg== X-Forwarded-Encrypted: i=1; AFNElJ9lhUMo349Wv1OYWEdhaa6jlgh0PyiML5gTrDCRbU0Y5XrxxdWitAJfZcTmR62uFBMCA7+9FwlLoB9Fmn8=@vger.kernel.org X-Gm-Message-State: AOJu0YwbLH0/QOxHsSxG3hAO9M5pys3UuLv93zXuN8n1RqoOOHdPVJbQ ys62h5DfjeDCMWPq+Q347+L1lsZ3BqSVxd8/l/LALRTQulXdVLEAA/cScVrBZPfDcQ== X-Gm-Gg: AfdE7cmfDJjnazZPm7alIiOtQIIyjZxdrrTvqXj1YEWKlzkbkq0/rGmY0kcwCLBAxG0 WgLRISZTuzE3tkXzz42urQStAweV14tSPqjKniETcSbS2Ph7O2f/YuDZSGxfgJcTsQ+Vu4hXcm/ nufJKQNZTfPvojb+qNzBsTjdUUrkRwh5NkrX+/GFwnw91cs7EeaFiTMYI62eO0yCKqWUzRB3D4R rngITMYfnJ2JpCW5CSX+135UFCs9zySNeqqi4KG45CHx4XMKhNC31bwBTKCuuYX73T/eRpDyLCh HtCO9vGEFlZMtUs6reHPtnTFxgVrdtGVZBTHJ2rMIHlir4hvK91FA8XjviqO/LK1ZGnwP9Y2l58 tHjXpppxuKriINdcacXPonNP5/4Ocx8bnfla/L+JE49jqQunlIBKDim/wuUbgYTmF2wbCLEoO4K TQc5S/0GrVh2FXPGKH50kPbU0S4apl1z5JkTX99AD+HZ+LQ3sR+vQ= X-Received: by 2002:a17:903:3847:b0:2bf:379b:53f4 with SMTP id d9443c01a7336-2c6bc21f206mr19662105ad.19.1781667796535; Tue, 16 Jun 2026 20:43:16 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:a0b:fabb:5b62:b85b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c6a1878426sm31639145ad.64.2026.06.16.20.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 20:43:16 -0700 (PDT) Date: Wed, 17 Jun 2026 12:43:12 +0900 From: Sergey Senozhatsky To: Sean Wang Cc: Sergey Senozhatsky , Marcel Holtmann , Luiz Augusto von Dentz , Mark-yw Chen , Sean Wang , Tomasz Figa , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/3] Bluetooth: btmtksdio: correct btmtksdio_txrx_work() loop timeout check Message-ID: References: <20260616111224.152140-1-senozhatsky@chromium.org> <20260616111224.152140-2-senozhatsky@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On (26/06/16 19:40), Sean Wang wrote: > > The btmtksdio_txrx_work() loop is expected to be terminated if running > > for longer than 5*HZ. However the timeout check is reversed: > > time_is_before_jiffies(old_jiffies + 5*HZ) evaluates to true when > > old_jiffies + 5*HZ is in the past i.e. when a timeout has occurred. > > Using OR with time_is_before_jiffies(txrx_timeout) means that: > > - before the 5-second timeout: the condition is `int_status || false`, > > so it loops as long as there are pending interrupts. > > - after the 5-second timeout: the condition becomes `int_status || true`, > > which is always true. > > > > Fix loop termination condition to actually enforce a 5*HZ timeout. > > > > Fixes: 26270bc189ea4 ("Bluetooth: btmtksdio: move interrupt service to work") > > Cc: stable@vger.kernel.org > > Signed-off-by: Sergey Senozhatsky > > --- > > drivers/bluetooth/btmtksdio.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c > > index 5b0fab7b89b5..c6f80c419e90 100644 > > --- a/drivers/bluetooth/btmtksdio.c > > +++ b/drivers/bluetooth/btmtksdio.c > > @@ -620,7 +620,7 @@ static void btmtksdio_txrx_work(struct work_struct *work) > > if (btmtksdio_rx_packet(bdev, rx_size) < 0) > > bdev->hdev->stat.err_rx++; > > } > > - } while (int_status || time_is_before_jiffies(txrx_timeout)); > > + } while (int_status && time_is_after_jiffies(txrx_timeout)); > > > > This patch has already been merged, so I think the series should be > respun based on the latest code. Oh, I see. Any chance it can be dropped from the tree or updated? The patch is identical it's the commit message that has changed. Otherwise, I can drop it from a v3 re-spin.