From patchwork Tue Nov 18 14:09:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 41039 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C62A624035 for ; Tue, 18 Nov 2014 14:21:12 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf1956982wgh.6 for ; Tue, 18 Nov 2014 06:21:12 -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: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=i/PXmqvdqSMDdnjV2L1wJkkdjhNaZeW7dfL42Xt16qQ=; b=PVSuM3flpu12QhYNuo4ZE5g4sIx3QMnHNt/W6+wax7L4kddf3vx/Umbpmsy8sed0eg W97VnAyMHs2l27KoK69m0QbGz83EeINMxAKoKggGObgq0/l8LiCRwAqKWhZ5QLlLrraq 2rVBIULTQAeq1J0toqVOiCRknxxsAArvfkEA2v8coUmXfB261WFS4DY3gK3PXwam58+0 X4cr62yIhDgeH2cet1IEXNvDqejNPPjiArtE3Y2bWuEyGdKTJAHMqkcS2PzAQuDTQLOK jpi6bFeq/audNVDHMu+EpTGtGiiVHBLpJB8jumVe+OGjwJp/A4M1S5FFBljKIZT0adKo YvYQ== X-Gm-Message-State: ALoCoQk+WXQG9b6FJzcr9E59PEB6DMIB28LHOa3dSWNozwDSgSITc1TkBbryVAt+vJE3m0mYEPC2 X-Received: by 10.152.37.37 with SMTP id v5mr116059laj.9.1416320471992; Tue, 18 Nov 2014 06:21:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.100 with SMTP id it4ls1335664lac.7.gmail; Tue, 18 Nov 2014 06:21:11 -0800 (PST) X-Received: by 10.112.130.132 with SMTP id oe4mr2592083lbb.82.1416320471683; Tue, 18 Nov 2014 06:21:11 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id tl10si55751373lbb.131.2014.11.18.06.21.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 06:21:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gf13so8385071lab.28 for ; Tue, 18 Nov 2014 06:21:11 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr36255410lbo.32.1416320471421; Tue, 18 Nov 2014 06:21:11 -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 ew9csp1335929lbc; Tue, 18 Nov 2014 06:21:10 -0800 (PST) X-Received: by 10.68.111.101 with SMTP id ih5mr37861720pbb.78.1416320469272; Tue, 18 Nov 2014 06:21:09 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yp10si38292692pab.51.2014.11.18.06.21.08 for ; Tue, 18 Nov 2014 06:21:09 -0800 (PST) Received-SPF: none (google.com: linux-kernel-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 S1755874AbaKROVC (ORCPT + 26 others); Tue, 18 Nov 2014 09:21:02 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57177 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932213AbaKROKW (ORCPT ); Tue, 18 Nov 2014 09:10:22 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 691B6AE53; Tue, 18 Nov 2014 14:09:25 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1XqjTA-00027E-VE; Tue, 18 Nov 2014 15:09:24 +0100 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Jiri Slaby Subject: [PATCH 3.12 192/206] usb: gadget: function: acm: make f_acm pass USB20CV Chapter9 Date: Tue, 18 Nov 2014 15:09:07 +0100 Message-Id: <19342b6d5f7a7f0d7c8031e9db0b4f833e946f7a.1416319692.git.jslaby@suse.cz> X-Mailer: git-send-email 2.1.3 In-Reply-To: <28f04bcc068a44c5641c727883947960fb8dcbd5.1416319692.git.jslaby@suse.cz> References: <28f04bcc068a44c5641c727883947960fb8dcbd5.1416319692.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.215.41 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 3.12-stable review patch. If anyone has any objections, please let me 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;