History log of /drivers/usb/renesas_usbhs/mod_host.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
55b81e6f2795484ea8edf5805c95c007cacfa736 09-Jan-2012 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
xhci: Clean up 32-bit build warnings.
USB: update documentation for usbmon
usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
drivers/usb/class/cdc-acm.c: clear dangling pointer
drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
drivers/usb/host/isp1760-if.c: introduce missing kfree
usb: option: add ZD Incorporated HSPA modem
usb: ch9: fix up MaxStreams helper
USB: usb-skeleton.c: cleanup open_count
USB: usb-skeleton.c: fix open/disconnect race
xhci: Properly handle COMP_2ND_BW_ERR
USB: remove dead code from suspend/resume path
USB: add quirk for another camera
drivers: usb: wusbcore: Fix dependency for USB_WUSB
xhci: Better debugging for critical host errors.
xhci: Be less verbose during URB cancellation.
xhci: Remove debugging about ring structure allocation.
xhci: Remove debugging about toggling cycle bits.
xhci: Remove debugging for individual transfers.
...
d9b78f33d9c1b699b66f10ad2329487f813c4642 15-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: tidyup for smatch warnings

This patch tidyup below smatch complaint

drivers/usb/renesas_usbhs/mod_host.c +642 usbhsh_queue_done()
warn: variable dereferenced before check 'urb' (see line 636)

Special thanks to Dan

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
15a3838b101b292c2e40824d843a4d8871ac4010 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: show error reason on usbhsh_urb_enqueu()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
2d833faad260ad074fb1ed0a378f4ccd1b8025b8 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add force packet remove method

Packet should be force removed when reset/detach

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
6d0376f84446507d07ae83935cbe7538d07c352f 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: care usb_hcd_giveback_urb() status

Without this patch, USB host hub shows error when cable was detached

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
b1930da08872f6e17b8cdca60ee9c7321a8b5b8c 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add usbhsh_is_running()

It is possible to judge whether renesas_usbhs driver is running,
by checking attch irq mask.
This patch adds usbhsh_is_running() to check it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
31e00fd116cab296da2d12bc0b82a30a9fbdd681 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: disable attch irq after device attached

attch interrupt might happen infinitely on some USB hub (self power?).
This patch disable attch irq after device attached,
and enable it again when detach irq happen.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
3edeee3893b107364fe4ed8535245773b1e1e72b 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: care pipe sequence

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
e5679d07a6ca5512070fb5e65dcc66eeb5087d0d 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add usbhs_pipe_attach() method

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.
This patch adds usbhsh_pipe_attach/detach() functions for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
e4c57ded48d9bad95a4d7254e75a81f7abcffef9 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add usbhsh_endpoint_detach_all() for error case

This patch adds usbhsh_endpoint_detach_all() for error case.
usbhs_endpoitn_xxx() functions were moved to upper side in source code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
c1e4877a4106a31319c4ad65b625c11393df98d6 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: modify device attach method

Current renesas_usbhs had been assigning udev to each urb.
It was executed even though it was device0.
For this reason, the device0 had to set the new device address
which has still not been assigned. (it will be assigned on next step).
Current renesas_usbhs used fixed address for it.
but it is not good for USB hub support.
This patch modifies this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
547965436d8dc8747b1931af954a178d30e86f6c 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: pop packet when urb dequeued

usbhsh_ureq_free() is not enough when urb dequeued.

Without this patch, the driver can not recognize re-connected
USB device after USB hub disconnected

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
37332ee0dfb017aea566047be945d6fd3531c713 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add lost error value when enqueue

usbhsh_urb_enqueue() didn't have error value when
usbhsh_device_attach() failed

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
1115b9e279a23ca0bf7eda7d7697fe20a441304e 09-Dec-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add hcd->has_tt for low/full speed

Low/Full speed device is not recognized without this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
7aac8d1537b1fd1a9e39bd16edcd6728c19f8dd5 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_device_xx()

current mod_host used usbhs_device_alloc/free(),
but allocated variable was attached to each xx->hcpriv.
The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
4825093e9d0692a2a1f1615ab69246ac07b17f2f 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_endpoint_xx()

current mod_host used usbhs_endpoint_alloc/free(),
but allocated variable was attached to each xx->hcpriv.
The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
3eddc9e4c828dbbeabb5924266bfded42a1ac042 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_xx_queue_push()

This patch remove unneeded parameter from usbhsh_xx_queue_push()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
f352741d2704a480a927160be8c910570bf51238 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: cleanup usbhsh_endpoint_xxx()

this patch cleanup
- make sure static function
- remove unneeded label
- useless local variable were removed

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
d399f90d192f4cbda2527d42d054d090e327a9a0 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: adds spin lock area on mod_host

spin lock was needed in mod_host.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
ab14230854aba9d0c99b3cd0e4bb1ef430973d84 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: check device0 status when alloc

device0 was treated without checking in usbhsh_device_alloc().
but "udev->usbv" and "dev_set_drvdata()" will be overwritten
if device0 was multi-allocated.
This patch fixes this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
c5b963f809f378d4fedd6f2f09b36f50c5a37bd5 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: remove usbhsh_request list

mod_host had usbhsh_request active/free list.
it was almost meaningless, and vainly complicated.
This patch remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
9c6736523a23371ae58c5427587ee1652ba059c1 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: usbhs_set_device_config() care upphub/hubport

current usbhs_set_device_config() didn't care upphub/hubport.
This patch adds its value.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
fca8ab7ee1c6d1857a4fcc9420cbf0e3b51aa199 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: cleanup usbhs_endpoint_disable()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
3dd492686c063f9fa9417c3888e7a8eeb504b5b9 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: modify function name of usbhs_set_device_xx()

it was device configuration setting function, not only speed.
This patch modify function name usbhs_set_device_speed() -> usbhs_set_device_config()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
fc9d5c79f681a7bff588d32de9429be360996df7 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: usbhsh_ureq_alloc/free() care urb->hcpriv

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
ee8a0bf5a775098b1140195b6bfacb4813166e5f 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: cleanup complicated ureq alloc/free

DCP data/status stage needs ureq to usbhs_pkt_push(),
but sometimes, there is no data stage.
In that case, allocated ureq was not freed,
Current ureq alloc/free pair were difficult to understand.
This patch removed unnecessary/un-understandable ureq alloc
from usbhsh_urb_enqueue(), and create simpler alloc/free pair.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
25234b46be2a1688d38fb55ed9d7e3f2cc41c9af 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: tidyup mod_host request variable name

renesas_usbhs driver use "req" for struct usb_ctrlrequest,
and "ureq" for struct usbhsh_request

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
3244a7b43f13682c3323ee0d781f0cb212e8b3e7 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: remove usbhs_sys_usb_ctrl()

usbhs_sys_usb_ctrl() can collect into usbhs_sys_host/function_ctrl().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
2288e109931577582f09d6295029bbf098c6f939 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()

usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c
d7a00ec1a8debf74317c5110ded9918bad8de772 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: bugfix: set DATA0 when usbhsh_endpoint_alloc()

new endpoint should start from DATA0,
but mod_host didn't care it.
This patch fix it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
146ee50ae51c78fc93d025cb9528883df26ab705 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: bugfix: disable irq when device stop

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
73ef635a07c0e6a0a159d8beabffb83399429188 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: bugfix: care pipe direction

renesas_usbhs is caring pipe type and its direction.
but current usbhs_endpoint_alloc() didn't check direction.
this patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
b7a8d17db9a86db1040862600cf3a02848f83844 27-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: fixup section mismatch warning

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
7fccd480b7fe84a98ee252fa79dd92f7fff5ec2a 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: fixup struct completion usage

Since renesas_usbhs mod_host didn't use
struct completion as static object, the warning of lockdep came out.
This patch fixup this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
55b5a624a0cc5aa4b350fd50d78cf3415f795bfe 18-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: tidyup for smatch warnings

This patch tidyup below smatch complaint

drivers/usb/renesas_usbhs/mod_host.c +447 usbhsh_endpoint_free()
warn: variable dereferenced before check 'uep' (see line 444)

Special thanks to Dan

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/renesas_usbhs/mod_host.c
034d7c13a79c67d3b52dd782d68e6c324613878a 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: add mod_host support

This is mod_host prototype support for renesas_usbhs driver.
It doesn't support USB-Hub, and USB-DMAC for now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
/drivers/usb/renesas_usbhs/mod_host.c