Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2028492imm; Thu, 24 May 2018 04:47:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4ENg2oi/UNdmz4g4Xk5wLWJrEaatWVhCS8Y6RaST+VOq3cTWApeRjL1ZUkP1DQZj0A5OO X-Received: by 2002:a63:a411:: with SMTP id c17-v6mr5541687pgf.110.1527162425627; Thu, 24 May 2018 04:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527162425; cv=none; d=google.com; s=arc-20160816; b=Eky2dCaVgTt/CNSo2HKHQJ278STaw7jFxFq175jGUzZ9AnG2yKarQJVhkeFkoyFvf7 CpUbhGVtKqb3Am5380PwAjjyF/sGmPyJcqP2JP2O2mq4/q7amIixMTkkl/8fKfRxjgyV edtj1oHr33sLTJyCHpGTrpwDm52y7nK6Cp490SUuVEF33QQ+ToR9GNzc2mrVCNliE6RM +Zm03QS3KWOcqIRZSJwEKCqopBPwUHjkgmSFPS+X7+S+LcRuPES8LUvzhLzb0c1x7Llf 6qqIz3yxUoFfYjreFKqIyZ7uai/b+8ecIklyZxctIWeHh+YBgVZhUS9iz92xBuudCgWg uErg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=TLB7D1L9YVvBkK/+dJJTwI7LaMAxzMc1JbbFwCS9R8s=; b=xdcPdVVHiqsDt7/6kfB1GDjP0EZwsnHo0kgCIBykAIPJaMzWJCorDfPo7Prncw/J5w etlF2ELVGz7e4vvu/8J1dbEtxTNSIT8muxDMS384h+OH/c1f2PYq1Xmv0s3ijJI8XkS5 oTh8k6H/QOulzAWML/CrxoFjHMf7HXiJlNiyTKWhgW56W5XwKwMxjtTbbP3HGVNX/nYG w/mGqd2yG1e/IN2P8B3ULRZm+3Db4Jf0Rwyq9asjsjY4Z54UGlG2hIZbhM/bkI2LhC1m HKXrXm+i5wP0a4zxl3A3WK4nhbIfcfkIdQrocbVbjVq+TT8KiT6q/cIGR0lWepGjVx8Y JzGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KcP0yplq; 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 f85-v6si20908300pfj.125.2018.05.24.04.46.51; Thu, 24 May 2018 04:47:05 -0700 (PDT) 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=KcP0yplq; 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 S969278AbeEXLow (ORCPT + 99 others); Thu, 24 May 2018 07:44:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:33206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966607AbeEXJsI (ORCPT ); Thu, 24 May 2018 05:48:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 64CB120847; Thu, 24 May 2018 09:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155287; bh=mzHlHmQKYX9dBGB8y+wREF4flWtI158sr4l0pY9r3Jo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KcP0yplqxK7iCOjd+gq0mnYwp/YuJ5pUMzGX49974u44uo/lOjVMKWWHmeZRufI4a LMRXSchH00DBpU/IdSdLb2sBA+Yf8YsvAD8BqdO4t9ojiw+qlYhQwqpEtqboLz549m 2vQzJnKJswz7jGMXUYz98oeGT8+1Ds/Rsi94f0PU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Opasiak , John Keeping , Felipe Balbi , Sasha Levin Subject: [PATCH 4.9 24/96] usb: gadget: f_uac2: fix bFirstInterface in composite gadget Date: Thu, 24 May 2018 11:38:07 +0200 Message-Id: <20180524093606.976127859@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093605.602125311@linuxfoundation.org> References: <20180524093605.602125311@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Keeping [ Upstream commit 8813a59ed892305b5ac1b5b901740b1ad4b5fefa ] If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Reviewed-by: Krzysztof Opasiak Signed-off-by: John Keeping Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_uac2.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/gadget/function/f_uac2.c +++ b/drivers/usb/gadget/function/f_uac2.c @@ -1040,6 +1040,8 @@ afunc_bind(struct usb_configuration *cfg dev_err(dev, "%s:%d Error!\n", __func__, __LINE__); return ret; } + iad_desc.bFirstInterface = ret; + std_ac_if_desc.bInterfaceNumber = ret; agdev->ac_intf = ret; agdev->ac_alt = 0;