From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 A6DC43537F9 for ; Sat, 27 Jun 2026 05:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782538988; cv=none; b=NjAb8zSzbZZGmU2kbTdV/56WkbxigPBB194aRYjrZ1i0YlLPHr1mMID5R/8Ej2Q+UFd0saFvWib2ZY21G0ycWqO8NZDHjnDcdg5QxyboAbb/y412TELgdEuzytvw76DL/pxTUPouL7sgnfaqPGB2p1VyxlFzU3txSAwUTBaFtTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782538988; c=relaxed/simple; bh=1AlcacmmfGnLSGC42haB1KmCNL6YGKCWUowghp+cB7M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ICsB7qwmAo0q0ciwr8aYgV3wmqZhlA4iJ1vSYsdFks4SzwHUakOkz7V6r2X3nexRN+8t1MUrjrKqrhGz1Pzz8CenZptSon+8huoXdY/HXIIab0KGoH/YS9EdiKDmzlvlsk2+gYhoqxrH5oH5FugDG7nAE+B2xMLXKuKZ+9/ards= 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=MA8ZqyQ6; arc=none smtp.client-ip=74.125.82.170 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="MA8ZqyQ6" Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-30e18c3e0b8so52967eec.0 for ; Fri, 26 Jun 2026 22:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782538987; x=1783143787; 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=iqXoMKna19xGBHDnSKCZr4IKhjs+v6dxb7RGvIkniRE=; b=MA8ZqyQ6PSrWjZtMEprM1wH20EjXeNvxAFgNqRNBcapuRta7nxP1lFLjGyWF9qZqAv NR0qtZ7HQliE7M6kDc/aGIqbl7cc34kVdWralB6ny11f4nJ1ybp12BwerMX6Sd1Ws7vL 2gKmoD47O95Jun/dLQdID7u6+QkyzLYriJADS2gpTfF7k8xUUciCXOp/iephx8dls+Np io1opYnfT71DmO3idkAYJ8rVUIO5HM5cPWD4wI8FILntjaenznB+XmljNEjVdjdWnkMG zrrvNAar38KQqLaO37l5R8pJEsxlEKDdwwuHxIGca5sNm6VCx0tVIBVQ1WxaDuOxIyRk eW/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782538987; x=1783143787; 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=iqXoMKna19xGBHDnSKCZr4IKhjs+v6dxb7RGvIkniRE=; b=eYr+//ux2e7CvAmLODJP7arFenEnFtuQkMcSXhZgs8XB9jkZGRlVG0xBhsQs0VCHZD JAfirEgV5QjuEpPIRcJmZxjSf4Bk9iU72SFXYiNydbL572xq9zvn/gQFUs/oCBB/OazR Sxf1ROfWLELf2hWMq5RatabvGCSOc2olc272g6NVGsbwn2R8knSpLj/x8ML4pjuAt7Xe IKfJDnHSJqnHqWgdFc2l637jy51jAIQ0IPwBgotLGCFCOXVhN9ck/0X0hOfwlre0VrEq S5lhkk1XZxMceGhn64cIzgWC/gOSmFrdCw3f7QKroUDc1uPChQBCDykpbjNbniSLwk3g vDjw== X-Forwarded-Encrypted: i=1; AHgh+RpUb2WdESG3//CVU6yiEswhmMOsWCh4XNHAaWbf/YsUbifIRNmC82k+z2paC+Bt488DeL1EinrS9HzaoT4=@vger.kernel.org X-Gm-Message-State: AOJu0Yzuu4nwPr7i51csVwgTfip8H24jaHuQhdDSKzV5Qnjz233ckTqj HkL8c6wkRriLPxMUxQjoFkvlSps4Fo8oYLcrUjgYAcRQXS8alM5VZmCH X-Gm-Gg: AfdE7cnM46phUd4maxAbdAW4PCB2oYKNGWD80gu7xE4qhZcc3gFDl30B8716Ma2r8aF oWKjwg7FdIihhekLaPSwYiZWICSI2UUsIDaTYtWm0mmxRBhjjBRaDAeBvIAp9Ev6OEsXrOTl047 UluxiXBR06lm7OtA4t3zyaag6NnUjD0qwJeOc5RSdIknaHqeUcWWjMk0sPKnH0XQX/zZKrMmC+8 1egp2XT21/jYPC0buCoXwMg29ILkElgI+YvPqwtcbkSd8++PyUN6T+ggMOMp0Z9maDNYjOjvq9s MrUmJWJMn5fziCa1QFRYDZeaNCm3EYfqAojWSGTHfnYv4Y3BZk7jjsVadDQluB0y0UVXe/1F8Cc CDrkCBAtdn9QhBh+/YcTAsMeVthWIY3F0jm5K2cjXsuJUYYxOyrnPrwYUOmEJHrHUVzac/mprgq 8sU1UvV2aPl9KA5J9OskSiOIledHZiY9js17SoVUsA+KQDQVo0+GvG X-Received: by 2002:a05:7301:9e44:b0:2f5:5907:3a48 with SMTP id 5a478bee46e88-30c84d14053mr8966083eec.1.1782538986692; Fri, 26 Jun 2026 22:43:06 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:e062:ec60:2d87:502]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30ca5f15024sm11181432eec.17.2026.06.26.22.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 22:43:05 -0700 (PDT) Date: Fri, 26 Jun 2026 22:43:03 -0700 From: Dmitry Torokhov To: raoxu Cc: James.Bottomley@hansenpartnership.com, deller@gmx.de, linux-parisc@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] Input: gscps2 - advance receive buffer write index Message-ID: References: <460B5655BA580C60+20260624094739.850306-1-raoxu@uniontech.com> 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: <460B5655BA580C60+20260624094739.850306-1-raoxu@uniontech.com> On Wed, Jun 24, 2026 at 05:47:39PM +0800, raoxu wrote: > From: Xu Rao > > Commit 44f920069911 ("Input: gscps2 - use guard notation when > acquiring spinlock") moved the receive loop into gscps2_read_data() > and gscps2_report_data(). > > While moving the code, it preserved the writes to > buffer[ps2port->append], but omitted the following producer index > update from the original loop: > > ps2port->append = (ps2port->append + 1) & BUFFER_SIZE; > > As a result, append never advances. Since gscps2_report_data() only > reports bytes while act != append, the receive buffer always appears > empty and no keyboard or mouse data reaches the serio core. > > Restore the omitted index update. > > Fixes: 44f920069911 ("Input: gscps2 - use guard notation when acquiring spinlock") > Cc: stable@vger.kernel.org # 6.13+ > Signed-off-by: Xu Rao Applied, thank you. -- Dmitry