From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 B56D5346E70 for ; Thu, 4 Jun 2026 21:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780609685; cv=none; b=mzNJCb68fAl7LeDwJbXiwqJih6d2tqEusN3Aen3zyPUcx4mcdAnxogIuSfds79v5OqETNUay5HN9CC6zGivQaWyK54TCFmra57rkdpHeLB3Tc7k8AlgWQikwINkvS2CFWT8bjpEBTL6UcXptESHEnNd+KUf00VN1T9xZbYg1t7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780609685; c=relaxed/simple; bh=RQw/MMIy0Y7JQXfYWayiWbJj3Y63IJWetlLoqy7cEiE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mlUw/uy06Dqnw0gcCMYGSHXKi+Sm3n8Ny3wyHKqPoBEAmeRk/3NLHCYfhYv/S5TL1McsC0wk4EPzAj1QOPEwJ4gFVT2/1CwpCQqaUGL/vsghCYFBsvJkt45zDRX4DMqLSYUQ1rwIC9PgaGGqZ/EFbC5gLR9AzrI2JMCOBEmxhZM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PHg/YrPU; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PHg/YrPU" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-490ace40f4bso14362795e9.3 for ; Thu, 04 Jun 2026 14:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780609682; x=1781214482; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nnLMdS9dXm1Xt3xZ1tL3GqGxgdcxj0AkHPljnYKRHGw=; b=PHg/YrPU5F8YR0cSB6DELWeBqiCxnwaWTb9JJMmiiturMs7lKFnYHjIZgYdj3eIXno tHwlCguRpmgyrzC7qaDMl0+DnlaQ54jCMQNCaB1hSFQ5tXoTz8/sRESVBXsdmzcnUwrP EgxRi4ou7afBaqwc5GQ1HocUFbAxJkfXURywMaFjsW72QY0ejDB6RxTPRZZUiX/wzJRK HjdWC8KMU1lAO6X1cpQufmX9nMz4z7QEy3d2f+1Gb379dIDR/Os8H5iym89vsRQvc11o mlfWsSQH/rs8mTHd1TARrJXesy2tMlLMNwHxU13ztNgRWsx2URDhttaz4IoRM9UxrMF3 OlGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780609682; x=1781214482; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nnLMdS9dXm1Xt3xZ1tL3GqGxgdcxj0AkHPljnYKRHGw=; b=HWWydwqe5z/OLg+grpwO1FmntCNxoZd8m6rQQFTwrmgnwakn6dRRjXRXYeXEDVjonJ x4Dp97QmGDSNUUCiptNSUNi/MBdPDWQWMRGeqZT+VRfSXixDppC4mrHygv04Vfhohncj JRO5AqiWXh9mSSmsbYU5MhuXN2+hs2QldtUZHJslU7ImRkXLDj5Ab3aOrvrSW/zgAI2l ZUyx8TUnAPVRsfoUL74xHwvuBK82oL/b07fpfqxPGtRJvRkwJC/CoYD2c7/wlVGwi5Ao JFJTAPc7UJJu+IKCWG70PnNEBwHQPiKNhsNBBYI1xlWMRj3Yr4+YfX3DD9YYUQ9WKJ3w CApA== X-Forwarded-Encrypted: i=1; AFNElJ/IGjxBIRG778qQ9Q/1QiFsa3/fCxUa4K4Oe4DD0GPkPkgSt84Sc2SE9mp0LwEvnAg0lDkxnC5tK15vVsI=@vger.kernel.org X-Gm-Message-State: AOJu0YyeihCR6azH0VHKu8pMTWSNajIH3SyOULKNQrtWktINq3LjuDOC VlFwJQnoRi5gK2dhdCdIrgyp/N/aaU0kdvltwoqoK1SqId22rwRHEhAx X-Gm-Gg: Acq92OEXTlP2TKuQcOLjQUIm4m5JyBgx3ZKNSH2QM+ndV48ThqGJ7JXRSK67/5hGGCH iAJ1QV4UrXygpInf023Ws8vjCWlrKLYvnd6FXQUV95eALXn1St5T7r8I7iAFSBLy6pqUl1MxMUy 1ltbjPZRFt2tt4zfT9sRFA2OUB7zw6zoo5AfD76ZRKfsrmLPohAE82RwaaAKYmzyaBp2/j395dU 9H3Ld55h5/dtkzEDu+dYhx247DQgbUaxgK2ftxz6qNJ/wcEROyGAaL3HM6ZiaEVJVFP8Y4osGas +QRf0hAMTPMoUIZU7xgaQ0tD+O2EHIC+ZqoS5/i3xPE/EIwW1KhPgXVtu4dY0yD7UxwxjSHymch TTgoPpXpwhWsD3ZD1yxowMhliuNq6L4dKVHPqUklbZFXlj9lRCS4ADhdGgyvpCQSlhzZD3RzYdk x2rxUx8qBRBfqVLizya6VgT3HWy8U3fTSr3QgbR82gvg== X-Received: by 2002:a05:600c:45c4:b0:490:4ee0:82ff with SMTP id 5b1f17b1804b1-490c25fcfafmr5160015e9.27.1780609682054; Thu, 04 Jun 2026 14:48:02 -0700 (PDT) Received: from [192.168.1.50] ([81.196.40.241]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc39eb04sm103707765e9.6.2026.06.04.14.47.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jun 2026 14:48:01 -0700 (PDT) Message-ID: <853404cd-cd0d-4562-82bf-2272240df785@gmail.com> Date: Fri, 5 Jun 2026 00:47:59 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read() To: Andy Shevchenko Cc: Minu Jin , gregkh@linuxfoundation.org, dan.carpenter@linaro.org, abrahamadekunle50@gmail.com, zxcv2569763104@gmail.com, milospuric856@gmail.com, karanja99erick@gmail.com, weibu@redadmin.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20260127153811.1592900-1-s9430939@naver.com> Content-Language: en-US From: Bitterblue Smith In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 03/06/2026 17:06, Andy Shevchenko wrote: > On Wed, Jun 03, 2026 at 04:40:45PM +0300, Bitterblue Smith wrote: >> On 03/06/2026 03:48, Andy Shevchenko wrote: >>> On Sun, May 24, 2026 at 09:30:01PM +0300, Bitterblue Smith wrote: >>>> On 27/01/2026 17:38, Minu Jin wrote: >>>>> This series improves error handling in _rtw_pktfile_read() and cleans up >>>>> the code style to comply with kernel standards. >>>>> >>>>> 1. The first patch combines the logic change and caller updates. >>>>> The function change and the caller updates must be in the same >>>>> patch. If they are separated, the code will not work correctly >>>>> or will cause errors at that specific point in the history. >>>>> >>>>> 2. The second patch focuses purely on code style cleanup (changing uint >>>>> to unsigned int) as requested by Andy Shevchenko. >>>>> >>>>> Regarding the logic change in _rtw_pktfile_read(): >>>>> >>>>> The original code used a ternary operator to read whatever data was >>>>> available, even if it was less than requested. This could lead to >>>>> callers processing incomplete data without knowing it. >>>>> >>>>> I have changed this to return -EINVAL when the remaining data is insufficient. >>>>> This is safer because most callers expect the exact amount of data and >>>>> should not proceed with a partial read. >>>>> >>>>> Testing and Verification: >>>>> >>>>> I do not have access to the physical RTL8723BS hardware. However, I have >>>>> performed a rigorous manual audit of the data path and verified the >>>>> changes using Smatch static analysis. The analysis confirmed that no >>>>> new warnings or logical regressions were introduced in the modified files. >>>> >>>> I have some bad news: >>>> >>>> https://bbs.archlinux.org/viewtopic.php?id=313401 >>> >>> It's unclear that this patch made it happen. See below. >> >> It looks pretty clear to me, but okay. I forwarded your request for bisection. > > I don't know how it does. There is no information about from which kernel one > upgrades to which. I assumed someone bumps from v7.0 to v7.0.3, but there no > such patch. If we take v6.19..v7.0.3 range, there are dozens of patches. > > I.o.w. it is semi-poorly written bug report: some of useful information and > some crucial that is missing... > The new message "coalesce failed with error -22" is printed when rtw_xmitframe_coalesce() returns -EINVAL. This is the only recent patch which touched rtw_xmitframe_coalesce(). >>>> [quote] >>>> >>>> Hey everyone, >>>> >>>> I recently upgraded my system, and now I’m having a strange issue with my >>>> WiFi (Realtek RTL8723BS). >>>> >>>> now I can no longer connect to any WiFi networks as a client. however, >>>> creating an Access Point (AP) still works fine, but whenever I try to connect >>>> to an existing network, the connection fails. >>>> >>>> dmesg logs: >>>> Every time I attempt a connection, dmesg gets spammed with this error: >>>> >>>> [ 1083.925640] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22 >>>> [ 1084.921217] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22 >>>> [ 1085.921434] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22 >>>> [ 1086.922320] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22 >>>> .... >>>> >>>> Has anyone encountered this specific "coalesce" error with the rtl8723bs >>>> driver? I'm looking for advice on whether this is a known bug in recent >>>> kernels or if there's a specific module parameter I should try to bypass >>>> this. >>>> >>>> System Info: >>>> >>>> Chipset: RTL8723BS (SDIO) >>>> >>>> Kernel version: 7.0.3-zen1-2-zen >>>> >>>> update: I fixed the issue after kernel downgrade >>>> >>>> [/quote] >>> >>> That guy should bisect and find the culprit. It will help a lot to understand >>> what's going on. >