From patchwork Mon Aug 18 14:28:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 35522 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1442320676 for ; Mon, 18 Aug 2014 15:11:38 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf42702411pde.11 for ; Mon, 18 Aug 2014 08:11:32 -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:date:message-id:in-reply-to :references:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=loPVZolw6nKCBmsEa3F9q0cKFYOOS5e0qYLFxCGMuE4=; b=g0dQ/S1FpEj2XAtHG22SxZFat9m755ncvyZBmeBQJgUT0A6aXgu+tqSzavnpbR+4R4 A/ZsGF5MFgZjoQeKse2RHpVHeHH8ysV/oxGmUZPoHMJMRYEySO81fWZDbCZZqSaywxFR HYu0jvRBOyuN2aRUNK5m86oEf0E7KbBcFjGEUd7IB4lUA6DLAaC14RNiR2Fx9p1DayXx +Hyl9U1Deo6dBSjFzAp0Sk3V2F7/vhKDw7DDDEsrsSbnPJjfYygCQ8KiozCOK4d0Rui6 cn/JxWAn6ZSLoB5qR2uxo20KBNU6ifyPqhh1xy7JhH7sjKggB5pzCY/SM0QFTpOgMzBJ GNgw== X-Gm-Message-State: ALoCoQkyAPt20Rd7+PoSd3oq8Y8Ahua4CincLrpvOwrfTYkjxgrBT9+Bn5gDiy8aHJ+Dn9kKQjU/ X-Received: by 10.66.161.7 with SMTP id xo7mr18906226pab.14.1408374689997; Mon, 18 Aug 2014 08:11:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.102 with SMTP id a93ls2337369qge.15.gmail; Mon, 18 Aug 2014 08:11:29 -0700 (PDT) X-Received: by 10.52.69.172 with SMTP id f12mr3054064vdu.9.1408374689836; Mon, 18 Aug 2014 08:11:29 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id km11si5577668veb.78.2014.08.18.08.11.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Aug 2014 08:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id id10so5836753vcb.21 for ; Mon, 18 Aug 2014 08:11:29 -0700 (PDT) X-Received: by 10.52.94.108 with SMTP id db12mr2802880vdb.8.1408374689765; Mon, 18 Aug 2014 08:11:29 -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.221.37.5 with SMTP id tc5csp160428vcb; Mon, 18 Aug 2014 08:11:29 -0700 (PDT) X-Received: by 10.194.173.234 with SMTP id bn10mr43259123wjc.81.1408374688736; Mon, 18 Aug 2014 08:11:28 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id s6si1720995wiy.36.2014.08.18.08.11.28 for ; Mon, 18 Aug 2014 08:11:28 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 691134B5F1; Mon, 18 Aug 2014 17:09:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9qmTmWpvzbgE; Mon, 18 Aug 2014 17:09:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FAF84B629; Mon, 18 Aug 2014 17:08:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 319834A04A for ; Mon, 18 Aug 2014 16:29:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JKu-yBtaV+Dp for ; Mon, 18 Aug 2014 16:29:21 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 0020D4A053 for ; Mon, 18 Aug 2014 16:28:59 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7IESwuJ004501 for ; Mon, 18 Aug 2014 09:28:58 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7IESwE3006459 for ; Mon, 18 Aug 2014 09:28:58 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Mon, 18 Aug 2014 09:28:58 -0500 Received: from a0393678lt.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7IESbM8003614; Mon, 18 Aug 2014 09:28:56 -0500 From: Kishon Vijay Abraham I To: , , , , , , Date: Mon, 18 Aug 2014 19:58:29 +0530 Message-ID: <1408372115-4570-8-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408372115-4570-1-git-send-email-kishon@ti.com> References: <1408372115-4570-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 18 Aug 2014 17:07:53 +0200 Subject: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kishon@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.220.176 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 Explicity set the max packet size in the device descriptor to 0x40 as specified in the device class specification for device firmware upgrade. Also changed debug to printf to explicitly notify the user if the device has been enumerated. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/gadget/composite.c | 3 +-- drivers/usb/gadget/g_dnl.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 7bd2562..60ca9a5 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -331,7 +331,7 @@ static int set_config(struct usb_composite_dev *cdev, } else result = 0; - debug("%s: %s speed config #%d: %s\n", __func__, + printf("%s: %s speed config #%d: %s\n", __func__, ({ char *speed; switch (gadget->speed) { case USB_SPEED_LOW: @@ -987,7 +987,6 @@ static int composite_bind(struct usb_gadget *gadget) memcpy(&cdev->desc, composite->dev, sizeof(struct usb_device_descriptor)); - cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; debug("%s: ready\n", composite->name); return 0; diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 25611ac..8128b86 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -59,6 +59,7 @@ static struct usb_device_descriptor device_desc = { .bcdUSB = __constant_cpu_to_le16(0x0200), .bDeviceClass = USB_CLASS_COMM, .bDeviceSubClass = 0x02, /*0x02:CDC-modem , 0x00:CDC-serial*/ + .bMaxPacketSize0 = 0x40, .idVendor = __constant_cpu_to_le16(CONFIG_G_DNL_VENDOR_NUM), .idProduct = __constant_cpu_to_le16(CONFIG_G_DNL_PRODUCT_NUM),