From patchwork Fri Oct 17 17:09:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38900 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 518DE202DB for ; Fri, 17 Oct 2014 17:10:31 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf792963eek.5 for ; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) 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=IyUKgQute+7yzl8CPRzwE5JUr1tjcCk52TanTKwdWlc=; b=f7zqYf45qASqftQKhqBrlIOTNO1VzD3ZFk6k4ZGjJN6yVn1DHxavnwEDCqRfeJVZQy 1u6R8b5HDRsA8VprnYdH0azCq+yDWV7b0dAIFye4+1OBL0oc7j8pgfeXMTXS/fQ0hGIs 9NUEAoaZWtnyZNs1uV3aOcDz+wZIJI6LuhYvLnbrYAWpqXucPt4jNwQaR99BZ8dU9D1D myiUKtRUhZQRGN+NV6EfbzDeDxFSdR/NFjRxyc8DfHGliqiH6HOw4nUAo60AldanaPZT Qc3WR4A39nSO9c+fN1DlpLoEpJbnRC2Kx065QGpK6eui3Dvwelp5Ug1H/vw0UDd1hx57 6rQw== X-Gm-Message-State: ALoCoQkzjvqciZgJV8U8Mjr63cDLgdASzLSY6+BGMaDCqukuCkXTcEW2LaEH+yEFgT/bp7Pn1beo X-Received: by 10.112.62.226 with SMTP id b2mr1601228lbs.0.1413565830415; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.230 with SMTP id kt6ls262584lac.36.gmail; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) X-Received: by 10.153.5.33 with SMTP id cj1mr10344441lad.36.1413565830267; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id b2si2931710lbm.104.2014.10.17.10.10.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:10:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id z12so1046590lbi.16 for ; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) X-Received: by 10.152.6.228 with SMTP id e4mr10111701laa.71.1413565830079; Fri, 17 Oct 2014 10:10:30 -0700 (PDT) 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.84.229 with SMTP id c5csp266689lbz; Fri, 17 Oct 2014 10:10:28 -0700 (PDT) X-Received: by 10.66.252.34 with SMTP id zp2mr10180059pac.64.1413565828198; Fri, 17 Oct 2014 10:10:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eo4si1682075pac.63.2014.10.17.10.10.27 for ; Fri, 17 Oct 2014 10:10:28 -0700 (PDT) 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 S1753503AbaJQRK0 (ORCPT + 1 other); Fri, 17 Oct 2014 13:10:26 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:43996 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbaJQRKZ (ORCPT ); Fri, 17 Oct 2014 13:10:25 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHAOjX007458; Fri, 17 Oct 2014 12:10:24 -0500 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 s9HHAOBh027772; Fri, 17 Oct 2014 12:10:24 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:10:24 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHANMs022665; Fri, 17 Oct 2014 12:10:24 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi , Subject: [PATCH 09/28] usb: gadget: function: acm: make f_acm pass USB20CV Chapter9 Date: Fri, 17 Oct 2014 12:09:45 -0500 Message-ID: <1413565804-13061-10-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413565804-13061-1-git-send-email-balbi@ti.com> References: <1413565804-13061-1-git-send-email-balbi@ti.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.217.171 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: , 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c index 6da4685..aad8165 100644 --- a/drivers/usb/gadget/function/f_acm.c +++ b/drivers/usb/gadget/function/f_acm.c @@ -433,12 +433,12 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt) dev_vdbg(&cdev->gadget->dev, "reset acm control interface %d\n", intf); usb_ep_disable(acm->notify); - } else { - dev_vdbg(&cdev->gadget->dev, - "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;