Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2577802imu; Thu, 29 Nov 2018 07:09:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/U93g5XR7YcyUPfiuMxTSRK8Lu+mTgDEODVgolZ7TJCzPKoNB2Q1l9soU0SrdcSHVejBFyR X-Received: by 2002:a63:314c:: with SMTP id x73mr1548029pgx.323.1543504144483; Thu, 29 Nov 2018 07:09:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543504144; cv=none; d=google.com; s=arc-20160816; b=Ld4Tf3X5O3Gxoy+2eGdev8Ph/AcKCBfoMiRd3xcfDM6pvFnFtr4Vvr1liuxHuh7RZx WTew+DfHAmAdWzeZrLkTJpKp3xzo4lnnV3FdcfRawlHeUGYGCXtFrzjLU0v9wrbxzPjj 4QjUaHeP0fK1ct72+0EIRqrvLne4qB87huh/yt2m3/ggoNYXMz/sMK6X5DGEBvW3YZ2w UTvG1xngmh7MqlQXKioGFKrAoxeu/SON3ptJhsRgyZSucPWdulmO/JUzBUC1b3iEHuTM 4+3xnSSNOnfLgLceX71E5SoVg57NTNjhNkmOCVXOE+eMtYPkcAQkQCNdBelx2Hdq2ksZ BW3w== 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=cgSB5DipvLs7+Fxo9kadeShGQHVk97Vd7qLRCcL6iF0=; b=XYf7CzyZlBfgXfUSCe4wIgHdcpmzoyTPnahAFUmhYXX0agzDN0wjVLI0k2rXUPpDrg PCqJDRmAu8dADQC73cCAC2sgMA7oKgwVt+HLpb2lrTanX2q368vj4RvBLfcSRafgjWfh di55NPlvhaZpDlbE/ktHNli7bbgYD8+n6Sy2gtTHe84uEkAUfRrp1sIEdP7/A/c3ihPJ 8O6LgGg85wp9XOHwsS6XhJFlfdJdxvpw1VCQpJAkvAaQT6KmPI4u4EnmZBk7DjD8Lr6c wX/IySQPPmAqLpm6Vq/I6+Cis5lMtDw4p2ZZX9BS4/1vWyZNPEEGFk85iSAlb8k1XtDv pdmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hloE5PA4; 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 h14si2193628pgd.189.2018.11.29.07.08.31; Thu, 29 Nov 2018 07:09:04 -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=hloE5PA4; 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 S1729372AbeK3BUX (ORCPT + 99 others); Thu, 29 Nov 2018 20:20:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:41270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728611AbeK3BUW (ORCPT ); Thu, 29 Nov 2018 20:20:22 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 AF29D21019; Thu, 29 Nov 2018 14:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543500892; bh=P6pV1tY1ko1+nu1unYHfr5oPTWS+C6eTvxM/3oNXOxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hloE5PA4q5ib6d7QGJjTitTVjOqvU3CllKFFBdAVIOC/X/1Bs20JLDVrTypqKXOmF 7AQ3OuM7vkrpM/8J+Fvya18/XYWkiHn211W/BDxsaKDO/1eism1LOOqFDKVGtEMci8 ODDp1UshGeHILYwaxzgUgZISRFZeJ0tOj4Ajz/Cs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Rojtberg , Dmitry Torokhov , Sasha Levin Subject: [PATCH 3.18 33/83] Input: xpad - fix clash of presence handling with LED setting Date: Thu, 29 Nov 2018 15:11:51 +0100 Message-Id: <20181129140139.784365011@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140138.002176596@linuxfoundation.org> References: <20181129140138.002176596@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit fbe6a3114471cccaeaeabfa56937731503ece545 ] Do not call xpad_identify_controller at init with wireless devices: it conflicts with the already sent presence packet and will be called by xpad360w_process_packet as needed anyway. Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/joystick/xpad.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index ff368860a5f9..1a66443f3cd5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1003,8 +1003,15 @@ static int xpad_led_probe(struct usb_xpad *xpad) if (error) goto err_free_id; - /* Light up the segment corresponding to controller number */ - xpad_identify_controller(xpad); + if (xpad->xtype == XTYPE_XBOX360) { + /* + * Light up the segment corresponding to controller + * number on wired devices. On wireless we'll do that + * when they respond to "presence" packet. + */ + xpad_identify_controller(xpad); + } + return 0; err_free_id: -- 2.17.1