Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1917748imm; Thu, 24 May 2018 02:55:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoV4Ci7MEnhKCbCRSqg5G+NrMSLjL73a4Nq8CTCVQwTV6RdnRNawDcDHpoDWtbmdP/g1tbt X-Received: by 2002:a62:3f81:: with SMTP id z1-v6mr6545402pfj.216.1527155714392; Thu, 24 May 2018 02:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155714; cv=none; d=google.com; s=arc-20160816; b=Im/394iDrqZ+3R2Nhbn/H7YDK3zY8vzb5XQ8ucXCcfNyQHo/OhIq6R+8wiIFm4osGy gkz9I5XyqaS3NuoCVAgKJkPdN2Ykn5xJcAT6BOdBQxQKF9iQHL5Tap0hSTToK6yUF2Cr DSmvc8j97dJixC1BvdgKDL2Skw1AXyP2ZYxWfatKi8QYlDUkyvtPnC1di7ZhuBYOksqJ DIeS4QkFR0TFYez6BVsde/QB+ULVe5f9NOTcQrwTzBiXZTqwOL6f6S6ZP7K2jDL1BKDU 0/Eqk7h5mACQRyCvh/vCk86AbKm9SngDqBKQS8Jql40zhpKCRyx6Eh9NdBflNnQhflN1 +m6Q== 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=FRL4TAkBx2J8ynzd4ExLDxU77px6B7TlZLqC3zVgRz8=; b=AzHbI4NSGIuLoxAmnlfB4A6CbMuI3mIMHr2QhFg+Um5taMnIbiEnfb1kcZitks8B+H icXPaUuwrtW4zpPNKtyADu1FcE8VVQzJ7u+YCxJlUo8U9js5cwzZ5ba748B7rnHuQGJL 6dJzSUi+A3+mkBmLiueTFrDkAXMAZZxCtGPKBwgp2QXXDXH7cdAfZ8Mtx23V17PXQtRx B12c9q2BceijXCEOKyj0dIvG4E7KczTE6cQhYZqBUidz8FUsupfqQx8TRXyZbtaXbnoL OwwB6tMgnCLoSpVgQWLrH7DiWWBIJNbR/32TffjRMcvdIJL43LNpjLes/ukTJbawGKIJ yLiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=feMnQ5oq; 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 p18-v6si4942180pgu.510.2018.05.24.02.54.59; Thu, 24 May 2018 02:55:14 -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=feMnQ5oq; 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 S968084AbeEXJxq (ORCPT + 99 others); Thu, 24 May 2018 05:53:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968054AbeEXJxf (ORCPT ); Thu, 24 May 2018 05:53:35 -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 00E802089F; Thu, 24 May 2018 09:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155614; bh=A1yLNjfqZFAtlAaszqf/DBpuyTQ4Lu4iC3e5w8EV+yI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feMnQ5oq9KmbYXgODzirmcQMSp+3H3tPwgTSwmUY2NUEt2jyeVqRxFftv86i9owAX uAlgHvoM5la4RRpGqnPG3AAG+/gw/h/vkY2bXAXjK1mqFnKSh96RmUm/JoVAkHpnC4 Dc047S/mDPODydiKv48Cvsu7PSFpFeaXHYX/DHKI= 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.14 054/165] usb: gadget: f_uac2: fix bFirstInterface in composite gadget Date: Thu, 24 May 2018 11:37:40 +0200 Message-Id: <20180524093624.209719956@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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.14-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 @@ -528,6 +528,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; uac2->ac_intf = ret; uac2->ac_alt = 0;