From patchwork Mon Apr 8 10:35:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 15967 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 788AA23900 for ; Mon, 8 Apr 2013 10:38:18 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id z12sf8365860yhz.8 for ; Mon, 08 Apr 2013 03:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=BfXLHGxbA9wqsPvyasQhcWPBl7JygOwpgHaHMqffFm8=; b=JWwTvZCXdmCC7VuAwmX9jSr9pn3DragVHdGcwv91kmUnI1JARcSwlEFuvduTXCdfeb FBUrq/hMZI9TIoRviV5NO2QnuZcQpFrbgdK8FYNHxEyI0c5Lv3hyb74kEWZ+TIWTbNNl pg784l3Kv0VmggrtJxW511Vi83rSDtkJmG0sTTv7cl/94wB7zTtm9FeAgcOI681Olozj 95vRe0YTGEvg5mhxGUS6eqh2yrkv1sUWE5RSsi5eDM91FgJmp/uv+uiBE1sZwGt11DM5 JZoMslAbKxextp79Cz1afUhdMeA8rPRx9IV3JNkCHwS2YLvG9jeqk349jnI0H9QBHDZW auJA== X-Received: by 10.224.207.2 with SMTP id fw2mr5612053qab.6.1365417484168; Mon, 08 Apr 2013 03:38:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.4 with SMTP id q4ls3083545qen.62.gmail; Mon, 08 Apr 2013 03:38:04 -0700 (PDT) X-Received: by 10.52.180.195 with SMTP id dq3mr13637112vdc.9.1365417484096; Mon, 08 Apr 2013 03:38:04 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id ex4si18023879vdb.66.2013.04.08.03.38.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Apr 2013 03:38:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id gf11so1853183vcb.4 for ; Mon, 08 Apr 2013 03:38:04 -0700 (PDT) X-Received: by 10.52.93.20 with SMTP id cq20mr13112400vdb.38.1365417483988; Mon, 08 Apr 2013 03:38:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp12563vez; Mon, 8 Apr 2013 03:38:03 -0700 (PDT) X-Received: by 10.66.123.105 with SMTP id lz9mr36296216pab.137.1365417482876; Mon, 08 Apr 2013 03:38:02 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id yx4si29051868pac.73.2013.04.08.03.38.02; Mon, 08 Apr 2013 03:38:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKX00A7PMU51V11@mailout4.samsung.com> for patches@linaro.org; Mon, 08 Apr 2013 19:38:01 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 01.59.20872.80E92615; Mon, 08 Apr 2013 19:38:01 +0900 (KST) X-AuditID: cbfee68d-b7f786d000005188-6f-51629e08e61c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 4B.2E.17838.80E92615; Mon, 08 Apr 2013 19:38:00 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKX008PGMUQGH60@mmp1.samsung.com>; Mon, 08 Apr 2013 19:38:00 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: patches@linaro.org, u-boot-review@google.com, marex@denx.de, sjg@chromium.org, rajeshwari.s@samsung.com, vikas.sajjan@samsung.com, amarendra.xt@samsung.com Subject: [PATCH v2 3/5] usb: Update device class in usb device's descriptor Date: Mon, 08 Apr 2013 16:05:56 +0530 Message-id: <1365417358-31921-4-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1365417358-31921-1-git-send-email-gautam.vivek@samsung.com> References: <1365417358-31921-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeLIzCtJLcpLzFFi42JZI2JSq8s5LynQ4G4ns8WXBZ3sFm/aGhkt phz+wmLRsvYAq8W3LdsYLZa/3shu8XYvUPbms+1MDhwesxsusnjMm3WCxWPBplKPO9f2sHmc vbOD0aNvyyrGALYoLpuU1JzMstQifbsEroxj186xF3SxVax8uZe9gfEDSxcjJ4eEgInE57nd 7BC2mMSFe+vZuhi5OIQEljJK3H00jxmmaMrM40wQiUWMEq3z5rN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jygaLQ4wCHIxKPLySPxIDhVgTy4orcw8xSnAwK4nwis9MChTi TUmsrEotyo8vKs1JLT7EmAx01ERmKdHkfGDU55XEGxqbmJsam1qaWJiYWZImrCTOe6DVOlBI ID2xJDU7NbUgtQhmCxMHp1QDo96EZZfWf/z7SSZlmqu+5L5665SK92ekpKT2cxscjc/Zsz7q 3YsXMqw+4j3C+Y8eqfIzszowMy21PMEtcdIxadeJj2bbl2SIrDxalJS7p2FHfOSmX7X/Td99 ry4Oqtn55Oydi+tW3Dx+lWH//n/h3/+4rD0c6GUxyXfi9+fG0qov/7iV7fzK+0OJpTgj0VCL uag4EQC3myVA8AIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnxqoBzX2I1SmkLzkZ7ScW0rX+BYDokUmgCa3GqslrIXqB6dh1LMi+Uu/frplNvFrQIO8nl X-Original-Sender: gautam.vivek@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Fetch the device class into usb device's dwcriptors, so that the host controller's driver can use this info to differentiate between HUB and DEVICE. Signed-off-by: Amar --- common/usb.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/usb.c b/common/usb.c index 872d62f..fd1cad1 100644 --- a/common/usb.c +++ b/common/usb.c @@ -890,6 +890,11 @@ int usb_new_device(struct usb_device *dev) } dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0; + /* + * Fetch the device class, driver can use this info + * to differentiate between HUB and DEVICE. + */ + dev->descriptor.bDeviceClass = desc->bDeviceClass; /* find the port number we're at */ if (parent) {