Re: [U-Boot] USB-CDC with musb controller

2010-08-11 Thread Vitaly Kuzmichev
Hi Remy, I also have some fixes for ether.c. How should I send them for review? Through this mailing list or make 'git push' into private branch to u-boot-usb.git repo? On 08/11/2010 02:40 PM, Stefano Babic wrote: > Remy Bohmer wrote: >> Hi Stefano, >> > > Hi Remy, > >> Indeed, this seems to be

Re: [U-Boot] [PATCH] USB-CDC: wrong ep status used

2010-08-12 Thread Vitaly Kuzmichev
Hi Stefano, On 08/12/2010 01:41 AM, Stefano Babic wrote: > #if defined(DEV_CONFIG_CDC) > if (dev->status_ep) { > - dev->stat_req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); > - dev->stat_req->buf = status_req; > + dev->stat_req = usb_ep_alloc_request

[U-Boot] [PATCH 2/8] USB-CDC: Add lost 'qmult' definition

2010-08-12 Thread Vitaly Kuzmichev
Add lost 'qmult' definition for High Speed devices and make it configurable through CONFIG_USB_ETH_QMULT. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/

[U-Boot] [PATCH 1/8] USB-CDC: Restuct USB gadget Makefile

2010-08-12 Thread Vitaly Kuzmichev
Prohibit simultaneous usage of both old and new gadget stacks and allow UDC drivers to be dependent on CONFIG_USB_ETHER. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/Makefile |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/Makefile b

[U-Boot] [PATCH 4/8] USB-CDC: Correct freeing usb requests

2010-08-12 Thread Vitaly Kuzmichev
Fix in_ep and out_ep confusion (rx_req was allocated from out_ep, not from in_ep) and add lost dev->req freeing. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/driv

[U-Boot] [PATCH 3/8] USB-CDC: Linux-like debug printout

2010-08-12 Thread Vitaly Kuzmichev
Take debug printout macros back from linux-2.6.27 and make them more useful and more compatible. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 65 +++- 1 files changed, 34 insertions(+), 31 deletions(-) diff --git a/drivers/usb

[U-Boot] [PATCH 5/8] USB-CDC: Replace 'strcpy' by 'strlcpy'

2010-08-12 Thread Vitaly Kuzmichev
Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c in

[U-Boot] [PATCH 0/8] USB: gadget: fix porting bugs

2010-08-12 Thread Vitaly Kuzmichev
' 6) Fix possible oops on stat_req->buf initialization 7) 2 updates backported from linux-2.6.git David Brownell (1): USB: gadget: ethernet error path potential oops fix Julia Lawall (1): USB: gadget: change simple_strtol to simple_strtoul Vitaly Kuzmichev (6): USB-CDC: Restuct USB ga

[U-Boot] [PATCH 7/8] USB: gadget: ethernet error path potential oops fix

2010-08-12 Thread Vitaly Kuzmichev
: Greg Kroah-Hartman (cherry picked from commit e7b13ec9235b9fded90f826ceeb8c34548631351) Conflicts: drivers/usb/gadget/ether.c Cause: "else" block was removed while porting. Removing this part of the patch. Signed-off-by: Vitaly Kuzmichev --- dri

[U-Boot] [PATCH 6/8] USB-CDC: Correct stat_req initialization

2010-08-12 Thread Vitaly Kuzmichev
Fix possible oops on stat_req->buf initialization and fix ep0 and status_ep confusion (last one is just intended for stat_req keeping). Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/

[U-Boot] [PATCH 8/8] USB: gadget: change simple_strtol to simple_strtoul

2010-08-12 Thread Vitaly Kuzmichev
(...) @@ position p != r2.p; type T; T e; @@ e = - simple_str...@p + simple_strtoul (...) // Signed-off-by: Julia Lawall Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman (cherry picked from commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c) Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget

Re: [U-Boot] [PATCH 3/8] USB-CDC: Linux-like debug printout

2010-08-13 Thread Vitaly Kuzmichev
warn dev_err >> -#define DEBUG dev_err >> -#define VDEBUG DEBUG >> +#define WARN INFO >> +#define ERROR INFO >> +#define DEBUG INFO > > This switches DEBUG logging on by default. This is not wanted. > Can you please change that? &g

Re: [U-Boot] [PATCH 0/8] USB: gadget: fix porting bugs

2010-08-13 Thread Vitaly Kuzmichev
Hi Remy, On 08/12/2010 10:37 PM, Remy Bohmer wrote: > Hi, > >> 2) Add lost 'qmult' definition for High Speed devices > > Stefano, which version of this fix do you prefer? It seems there are > now 2 patches fixing the same thing... > If I were you I would take my patch for 2 reasons: 1) more ac

Re: [U-Boot] [PATCH] USB-CDC: wrong ep status used

2010-08-13 Thread Vitaly Kuzmichev
Hi Sergei, On 08/12/2010 09:05 PM, Sergei Shtylyov wrote: > Hello. > > Stefano Babic wrote: > >>> We get oops here! > >> Agree, and the issue is not related to this patch, I missed to correct >> it, thanks. If no one complains, I will send a single patch to fix both >> problems (wrong ep status

Re: [U-Boot] [PATCH 3/8] USB-CDC: Linux-like debug printout

2010-08-13 Thread Vitaly Kuzmichev
Hi Sergei, Sergei Shtylyov wrote: >> -printf ("enable %s --> %d\n", >> +DEBUG(dev, "enable %s --> %d\n", > > Well, I think the coding style shouldbe consistent -- you either leave > the space before ( or remove it. And as U-Boot seems to follow the Linux > coding style n

[U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros

2010-08-13 Thread Vitaly Kuzmichev
Replace Linux-like debug printout macros by native ones. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 99 --- 1 files changed, 46 insertions(+), 53 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c

[U-Boot] [PATCH v2 4/8] USB-CDC: Correct freeing usb requests

2010-08-13 Thread Vitaly Kuzmichev
Fix in_ep and out_ep confusion (rx_req was allocated from out_ep, not from in_ep) and add lost dev->req freeing. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/driv

[U-Boot] [PATCH v2 5/8] USB-CDC: Replace 'strcpy' by 'strlcpy'

2010-08-13 Thread Vitaly Kuzmichev
Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c in

[U-Boot] [PATCH v2 6/8] USB-CDC: Correct stat_req initialization

2010-08-13 Thread Vitaly Kuzmichev
Fix possible oops on stat_req->buf initialization and fix ep0 and status_ep confusion (last one is just intended for stat_req keeping). Signed-off-by: Vitaly Kuzmichev Signed-off-by: Stefano Babic --- drivers/usb/gadget/ether.c |7 +++ 1 files changed, 3 insertions(+), 4 deleti

[U-Boot] [PATCH v2 7/8] USB-CDC: ethernet error path potential oops fix

2010-08-13 Thread Vitaly Kuzmichev
sses in a null argument, however "usb_ep_disable" cannot handle that: (from include/linux/usb/gadget.h) 191 static inline int 192 usb_ep_disable (struct usb_ep *ep) 193 { 194 return ep->ops->disable (ep); 195 } -- Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/et

[U-Boot] [PATCH v2 8/8] USB-CDC: change simple_strtol to simple_strtoul

2010-08-13 Thread Vitaly Kuzmichev
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c (done by Julia Lawall ) from linux-2.6.git. Since num is unsigned, it would seem better to use simple_strtoul that simple_strtol. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/epautoconf.c |2 +- 1 files changed

Re: [U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros

2010-08-13 Thread Vitaly Kuzmichev
Hi, Rogan Dawes wrote: >> +#define DEBUG >> +#undef DEBUG >> + > > Eh? Such thing is used to let someone know that this driver supports debug output through native U-Boot macros. So one need to comment #undef to compile ether.c with debug messages. There are at least 67 files in U-Boot that use

Re: [U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros

2010-08-13 Thread Vitaly Kuzmichev
Vitaly Kuzmichev wrote: > There are at least 67 files in U-Boot that use such construction. I was wrong. I calculated for "linux/drivers" directory. Actually 13 for u-boot. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.de

Re: [U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros

2010-08-13 Thread Vitaly Kuzmichev
Hi Stefano, Stefano Babic wrote: > If you want to remember how to set the debug output, it should be enough > to add a comments with "to enable the debugging, define DEBUG before > common.h" or something like that. I vote to remove only the two lines... Would not it be better to make one of the f

Re: [U-Boot] [PATCH] USB-CDC: Fix coding style issues

2010-09-11 Thread Vitaly Kuzmichev
s, we should. In linux this comment was moved into previous: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=41dceed51f0e6105ca2bf45c3835a7cd9eaa077b#patch3 I'm going to fix this and add more details in the header. Wit

Re: [U-Boot] [PATCH v3] USB-CDC: Fix coding style issues

2010-09-13 Thread Vitaly Kuzmichev
Hello Remy, vkuzmic...@mvista.com wrote: [...] > - /* use PKTSIZE (or aligned... from u-boot) and set > + /* > + * use PKTSIZE (or aligned... from u-boot) and set >* wMaxSegmentSize accordingly*/ Could you please fix the last line before commit? I missed this and would not l

Re: [U-Boot] Pull request: u-boot-usb

2010-09-20 Thread Vitaly Kuzmichev
Hi Remy, Remy Bohmer wrote: > The following changes since commit ff377b1c0e891569b6da13629090aad7c38175e0: >Wolfgang Denk (1): > canmb board: Fix compiler warnings > > are available in the git repository at: > >git://git.denx.de/u-boot-usb.git next > Just FYI There 2 bugfixes I

[U-Boot] [PATCH 0/2] USB-CDC: Minor usability fixes

2010-12-28 Thread Vitaly Kuzmichev
Here are two patches to make USB Ethernet gadget driver more usable. Vitaly Kuzmichev (2): USB-CDC: Do not rename netdev after its registration USB-CDC: Move MAC addresses setting into usb_eth_init drivers/usb/gadget/ether.c | 67 ++- 1 files

[U-Boot] [PATCH 1/2] USB-CDC: Do not rename netdev after its registration

2010-12-28 Thread Vitaly Kuzmichev
Calling eth_bind at usb_eth_init time causes renaming of the network device from 'usb_ether' to 'usb0'. Fixing this to keep the first name. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff

[U-Boot] [PATCH 2/2] USB-CDC: Move MAC addresses setting into usb_eth_init

2010-12-28 Thread Vitaly Kuzmichev
This allows to change device and host MAC addresses without performing reset. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 62 ++- 1 files changed, 26 insertions(+), 36 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers

Re: [U-Boot] usage of DMA

2011-01-18 Thread Vitaly Kuzmichev
Hi Marcel, Marcel wrote: > > I have already reduced the code quite far. Basically all dma related stuff is > gone. According to your first message in this thread I suppose that you are using atmel_usba_udc driver. Am I right? Looks like it's able to use PIO mode transfer (I mean linux driver

Re: [U-Boot] usage of DMA

2011-01-18 Thread Vitaly Kuzmichev
Hi Marcel, In addition, did you enable CONFIG_USB_GADGET_DUALSPEED option in your u-boot config file? With best regards, Vitaly. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] NetRxPackets

2011-01-19 Thread Vitaly Kuzmichev
Hi Marcel, Marcel wrote: >> Not sure that branch is anything up to date > > hmmm. What branch is best to work on for this code ? If someone sends USB-CDC patches they usually are applied into master branch of u-boot-usb.git repository: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-us

Re: [U-Boot] usage of DMA

2011-01-19 Thread Vitaly Kuzmichev
Hi Marcel, Marcel wrote: >> Could you enable debug output for ether.c and for your UDC driver and >> show the results? > > I enabled a lot of extra debugging messages so this is not very short. > The output attached below is including start of macb but USB device behave > the > same when I don'

Re: [U-Boot] BeagleBoard-xM: Ethernet over USB supported ?

2011-02-07 Thread Vitaly Kuzmichev
Hi Olivier, Olivier Martin wrote: > Hi, > I am trying to enable boot from tftp for a BeagleBoard-xM. > The BeagleBoard-xM has an integrated Ethernet port over USB. > > I have tried to enable it by adding these following lines in > include/configs/omap3_beagle.h: > #define CONFIG_USB_ETHER

Re: [U-Boot] [PATCH v1 (WIP) 12/16] [Timer]Replace get_timer() usage in drivers/

2011-06-28 Thread Vitaly Kuzmichev
Hello Graeme, Graeme Russ wrote: [...] > diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c > index 1dd6f26..8282a23 100644 > --- a/drivers/fpga/spartan3.c > +++ b/drivers/fpga/spartan3.c [...] > @@ -233,7 +235,7 @@ static int Spartan3_sp_load (Xilinx_desc * desc, void > *buf, size_t

Re: [U-Boot] [PATCH v2 1/5] usb:gadget:s5p USB Device Controller (UDC) implementation

2011-07-13 Thread Vitaly Kuzmichev
Hi Lukasz, On 07/13/2011 06:29 PM, Lukasz Majewski wrote: > This commit provides UDC driver support for Samsung's SoC > family of processors. > [...] > diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile > index 7d5b504..6717e4f 100644 > --- a/drivers/usb/gadget/Makefile > +++

[U-Boot] [PATCH 0/5] USB RNDIS gadget support

2011-02-11 Thread Vitaly Kuzmichev
er lines, but I'm glad to discuss necessity and ways to fix them. Actually this protocol should not require to make any changes in existing USB device controller drivers. And sorry for the huge RNDIS patch. Vitaly Kuzmichev (5): USB-CDC: handle interrupts after dropped pullup USB-CDC

[U-Boot] [PATCH 1/5] USB-CDC: handle interrupt after dropped pullup

2011-02-11 Thread Vitaly Kuzmichev
dropped pullup also may add pending response, this will not bring to any issues due to usb_ep_disable (which clears the queue) called on gadget unregistering. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff

[U-Boot] [PATCH 2/5] USB-CDC: Port struct net_device_stats

2011-02-11 Thread Vitaly Kuzmichev
Port struct net_device_stats and statistics collecting needed for RNDIS protocol. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 41 +++ include/linux/netdevice.h | 65 2 files changed, 106 insertions

[U-Boot] [PATCH 3/5] USB-CDC: Move struct declaration before its use

2011-02-11 Thread Vitaly Kuzmichev
Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 70 ++- 1 files changed, 36 insertions(+), 34 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 8aa6240..c070f63 100644 --- a/drivers/usb/gadget

[U-Boot] [PATCH 5/5] USB-RNDIS: Send RNDIS state on disconnecting

2011-02-11 Thread Vitaly Kuzmichev
Add waiting for receiving Ethernet gadget state on the Windows host side before dropping pullup, but keep it for debug. Signed-off-by: Vitaly Kuzmichev --- drivers/usb/gadget/ether.c | 23 +++ drivers/usb/gadget/rndis.c |5 + drivers/usb/gadget/rndis.h |8

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-11-26 Thread Vitaly Kuzmichev
Hi Lei, Lei Wen wrote: > Since the ether may not be the only one usb gadget would be used > in the uboot, it is neccessary to do the register each time the > eth begin to work to make usb gadget driver less confussed when > we want to use two different usb gadget at the same time. > [...] > @@ -17

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-11-29 Thread Vitaly Kuzmichev
Hi Lei, Lei Wen wrote: > Hi Vitaly, > [...] >>> + if (usb_gadget_register_driver(ð_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. > >

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-11-29 Thread Vitaly Kuzmichev
Vitaly Kuzmichev wrote: > Hi Lei, > > Lei Wen wrote: >> Hi Vitaly, >> [...] >>>> + if (usb_gadget_register_driver(ð_driver) < 0) >>>> + goto fail; >>> >>> You probably need then at least to remove us

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-11-30 Thread Vitaly Kuzmichev
Hi Lei, Lei Wen wrote: > Hi Vitaly, > [...] >> And additional calling of usb_gadget_unregister_driver will at most >> return an error. >> > > For current ether.c state, there is no usb_gadget_unregister_driver in > it. Even it has, we still need > usb_gadget_register_driver call in each eth_init(

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-11-30 Thread Vitaly Kuzmichev
Hi Lei, Lei Wen wrote: > [...] >>> For current ether.c state, there is no usb_gadget_unregister_driver in >>> it. Even it has, we still need >>> usb_gadget_register_driver call in each eth_init(). >> >> Yes, if we do 'unregister' we should do 'register' somewhere before. If >> we do 'register' we

Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-12-02 Thread Vitaly Kuzmichev
Hi Lei, Lei Wen wrote: > Since the ether may not be the only one usb gadget would be used > in the uboot, it is neccessary to do the register each time the > eth begin to work to make usb gadget driver less confussed when > we want to use two different usb gadget at the same time. > > Usb gadget

[U-Boot] [PATCH] ARM1136: Align stack to 8 bytes

2010-06-15 Thread Vitaly Kuzmichev
less than stack pointer during aligning of this address, so the further 'push' into the stack overwrites first 4 bytes of VLA. Signed-off-by: Vitaly Kuzmichev Signed-off-by: George G. Davis --- arch/arm/cpu/arm1136/start.S |1 + 1 files changed, 1 insertions(+), 0 deletions(-) di

Re: [U-Boot] [PATCH] ARM1136: Align stack to 8 bytes

2010-06-15 Thread Vitaly Kuzmichev
iable-length arrays >> allocation when VLA address becomes less than stack pointer during >> aligning of this address, so the further 'push' into the stack >> overwrites first 4 bytes of VLA. >> >> Signed-off-by: Vitaly Kuzmichev >> Signed-off-by: G

[U-Boot] [PATCH v2] ARM: Align stack to 8 bytes

2010-06-15 Thread Vitaly Kuzmichev
less than stack pointer during aligning of this address, so the next 'push' in the stack overwrites first 4 bytes of VLA. Signed-off-by: Vitaly Kuzmichev --- arch/arm/cpu/arm1136/start.S |1 + arch/arm/cpu/arm1176/start.S |1 + arch/arm/cpu/arm720t/start.S |1 +

Re: [U-Boot] [PATCH v2] ARM: Align stack to 8 bytes

2010-06-22 Thread Vitaly Kuzmichev
significant digit and will become 0xYYY0/0xZZZ8 (VLA=SP-4). It will less than SP, so the next 'push' (alias to STMDB) will decrement SP by 4 and will store register at the top of the stack, so this will overwrite first 4 bytes of VLA. On 06/15/2010 10:18 PM, Vitaly Kuzmichev wro

Re: [U-Boot] USB CDC branch

2010-07-13 Thread Vitaly Kuzmichev
FYI I'm doing some work on this branch too. Actually I have ported it to 2010.03, added RNDIS support and made integration into 'usb' command. However these changes aren't tested yet so the work is still under progress. Probably someone knows about any possible issues with CDC/RNDIS support? And a

Re: [U-Boot] USB CDC branch

2010-07-14 Thread Vitaly Kuzmichev
ks for hint. ___ WBR, Vitaly. On 07/13/2010 11:48 PM, Remy Bohmer wrote: > Hi, > > 2010/7/13 Vitaly Kuzmichev : >> FYI I'm doing some work on this branch too. > > Great! > >> Actually I have ported it to 2010.03 > > What do you mean with ported to 2010.0

Re: [U-Boot] USB CDC branch

2010-07-14 Thread Vitaly Kuzmichev
:10 AM, Kyungmin Park wrote: > On Wed, Jul 14, 2010 at 4:48 AM, Remy Bohmer wrote: >> Hi, >> >> 2010/7/13 Vitaly Kuzmichev : >>> FYI I'm doing some work on this branch too. >> >> Great! >> >>> Actually I have ported it to 2010.03 >>