From patchwork Fri Oct 17 17:16:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38927 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 76A25202DB for ; Fri, 17 Oct 2014 17:17:56 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id b6sf720360lbj.7 for ; Fri, 17 Oct 2014 10:17:55 -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=DetDIAHHX3gALpYI7u2ytLwjY9K0gMfGJeVikOjYFSE=; b=FOzY6SLUGtyfst8iVoGaJSP9VqjqFKx4lan+KHNfiysLKqSJ99Nqb7Ty52i7zD/hTe i1cCwpdOyXov5CNrpByoEqfDqKDDQvIwWnuMrRQGNVw5IhENNgxexkiOAYHKd4XzOLmh FkQzA6Kb+c9IiCkQXLtvGu/e3gk3bwziIdKaGH6CyEEQ8jWhfYjLdqnkrZjjYZOIYnSz 337LQnfYsW7Dj6mSCaZilM7JjUDrxdisSZpgGBHpDKiLH1vpblH9J8cwhz62JW361JLi uiRjO+B8qNXFJuFEpShs8jvgrAxHl4ljFyMWOiTeLBllpzS4ldrPv2kmCZHKL+i9BHCK UoZA== X-Gm-Message-State: ALoCoQn+akj5CEb7QvRHeusFcAAx/14O4hTelk75SeoXe4fRsJDVAEqMV1rNROvVDtCmtd9gVbDM X-Received: by 10.152.25.202 with SMTP id e10mr1601239lag.2.1413566275228; Fri, 17 Oct 2014 10:17:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.108 with SMTP id lf12ls246149lac.48.gmail; Fri, 17 Oct 2014 10:17:55 -0700 (PDT) X-Received: by 10.152.27.134 with SMTP id t6mr10154421lag.17.1413566275119; Fri, 17 Oct 2014 10:17:55 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id jl10si2966934lbc.96.2014.10.17.10.17.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:17:55 -0700 (PDT) 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 pn19so1077845lab.28 for ; Fri, 17 Oct 2014 10:17:55 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr10128550lbc.23.1413566274999; Fri, 17 Oct 2014 10:17:54 -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 c5csp268023lbz; Fri, 17 Oct 2014 10:17:54 -0700 (PDT) X-Received: by 10.66.187.234 with SMTP id fv10mr9969793pac.60.1413566273185; Fri, 17 Oct 2014 10:17:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si1686618pdm.75.2014.10.17.10.17.52 for ; Fri, 17 Oct 2014 10:17:53 -0700 (PDT) Received-SPF: none (google.com: linux-usb-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 S1753403AbaJQRRu (ORCPT + 3 others); Fri, 17 Oct 2014 13:17:50 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55937 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbaJQRRk (ORCPT ); Fri, 17 Oct 2014 13:17:40 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHHVI3028980; Fri, 17 Oct 2014 12:17:31 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHVwK029213; Fri, 17 Oct 2014 12:17:31 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:17:32 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHUOb002780; Fri, 17 Oct 2014 12:17:31 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Greg KH , , Paul Zimmerman , , , , , , , Felipe Balbi Subject: [PATCH 06/67] usb: gadget: composite: introduce setup and os_desc pending flags Date: Fri, 17 Oct 2014 12:16:13 -0500 Message-ID: <1413566234-13537-7-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413566234-13537-1-git-send-email-balbi@ti.com> References: <1413566234-13537-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@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.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: , These flags we be set to true whenever their matching request is queued. They will be cleared to false when that request completes. Signed-off-by: Felipe Balbi --- include/linux/usb/composite.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index c330f5e..ed3811c 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -427,6 +427,8 @@ static inline struct usb_composite_driver *to_cdriver( * @b_vendor_code: bMS_VendorCode part of the OS string * @use_os_string: false by default, interested gadgets set it * @os_desc_config: the configuration to be used with OS descriptors + * @setup_pending: true when setup request is queued but not completed + * @os_desc_pending: true when os_desc request is queued but not completed * * One of these devices is allocated and initialized before the * associated device driver's bind() is called. @@ -488,6 +490,9 @@ struct usb_composite_dev { /* protects deactivations and delayed_status counts*/ spinlock_t lock; + + unsigned setup_pending:1; + unsigned os_desc_pending:1; }; extern int usb_string_id(struct usb_composite_dev *c);