All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot]  dfu download issue with ci_udc
@ 2014-07-23 17:24 S Durga Prasad Paladugu
  2014-07-23 20:46 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: S Durga Prasad Paladugu @ 2014-07-23 17:24 UTC (permalink / raw)
  To: u-boot

Hi,

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
dfu utilities sent the zpl packet but at the device side the dfu_write is
not getting invoked for zero packet length and hence causing the data not
to be copied to actual interface(ram/mmc/nand). I pasted here the debug log
for the zpl for reference.


*handle setup CLEAR_FEATURE, 21, 1 index 0 value 3 length 0*
*handle_setup: Set ep0 to OUT for Data Stage*
*handle_setup: 0 length: flip ep0 dir for Status Stage*
*flip_ep0_direction: Flipping ep0 to IN*
*non-core control req21.01 v0003 i0000 l0*
*w_value: 0x3 len: 0x0*
*req_type: 0x20 ctrl->bRequest: 0x1 f_dfu->dfu_state: 0x5*
*ept0 in pre-queue req 3f5284a8, buffer 3f528580*
*ept0 in queue len 0, req 3f5284a8, buffer 3f528580*
*ept0 in req 3f5284a8, complete 0*


 My question here is does any one has tested the dfu download using ci_udc
and what could be reason for this behavior?

Regards,
DP

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] dfu download issue with ci_udc
  2014-07-23 17:24 [U-Boot] dfu download issue with ci_udc S Durga Prasad Paladugu
@ 2014-07-23 20:46 ` Wolfgang Denk
  2014-07-24  4:22   ` S Durga Prasad Paladugu
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-07-23 20:46 UTC (permalink / raw)
  To: u-boot

Dear S Durga Prasad Paladugu,

In message <CAAhU36hRQ_AgOR6bodRz-8pcLb2hkVW-ztrKVX48yFkcEWS=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 at denx.de
A day without sunshine is like night.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] dfu download issue with ci_udc
  2014-07-23 20:46 ` Wolfgang Denk
@ 2014-07-24  4:22   ` S Durga Prasad Paladugu
  2014-07-24  6:58     ` S Durga Prasad Paladugu
  0 siblings, 1 reply; 4+ messages in thread
From: S Durga Prasad Paladugu @ 2014-07-24  4:22 UTC (permalink / raw)
  To: u-boot

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 <wd@denx.de> wrote:

> Dear S Durga Prasad Paladugu,
>
> In message <CAAhU36hRQ_AgOR6bodRz-8pcLb2hkVW-ztrKVX48yFkcEWS=
> Hw at 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 at denx.de
> A day without sunshine is like night.
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] dfu download issue with ci_udc
  2014-07-24  4:22   ` S Durga Prasad Paladugu
@ 2014-07-24  6:58     ` S Durga Prasad Paladugu
  0 siblings, 0 replies; 4+ messages in thread
From: S Durga Prasad Paladugu @ 2014-07-24  6:58 UTC (permalink / raw)
  To: u-boot

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.

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;
        }

        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 <wd@denx.de> wrote:
>
>> Dear S Durga Prasad Paladugu,
>>
>> In message <CAAhU36hRQ_AgOR6bodRz-8pcLb2hkVW-ztrKVX48yFkcEWS=
>> Hw at 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 at denx.de
>> A day without sunshine is like night.
>>
>
>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-24  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23 17:24 [U-Boot] dfu download issue with ci_udc S Durga Prasad Paladugu
2014-07-23 20:46 ` Wolfgang Denk
2014-07-24  4:22   ` S Durga Prasad Paladugu
2014-07-24  6:58     ` S Durga Prasad Paladugu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.