| 8f7aa831 | 28-Dec-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Do not rename netdev after its registration
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.
Sign
USB-CDC: Do not rename netdev after its registration
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 <vkuzmichev@mvista.com>
show more ...
|
| 98fae970 | 22-Sep-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Prevent rx_req being enqueued twice
After gadget reinitializaton (after tftp has been done once) packet_received may become equal to 1 due to nuking OUT_EP while disabling it in eth_reset_c
USB-CDC: Prevent rx_req being enqueued twice
After gadget reinitializaton (after tftp has been done once) packet_received may become equal to 1 due to nuking OUT_EP while disabling it in eth_reset_config.
rx_submit called from usb_eth_init queues rx_req first time. But the first call of usb_eth_recv from NetLoop queues rx_req again due to packet_received = 1.
The following flow shows the path of functions calls when this happens:
net/net.c:NetLoop | +-net/eth.c:eth_init | ether.c:usb_eth_init | | | +-udc_driver:usb_gadget_handle_interrupts | | udc_driver:... | | ether.c:eth_setup | | ether.c:eth_set_config | | ether.c:eth_reset_config | | udc_driver:usb_ep_disable | | udc_driver:nuke | | ether.c:rx_complete | | ether.c: packet_received = 1; | | | +-ether.c:rx_submit | udc_driver:usb_ep_queue --- The first time when rx_req is queued | +-net/eth.c:eth_rx ether.c:usb_eth_recv | +-udc_driver:usb_gadget_handle_interrupts | udc_driver:... --- no interrupts, returning +-ether.c: if (packet_received) { ... ether.c:rx_submit udc_driver:usb_ep_queue --- The second time!
Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
show more ...
|
| 6142e0ae | 13-Sep-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Fix coding style issues
Fixes most of checkpatch warnings and errors in USB gadget stack.
The most frequently encountered problems are: 1) "(foo*)", "foo * bar", "foo* bar" 2) C99 // comme
USB-CDC: Fix coding style issues
Fixes most of checkpatch warnings and errors in USB gadget stack.
The most frequently encountered problems are: 1) "(foo*)", "foo * bar", "foo* bar" 2) C99 // comments 3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '(' 4) Spaces before '[' 5) Spaces between function names and '(' 6) Block braces in wrong places 7) Spaces before tabs 8) Macros with complex values not enclosed in parenthesis 9) Multiline comments start just after /*
Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
show more ...
|
| a170f2c7 | 15-Aug-2010 |
Stefano Babic <sbabic@denx.de> |
USB-CDC: called handle_interrupts inside usb_eth_send
The patch removes an endless loop in the usb_eth_send if the tx_complete is not called before going in the loop. The driver interrupt routine i
USB-CDC: called handle_interrupts inside usb_eth_send
The patch removes an endless loop in the usb_eth_send if the tx_complete is not called before going in the loop. The driver interrupt routine is called allowing the driver to check if the TX is completed.
Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| 80460772 | 15-Aug-2010 |
Stefano Babic <sbabic@denx.de> |
USB-CDC: correct wrong alignment in ether.c
The buffer for the status request must be word aligned because it is accessed with 32 bit pointer in the eth_status_complete function.
Signed-off-by: Ste
USB-CDC: correct wrong alignment in ether.c
The buffer for the status request must be word aligned because it is accessed with 32 bit pointer in the eth_status_complete function.
Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| c0ef5131 | 13-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: change simple_strtol to simple_strtoul
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c (done by Julia Lawall <julia@diku.dk>) from linux-2.6.git.
Since num is unsigne
USB-CDC: change simple_strtol to simple_strtoul
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c (done by Julia Lawall <julia@diku.dk>) 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 <vkuzmichev@mvista.com>
show more ...
|
| d5292c16 | 13-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: ethernet error path potential oops fix
Fix potential oops on rare error path. The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351 (done by David Brownell <david-b@pacbell.
USB-CDC: ethernet error path potential oops fix
Fix potential oops on rare error path. The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351 (done by David Brownell <david-b@pacbell.net>) from linux-2.6.git.
Description of the issue taken from linux kernel bugzilla: (https://bugzilla.kernel.org/show_bug.cgi?id=9594)
The potential error can be tracked down as follows:
(1) line 807: let the second conjunct on the "if" statment be false meaning "dev->status_ep" is null. This means the "if" evaluates to false.
follow thru the code until...
(2) line 808: usb_ep_disable(dev->status_ep) passes 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 <vkuzmichev@mvista.com>
show more ...
|
| df559c1d | 13-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Correct stat_req initialization
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: Vital
USB-CDC: Correct stat_req initialization
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 <vkuzmichev@mvista.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| 0129e327 | 13-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Correct freeing usb requests
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 <vkuzmichev@mv
USB-CDC: Correct freeing usb requests
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 <vkuzmichev@mvista.com>
show more ...
|
| 7de73185 | 13-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Use native debug printout macros
Replace Linux-like debug printout macros by native ones.
Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Applied after removing dead code like '#d
USB-CDC: Use native debug printout macros
Replace Linux-like debug printout macros by native ones.
Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Applied after removing dead code like '#define DEBUG/#undef DEBUG'
show more ...
|
| 7b2f3906 | 12-Aug-2010 |
Vitaly Kuzmichev <vkuzmichev@mvista.com> |
USB-CDC: Restuct USB gadget Makefile
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 <vkuzmi
USB-CDC: Restuct USB gadget Makefile
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 <vkuzmichev@mvista.com>
show more ...
|