25 Sep, 2014
1 commit
-
Use the recently introduced usb_gadget_giveback_request() in favor of
direct invocation of the completion routine.All places in drivers/usb/ matching "[-.]complete(" were replaced with a
call to usb_gadget_giveback_request(). This was compile-tested with all
ARM drivers enabled and runtime-tested for musb.Signed-off-by: Michal Sojka
Acked-by: Felipe Balbi
Tested-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
10 Jul, 2014
1 commit
-
This patch fixes an issue that the renesas_usbhs driver in gadget mode
cannot work correctly even if I disabled DMAC of the driver when I used
the g_zero driver and the testusb tool.When a usb cable is re-connected, the renesas_usbhs driver calls the
usbhsp_flags_init() (via usbhs_hotplug() --> usbhs_mod_call(start) -->
usbhsg_try_start() --> usbhs_pipe_init()). However, the driver doesn't
call the usbhsp_flags_init() when usbhsg_ep_disable() is called.
So, if a gadget driver calls usb_ep_enable() and usb_ep_disable() again
and again, the renesas_usbhs driver will output the following log:renesas_usbhs renesas_usbhs: can't get pipe (BULK)
renesas_usbhs renesas_usbhs: wrong recip requestAcked-by: Kuninori Morimoto
Signed-off-by: Yoshihiro Shimoda
Signed-off-by: Felipe Balbi
18 Dec, 2013
1 commit
-
This patch adds "maxpacket_limit" to struct usb_ep. This field contains
maximum value of maxpacket supported by driver, and is set in driver probe.
This value should be used by autoconfig() function, because value of field
"maxpacket" is set to value from endpoint descriptor when endpoint becomes
enabled. So when autoconfig() function will be called again for this endpoint,
"maxpacket" value will contain wMaxPacketSize from descriptior instead of
maximum packet size for this endpoint.For this reason this patch adds new field "maxpacket_limit" which contains
value of maximum packet size (which defines maximum endpoint capabilities).
This value is used in ep_matches() function used by autoconfig().Value of "maxpacket_limit" should be set in UDC driver probe function, using
usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
set choosen value to both "maxpacket_limit" and "maxpacket" fields.This patch modifies UDC drivers by adding support for maxpacket_limit.
Signed-off-by: Robert Baldyga
Signed-off-by: Kyungmin Park
Signed-off-by: Felipe Balbi
29 Jul, 2013
1 commit
-
Current usbhsx_for_each_xxx macro will read out-of-array's
memory after last loop operation.
It was not good C language operation, and the binary which was
compiled by (at least) gcc 4.8.1 is broken
This patch tidyup these issuesReported-by: Yusuke Goda
Reviewed-by: Takashi Yoshii
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
15 Jul, 2013
1 commit
-
usb_gadget_ops :: udc_stop might be called with driver = NULL since
511f3c5326eabe1ece35202a404c24c0aeacc246
(usb: gadget: udc-core: fix a regression during gadget driver unbinding)Because of that, 2nd times insmod goes fail.
This patch fixes it up.Reported-by: Yusuke Goda
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
02 Apr, 2013
1 commit
-
This patch fixup below sparse errors
CHECK ${RENESAS_USB}/common.c
${RENESAS_USB}/common.c:313:17: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:322:17: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:384:17: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:524:9: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:545:9: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:574:9: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/common.c:606:9: error: incompatible types in conditional expression (different base types)
${RENESAS_USB}/mod_gadget.c:233:28: warning: symbol 'req_clear_feature' was not declared. Should it be static?
${RENESAS_USB}/mod_gadget.c:274:28: warning: symbol 'req_set_feature' was not declared. Should it be static?
${RENESAS_USB}/mod_gadget.c:375:28: warning: symbol 'req_get_status' was not declared. Should it be static?[ balbi@ti.com : added three sparse fixes to mod_gadget.c ]
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
18 Mar, 2013
4 commits
-
udc-core provides a better way to handle release
methods, let's use it.Signed-off-by: Felipe Balbi
-
udc-core now handles that for us, which means
we can remove it from our driver.Signed-off-by: Felipe Balbi
-
We don't need the ->register_my_device flag
anymore because all UDC drivers have been
properly converted.Let's remove every history of it.
Signed-off-by: Felipe Balbi
-
By simply setting a flag, we can drop some
boilerplate code.Signed-off-by: Felipe Balbi
26 Jan, 2013
1 commit
-
Felipe writes:
usb: gadget: patches for v3.9 merge windowfinally getting rid of the old ->start()/->stop() methods
in favor of the better and improved ->udc_start()/->udc_stop().There were surprisingly quite a few users left, but all of them
have been converted.f_mass_storage removed some dead code, which is always great ;-)
There's also a big cleanup to the gadget framework from Sebastian
which gets us a lot closer to having only function drivers in
kernel and move over to configfs-based binding.Other than these, there's the usual set of cleanups: s3c UDCs are
moving over to devm_regulator_bulk_get() API, at91_udc removed
an unnecessary check for work_pending() before scheduling and
there's the removal of an unused variable from uac2_pcm_trigger().
25 Jan, 2013
1 commit
-
Add the missing 'const' keyword to all struct
usb_gadget_ops in the gadget framework.Signed-off-by: Felipe Balbi
13 Dec, 2012
2 commits
-
Current usbhsg_ep_disable() didn't care
uep->pipe and pipe->mod_private variable which is used on usbhsg_ep_enable().
It breaks renesas_usbhs gadget when resume.
This patch fixes it.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
Current driver always initialized uep->pipe to NULL on usbhsg_try_start().
But it breaks relationship with
usb_ep_ops :: enable/disable functions when suspend/resume.
This patch solved this issue by initializing uep->pipe on probe()Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
16 Oct, 2012
1 commit
-
This patch adds usbhs_sys_function_pullup() to control
D+ line for USB function, and enabled pullup support on mod_gadget.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
04 May, 2012
1 commit
-
The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS.
So, this patch adds set_selfpowered().Signed-off-by: Yoshihiro Shimoda
Signed-off-by: Felipe Balbi
02 Mar, 2012
1 commit
-
USB: Gadget: changes for 3.4
This merge is rather big. Here's what it contains:
For am5536udc we have just simple coding style fixes. Nothing that has any
potential to cause any issues going forward.With mv_udc, there's only one single change removing an unneeded NULL check.
at91_udc also only saw a single change this merge window, and that's only
removing a duplicated header.The Renesas controller has a few more involved changes. Support for SUDMAC was
added, there's now a special handling of IRQ resources for when the IRQ line is
shared between Renesas controller and SUDMAC, we also had a bug fix where
Renesas controller would sleep in atomic context while doing DMA transfers from
a tasklet. There were also a set of minor cleanups.The FSL UDC also had a scheduling in atomic context bug fix, but that's all.
Thanks to Sebastian, the dummy_hcd now works better than ever with support for
scatterlists and streams. Sebastian also added SuperSpeed descriptors to the
serial gadgets.The highlight on this merge is the addition of a generic API for mapping and
unmapping usb_requests. This will avoid code duplication on all UDC controllers
and also kills all the defines for DMA_ADDR_INVALID which UDC controllers
sprinkled around. A few of the UDC controllers were already converted to use
this new API.Conflicts:
drivers/usb/dwc3/gadget.c
28 Feb, 2012
1 commit
-
those routines have everything we need to map/unmap
USB requests and it's better to use them.Tested-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
24 Feb, 2012
1 commit
-
This patch fixup below warning on device_unregister()
renesas_usbhs renesas_usbhs.1: host probed
renesas_usbhs renesas_usbhs.1: gadget probed
renesas_usbhs renesas_usbhs.1: irq request err
------------[ cut here ]------------
WARNING: at ${LINUX}/drivers/base/core.c:1)
Device 'gadget' does not have a release() function, it is broken and must be fi.
Modules linked in:
[] (unwind_backtrace+0x0/0xe4) from [] (warn_slowpath_commo)
[] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_)
[] (warn_slowpath_fmt+0x2c/0x3c) from [] (device_release+0x)
[] (device_release+0x70/0x84) from [] (kobject_cleanup+0x58)
[] (kobject_cleanup+0x58/0x6c) from [] (usbhs_mod_gadget_re)
[] (usbhs_mod_gadget_remove+0x3c/0x6c) from [] (usbhs_mod_p)
[] (usbhs_mod_probe+0x68/0x80) from [] (usbhs_probe+0x1cc/0)
...Cc: stable@vger.kernel.org
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
24 Jan, 2012
1 commit
-
In drivers/usb/renesas_usbhs/mod_gadget.c::usbhsg_recip_run_handle()
the Coverity Prevent checker currently flags a warning about possibly
uninitialized use of 'ret' i usbhsg_recip_run_handle(). It does this
since it assumes we take one of the non-default branches in the switch
and then subsequently take the false branch in the 'if (func)' case
below. This exact scenario will never happen, but Coverity can't see
that for some reason. This patch initializes 'ret' to '0' when it is
declared which should shut up this report and won't really hurt - so
why not? At least then it's clear that 'ret' is always initialized..Signed-off-by: Jesper Juhl
Signed-off-by: Felipe Balbi
15 Dec, 2011
1 commit
-
Gcc complains about this printk:
drivers/usb/renesas_usbhs/mod_gadget.c:188:3: warning: format ‘%x’
expects argument of type ‘unsigned int’, but argument 3 has type
‘dma_addr_t’ [-Wformat]Signed-off-by: Dan Carpenter
Signed-off-by: Felipe Balbi
13 Dec, 2011
1 commit
-
driver has to re-use the limited pipe for each device/endpoint
when it is USB host hub mode, since number of pipe has limitation.Then, each pipe should care own pipe sequence for next packet.
This patch adds sequence control.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
12 Dec, 2011
11 commits
-
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).with this patch we can finally remove the global "the_controller_link"
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
When poping packet from queue, it needs correct end procedure.
This patch call usbhsg_queue_pop() in usbhsg_pipe_disable().Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
Current renesas_usbhs driver always tries to send packet in end of recip handler.
But it breaks chapter 9 EndpointHalt test.
This patch fixup this issue.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
This patch adds basic get-status support for chapter 9 test.
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
This patch adds basic set-feature support for chapter 9 test.
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
recip handler will call various functions which are holding
usbhs_lock.This patch removes superfluous usbhs_lock from recip handler
to escape double lock.[ balbi@ti.com : brushed up commit log a bit ]
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
This commit renames the “speed” field of the usb_gadget_driver
structure to “max_speed”. This is so that to make it more
apparent that the field represents the maximum speed gadget
driver can support.This also make the field look more like fields with the same
name in usb_gadget and usb_composite_driver structures. All
of those represent the *maximal* speed given entity supports.After this commit, there are the following fields in various
structures:
* usb_gadget::speed - the current connection speed,
* usb_gadget::max_speed - maximal speed UDC supports,
* usb_gadget_driver::max_speed - maximal speed gadget driver
supports, and
* usb_composite_driver::max_speed - maximal speed composite
gadget supports.Signed-off-by: Michal Nazarewicz
Signed-off-by: Felipe Balbi -
This commit replaces usb_gadget's is_dualspeed field with
a max_speed field.[ balbi@ti.com : Fixed DWC3 driver ]
Signed-off-by: Michal Nazarewicz
Signed-off-by: Felipe Balbi -
usbhs_sys_usb_ctrl() can collect into usbhs_sys_host/function_ctrl().
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl().
Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
29 Nov, 2011
4 commits
-
This patch cares latest USB_SPEED_SUPER support.
renesas_usbhs can not use super-speed, but can use full/high speed.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman -
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).But current renesas_usbhs driver didn't care about gadget.dev.driver
when udc_stop. it cause rmmod oops.
This patch care it.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman -
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).cable disconnected signal was needed.
This patch fixup it.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman -
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).But bind() function will fail if it was called before
device_register() (or device_add()).
This patch modifies this issue.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
15 Nov, 2011
1 commit
-
Fix up the following section mismatch warnings:
WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0xf5d): Section
mismatch in reference from the function usbhs_mod_probe() to the function
.devinit.text:usbhs_mod_host_probe() The function usbhs_mod_probe() references
the function __devinit usbhs_mod_host_probe(). This is often because
usbhs_mod_probe lacks a __devinit annotation or the annotation of
usbhs_mod_host_probe is wrong.WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0xfd7): Section
mismatch in reference from the function usbhs_mod_probe() to the function
.devexit.text:usbhs_mod_host_remove() The function usbhs_mod_probe() references
a function in an exit section. Often the function usbhs_mod_host_remove() has
valid usage outside the exit section and the fix is to remove the __devexit
annotation of usbhs_mod_host_remove.WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0x1005): Section
mismatch in reference from the function usbhs_mod_remove() to the function
.devexit.text:usbhs_mod_host_remove() The function usbhs_mod_remove()
references a function in an exit section. Often the function
usbhs_mod_host_remove() has valid usage outside the exit section and the fix is
to remove the __devexit annotation of usbhs_mod_host_remove.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
14 Oct, 2011
2 commits
-
renesas_usbhs can manually set DATA0/DATA1.
This patch is prepare for mod_host supportSigned-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi -
Automatically packet start by usbhs_pkt_push() was useful.
But the pushed packet will be called twice
if new packet was pushed on usbhs_pkt :: done callback.
(1st is called by usbhs_pkt_push(), 2nd is called by usbhsf_pkt_handler())This patch disables automatic packet start,
and clarified packet start timing.Signed-off-by: Kuninori Morimoto
Signed-off-by: Felipe Balbi