public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vitaly Kuzmichev <vkuzmichev@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init
Date: Mon, 29 Nov 2010 17:06:10 +0300	[thread overview]
Message-ID: <4CF3B352.20503@mvista.com> (raw)
In-Reply-To: <4CF3B100.3080700@mvista.com>

Vitaly Kuzmichev wrote:
> Hi Lei,
> 
> Lei Wen wrote:
>> Hi Vitaly,
>> [...]
>>>> +     if (usb_gadget_register_driver(&eth_driver) < 0)
>>>> +             goto fail;
>>>
>>> You probably need then at least to remove usb_gadget_register_driver
>>> call from usb_eth_initialize. And add usb_gadget_unregister_driver in
>>> usb_eth_halt.
>>
>> I am afraid that remove usb_gadget_register_driver call from usb_eth_initialize
>> is not possible. For tftp as example, it would call eth_halt before
>> the eth_init.
>> If we do the remove behavior, the gadget still not valid yet in the
>> first eth_halt call
>> which would cause the uboot becomes halt.
> 
> The gadget driver handles this properly. Right now it just does
> usb_gadget_disconnect which has no effect when no gadget was requested
> from the UDC driver yet.

I was wrong...
usb_gadget_disconnect does not care about NULL pointer passed. :/

Best regards,
Vitaly.

  reply	other threads:[~2010-11-29 14:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26  3:21 [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init Lei Wen
2010-11-26 18:23 ` Vitaly Kuzmichev
2010-11-27 14:21   ` Lei Wen
2010-11-29 13:56     ` Vitaly Kuzmichev
2010-11-29 14:06       ` Vitaly Kuzmichev [this message]
2010-11-30  2:04       ` Lei Wen
2010-11-30 15:13         ` Vitaly Kuzmichev
2010-11-30 15:55           ` Lei Wen
2010-11-30 16:41             ` Vitaly Kuzmichev
2010-12-01 15:32               ` Lei Wen
2010-12-01 15:43                 ` Lei Wen
2010-12-02 16:34                   ` Vitaly Kuzmichev
2010-12-03  2:35                     ` Lei Wen
2010-12-09 18:53                   ` Remy Bohmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF3B352.20503@mvista.com \
    --to=vkuzmichev@mvista.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox