From patchwork Fri Nov 14 12:26:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 40817 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18E4F240ED for ; Fri, 14 Nov 2014 12:28:47 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id e51sf10633484eek.10 for ; Fri, 14 Nov 2014 04:28:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=q82BtHBWA4YTKrZ4WnmhjS0BmSPou+d3NOQJnWCVQhQ=; b=V3jOyacXhKN3NgHT/xHq2y7Ze/JwbCio9n8Ssr0MJMWDtPfUk02hHjLmKjlGktv7p1 BrzK6eEp1dDsJUCRwFFm0saMVALIoprY4PM04z/Gmhrc/Y3ahcQSGqAkPlRMD9R0e5h/ loqs8JmnesNXusJ/gVr6fn5wH0qJzhKfGVXu/smIMnTuTwcSoa0O1mtEpXNZNej6uK3B AWTG2DesFF5DPplS6Opk9g6anEw8xkK8GNSC9O2zsuecA1lsnZi5t+kSrvDs1QqauPI4 3GgRGedtxnHlKhWjTH9lbFbtVVTazxPYJtJj06+EApbPRKuSH4h1N3z4NZiCskqhqEag 0nCQ== X-Gm-Message-State: ALoCoQnt/34ZJ88BtfnQi00hcFOIE2jRb8MDYWrEeExqSpTIlLqry364zmFQRCczXzfBkH7GAem0 X-Received: by 10.112.217.102 with SMTP id ox6mr6344lbc.19.1415968126318; Fri, 14 Nov 2014 04:28:46 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.1 with SMTP id a1ls675371lae.19.gmail; Fri, 14 Nov 2014 04:28:46 -0800 (PST) X-Received: by 10.152.234.136 with SMTP id ue8mr7981081lac.21.1415968126209; Fri, 14 Nov 2014 04:28:46 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id ll12si41519737lac.58.2014.11.14.04.28.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:28:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so4065962lbi.15 for ; Fri, 14 Nov 2014 04:28:46 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr2460324lbr.74.1415968126125; Fri, 14 Nov 2014 04:28:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp755265lbc; Fri, 14 Nov 2014 04:28:45 -0800 (PST) X-Received: by 10.68.106.66 with SMTP id gs2mr9736057pbb.76.1415968075880; Fri, 14 Nov 2014 04:27:55 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tf10si28257803pab.175.2014.11.14.04.27.55 for ; Fri, 14 Nov 2014 04:27:55 -0800 (PST) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161024AbaKNM1p (ORCPT + 1 other); Fri, 14 Nov 2014 07:27:45 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59447 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965335AbaKNM1b (ORCPT ); Fri, 14 Nov 2014 07:27:31 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 552E075066; Fri, 14 Nov 2014 12:27:01 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1XpFxf-0002dN-0g; Fri, 14 Nov 2014 13:26:47 +0100 From: Jiri Slaby To: stable@vger.kernel.org Cc: Felipe Balbi , Jiri Slaby Subject: [patch added to the 3.12 stable tree] usb: gadget: function: acm: make f_acm pass USB20CV Chapter9 Date: Fri, 14 Nov 2014 13:26:33 +0100 Message-Id: <1415968006-9521-93-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1415968006-9521-1-git-send-email-jslaby@suse.cz> References: <1415968006-9521-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Felipe Balbi This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== [ Upstream commit 52ec49a5e56a27c5b6f8217708783eff39f24c16 ] During Halt Endpoint Test, our interrupt endpoint will be disabled, which will clear out ep->desc to NULL. Unless we call config_ep_by_speed() again, we will not be able to enable this endpoint which will make us fail that test. Fixes: f9c56cd (usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable) Signed-off-by: Felipe Balbi Signed-off-by: Jiri Slaby --- drivers/usb/gadget/f_acm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index ab1065afbbd0..3384486c2884 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c @@ -430,11 +430,12 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt) if (acm->notify->driver_data) { VDBG(cdev, "reset acm control interface %d\n", intf); usb_ep_disable(acm->notify); - } else { - VDBG(cdev, "init acm ctrl interface %d\n", intf); + } + + if (!acm->notify->desc) if (config_ep_by_speed(cdev->gadget, f, acm->notify)) return -EINVAL; - } + usb_ep_enable(acm->notify); acm->notify->driver_data = acm;