From patchwork Thu Jul 24 06:58:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Durga Prasad Paladugu X-Patchwork-Id: 373159 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 62CD41401EB for ; Thu, 24 Jul 2014 16:59:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D44DAA7731; Thu, 24 Jul 2014 08:58:58 +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 WbYb5D3XAeKt; Thu, 24 Jul 2014 08:58:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 44B2FA771F; Thu, 24 Jul 2014 08:58:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B592A771F for ; Thu, 24 Jul 2014 08:58:51 +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 lWP8hBgPTePm for ; Thu, 24 Jul 2014 08:58:47 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by theia.denx.de (Postfix) with ESMTPS id 8ABB6A771B for ; Thu, 24 Jul 2014 08:58:43 +0200 (CEST) Received: by mail-qg0-f44.google.com with SMTP id e89so2771608qgf.17 for ; Wed, 23 Jul 2014 23:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4Ta3qdglIvSjpe5dYes5/pAWaqd++aTonjMIVjETJvo=; b=I0I1RkfZl7FRE7UlJQln5Xl8w2g590BHbS2OybQAn303GhUP5YxsclBmmwt/8Uzw2P v/t7FZYCfU9gjKDsR/BFqqD313anh6MwgOwm0uewgy13Ie3vwxjR/3mABPBIdWgoVQyf +j07cF90vW2kYZxja6i0uUd4Twl3c5QGYefFjYJ9mILGxQYsNF9fa7UQzTCaTj6H5lNs wSlCDc6Kzfs3pSTZaJ6DYENJ2bQBlOm980FI2LOH1QQzuMZ5cUu1jjVG+oWQzt/gtujC xbSn1zjJz7XSb113RAlOKSaeJGAYIrjVeOb9Y2UVvYTnX0v/nTWKjjwl/hgiDPNqUDjV LhkQ== MIME-Version: 1.0 X-Received: by 10.224.65.134 with SMTP id j6mr11732965qai.90.1406185122498; Wed, 23 Jul 2014 23:58:42 -0700 (PDT) Received: by 10.140.44.37 with HTTP; Wed, 23 Jul 2014 23:58:42 -0700 (PDT) In-Reply-To: References: <20140723204606.C996F380415@gemini.denx.de> Date: Thu, 24 Jul 2014 12:28:42 +0530 Message-ID: From: S Durga Prasad Paladugu To: Wolfgang Denk X-Content-Filtered-By: Mailman/MimeDel 2.1.11 Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] dfu download issue with ci_udc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion 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 Hi, I did the following modification in ci_udc driver for handling the DFU Dwonalod request with zpl and it worked for me and i am not sure whether it would be the real fix for it(that 0x21 is DFU download request with zero packet length), just sent for reference. list_del_init(&ci_req->queue); Regards, DP On Thu, Jul 24, 2014 at 9:52 AM, S Durga Prasad Paladugu < durgaprasad.psdp@gmail.com> wrote: > Hi Wolfgang, > > I am using mainline 2014.1 git version but integrated that with the latest > ci_udc driver changes and trying to test it on zynq board.I integrated the > latest ci_udc as it has fixes related to the dfu. Previously with 2014.1 > its not working at all and timing out at host while trying to download so i > integrated with latest driver then download was sucessfull at host side but > at device side its not copying dfu buf to actual interface(its ram address > in my case).This is because the zpl at the end of the dfu download not > working as expected. > > Regards, > DP > > > On Thu, Jul 24, 2014 at 2:16 AM, Wolfgang Denk wrote: > >> Dear S Durga Prasad Paladugu, >> >> In message > Hw@mail.gmail.com> you wrote: >> > >> > I am trying to download the file from dfu-utilities(version 0.7) and >> using >> > the ci_udc at device side. After all the data was sent from the host, >> the >> ... >> >> What is your exact U-Boot verosion (git commit ID), and which exact >> board are you testing on? >> >> Best regards, >> >> Wolfgang Denk >> >> -- >> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de >> A day without sunshine is like night. >> > > diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 4cd19c3..64a6662 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -581,7 +581,10 @@ static void handle_setup(void) /* 0 length -> no Data Stage. Flip dir for Status Stage */ DBG("%s: 0 length: flip ep0 dir for Status Stage\n", __func__); flip_ep0_direction(); - controller.ep0_data_phase = false; + if (r.bRequestType == 0x21) + controller.ep0_data_phase = true; + else + controller.ep0_data_phase = false; }