From patchwork Mon Nov 10 14:56:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 40493 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0E48E203C0 for ; Mon, 10 Nov 2014 14:56:23 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id ex7sf4120630wid.4 for ; Mon, 10 Nov 2014 06:56:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=K9tLEYGhRedfuesGVfCLVBVvRbPycyNzhxXmn6RDmDI=; b=FYmmeWbjLeLy4ydSTKCbw1TJ58vy6H17xk+D2dv5soJ9a8wsSD7C8a5VSuQ6Nu1LAE dw2OVH49ogo9uZRpIuO1bM68nxFV9Gi/i6LSLH2W0PuQxcWBT6pXwxm7bH+fLZastOgJ Pz3N8D45RPNTytZelXucMl0F1iawWAfUcEStLrh2L0ddoEUmULKJicN0iU1J5KyGHDnU Gnr8ljy3OvgVOfZaMzpJbICyUoA5xHB4QyVo22trD1LdkPT+Dt33/vcJL72rcFKaJYb4 Nl9bNm5QSp57njeTH4vCAIA//klt3UefReEzH9GQsar/fTBV7+fBzydEfsFj3aHpAbfv HVRQ== X-Gm-Message-State: ALoCoQn0taZtFlyrOxf6bXE7YFslZjKLYT8NYUghaAJle4TXpitgZWf2n4N6MXud8ytO9xPBaJvs X-Received: by 10.152.37.37 with SMTP id v5mr37983laj.9.1415631378106; Mon, 10 Nov 2014 06:56:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.5.43 with SMTP id cj11ls446379lad.85.gmail; Mon, 10 Nov 2014 06:56:17 -0800 (PST) X-Received: by 10.152.22.135 with SMTP id d7mr29705353laf.46.1415631377734; Mon, 10 Nov 2014 06:56:17 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id wr5si27478564lac.11.2014.11.10.06.56.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 06:56:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id gq15so7879189lab.29 for ; Mon, 10 Nov 2014 06:56:17 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr3068440lbr.74.1415631377603; Mon, 10 Nov 2014 06:56:17 -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 ew9csp101017lbc; Mon, 10 Nov 2014 06:56:16 -0800 (PST) X-Received: by 10.70.128.203 with SMTP id nq11mr32362568pdb.88.1415631375916; Mon, 10 Nov 2014 06:56:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qu9si12580267pbc.4.2014.11.10.06.56.15 for ; Mon, 10 Nov 2014 06:56:15 -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 S1752728AbaKJO4O (ORCPT + 1 other); Mon, 10 Nov 2014 09:56:14 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:50683 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752708AbaKJO4O (ORCPT ); Mon, 10 Nov 2014 09:56:14 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sAAEuD3I015164; Mon, 10 Nov 2014 08:56:13 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAAEuDbb032029; Mon, 10 Nov 2014 08:56:13 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 10 Nov 2014 08:56:13 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAAEuCuX002353; Mon, 10 Nov 2014 08:56:13 -0600 From: Felipe Balbi To: Greg KH CC: , Felipe Balbi Subject: [PATCH backport] usb: gadget: function: acm: make f_acm pass USB20CV Chapter9 Date: Mon, 10 Nov 2014 08:56:40 -0600 Message-ID: <1415631400-23406-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <14155963131050@kroah.com> References: <14155963131050@kroah.com> MIME-Version: 1.0 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: balbi@ti.com 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.42 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: , [ 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) Cc: # v3.4+ Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_acm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c index ab1065a..3384486 100644 --- a/drivers/usb/gadget/function/f_acm.c +++ b/drivers/usb/gadget/function/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;