Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2098169ybl; Thu, 30 Jan 2020 11:19:17 -0800 (PST) X-Google-Smtp-Source: APXvYqz80JbwfER2+OPQbrndymDXHN7ZrdQZC3HdkCcamCQmp4dhTO+syIxc/UxkvPTA8cti0dft X-Received: by 2002:aca:ac10:: with SMTP id v16mr3719232oie.123.1580411957670; Thu, 30 Jan 2020 11:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411957; cv=none; d=google.com; s=arc-20160816; b=RBQh1WfYG05K99adL1+yY4BwjEXe4hcjPlpMG4eo6EoXLZFbWmDxvGFeqjsnM5QRVS OSZ2aybCPM/1TJBuuD9mcQ5HI8bF6a8fvJ2dUdmvvfHRglTq+B/veUOnuie4ykuUZQLl +30W4/3rBncUPPlO5aU0zTfCJ4g/P721gsiI5IUC8d96Th/WqdWCR/ud4Fs/kEh8Ohqh HGq87Z1akn3h4PtG9jWGBMpBvJbEpHMwJjCntCxf8sSeO9VhxVoUWkrV+wSmixMvSRRw OOV4T864ZVH6/df2wOo1xDNXUtGoLliDdzgRVxsBVskkdeNOaGTrj2IjuaX0icgm+rjP pcCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=woPhSGj5jK+Snq4a1tTV+ZU6jyrQt/ImS45qiHUReAo=; b=CCY2w6TC28s1skAduW2NuUYOx7UYJNwuYxgT+VN9QnzBs6ZkJWxHkxGCH7d/vakxLi oK+6R1c0Dqhzmd2vkyoGFBtwkxGJ6OuCyOEYY32+sW+CQUeY/8yYQuYB9FAvN5b73h6T Kek3M50zrWro+iMO0eP7pQ4QHivBxYzk4Ws1iGuz89u+uKRMOQsla23ptVPegAlSEq8t 8mtqFmQPV2+Gi7IKk5TAN6azdiz2uNtZo66V1odYjM1e1ha442oEV8N7cQwxS4FTsV/0 TC/Vmx02HZUfDY9GyH5t6aAjnBIhHhK/3BqHFvxodpBkLdGvBHGcspHP2xiWSiboE2/E IFgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k4UE24kk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si3669619otg.113.2020.01.30.11.19.06; Thu, 30 Jan 2020 11:19:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k4UE24kk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730916AbgA3Soy (ORCPT + 99 others); Thu, 30 Jan 2020 13:44:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:54180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730898AbgA3Sox (ORCPT ); Thu, 30 Jan 2020 13:44:53 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2ECA0205F4; Thu, 30 Jan 2020 18:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409892; bh=BG0m2GrDH4m2acE7FgUelvrKxWuUu7u18RQMU/Mm3Ro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k4UE24kkrDs/Ck30O+gQzR9xdYm90/+6FhwwHhT3Be3gdbLUHu07C401llW1/J4js i7sOSsszr+P7D7vwrS/YJFZ3yF9KP6d4pDl6GKiwNWr4q/GDxo/YEI+UOibjdk24fQ T1luQzwCE+DLdrJsDVKx1LX5Sn/1feymUZsD7m9Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rodrigo Rivas Costa , Jiri Kosina , Sasha Levin Subject: [PATCH 5.4 074/110] HID: steam: Fix input device disappearing Date: Thu, 30 Jan 2020 19:38:50 +0100 Message-Id: <20200130183623.158334552@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rodrigo Rivas Costa [ Upstream commit 20eee6e5af35d9586774e80b6e0b1850e7cc9899 ] The `connected` value for wired devices was not properly initialized, it must be set to `true` upon creation, because wired devices do not generate connection events. When a raw client (the Steam Client) uses the device, the input device is destroyed. Then, when the raw client finishes, it must be recreated. But since the `connected` variable was false this never happended. Signed-off-by: Rodrigo Rivas Costa Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-steam.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c index 8dae0f9b819e0..6286204d4c560 100644 --- a/drivers/hid/hid-steam.c +++ b/drivers/hid/hid-steam.c @@ -768,8 +768,12 @@ static int steam_probe(struct hid_device *hdev, if (steam->quirks & STEAM_QUIRK_WIRELESS) { hid_info(hdev, "Steam wireless receiver connected"); + /* If using a wireless adaptor ask for connection status */ + steam->connected = false; steam_request_conn_status(steam); } else { + /* A wired connection is always present */ + steam->connected = true; ret = steam_register(steam); if (ret) { hid_err(hdev, -- 2.20.1