> -Original Message-
> From: Kaukab, Yousaf
> Sent: Friday, September 25, 2015 10:52 AM
> To: 'John Youn'; 'Yunzhi Li'; 'Felipe Balbi'
> Cc: 'he...@sntech.de'; 'c...@rock-chips.com'; 'h...@rock-chips.com'; 'yk@rock-
> chips.com'; 'gaura...@google.com'; 'albe...@google.com'; 'wulf@rock-
> ch
This patch fixes the following warning if 64-bit architecture environment:
./drivers/usb/renesas_usbhs/common.c:496:25: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
dparam->type = of_id ? (u32)of_id->data : 0;
Signed-off-by: Yoshihiro Shimoda
---
drivers/us
This patch is based on the latest Felipe's usb.git / testing/next
branch (The commit id = f3a464c9f5be1bb93a4355bd5a433dbc2c0bf7fd).
Changes from v1:
- Add a patch to fix build warning if 64-bit environment as patch 1/2
- Add a comment in patch 2/2
Yoshihiro Shimoda (2):
usb: renesas_usbhs:
This patch adds a compatible string to support for R-Car H3.
Since the HS-USB controller of R-Car H3 is almost the same specification
with R-Car Gen2 (these have 16 pipes and usb-dmac), this patch
sets the "type" of renesas_usbhs_driver_param to USBHS_TYPE_RCAR_GEN2.
Signed-off-by: Yoshihiro Shim
On Tue, Sep 29, 2015 at 11:21 AM, Yoshihiro Shimoda
wrote:
> This patch adds a compatible string to support for R-Car H3.
>
> Since the HS-USB controller of R-Car H3 is almost the same specification
> with R-Car Gen2 (these have 16 pipes and usb-dmac), this patch
> sets the "type" of renesas_usbhs
From: Gregory Herrero
port resume sequence may be used in different places. Create a
function to handle it. Make hprt0 read-modify-write atomic and
clear HPRT0_SUSP for both writes as it is a "read, write-set,
and self-clear (R_WS_SC)" bit. Since the lock is released
between the writes, read hprt
Hi,
This series consists of various bug fixes for both host and gadget
sides. All patches are verified on dwc2 v3.0a with dedicated fifos.
It would be good to get some Tested-bys for other platforms.
It is based on testing/next branch in Felipe's git.
Thank you,
Best regards,
Yousaf
History:
v3
From: Gregory Herrero
lx_state must be used to reflect controller power state only and not
bus state. Thus add a flag to track state during bus suspend.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Ack
From: Gregory Herrero
During hcd initialization, hardware accessible flag and lx_state must
be reset to the working state since controller is powered at this stage.
Same logic applied for stop callback.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
From: Gregory Herrero
When a device is disconnected, lx_state must not be changed since the
device may be disconnected whereas controller is still powered.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
From: Gregory Herrero
Disable controller power and enter hibernation when usb bus is
suspended. A phy driver is required to disable the power of the
controller and detect remote-wakeup or disconnection since the
controller will not be able to detect these in this state.
Once the phy driver detec
From: Gregory Herrero
When entering hibernation hprt0 must be read using dwc2_read_hprt0().
Otherwise, any set hprt0 status bits will be cleared when restoring
hprt0 on exit from hibernation.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by:
From: Gregory Herrero
If hibernation is supported, resume of devices will be handled in
bus_resume callback.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/core
GINTSTS.DisconnInt is host only interrupt and should be disable after
dwc2_disable_host_interrupts is called.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/core.c | 5 +++--
1 file changed, 3 i
From: Gregory Herrero
Frame number is reset in hardware after exiting hibernation.
Thus, reset frame_number and ensure qh are queued with correct
sched_frame.
Otherwise, qh->sched_frame may be too high compared to
current frame number (which is 0). This can delay addition of qh in
the list of tr
From: Gregory Herrero
On first qh initialization, hsotg->frame_number is not corresponding
to reality. So read it from host controller to get correct value.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
From: Gregory Herrero
Disable host interrupts before synchronising dwc2 irq.
So that interrupts are not generated once controller is stopped.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John
From: Gregory Herrero
On a disconnect, dwc2 will kill all remaining urbs from qh list.
urbs are given back to hcd with -ETIMEDOUT status.
Some usb device driver, like mass storage, will unlink all urbs
using usb_hcd_unlink_urb when receiving a negative status different
from -ECONNRESET.
The follo
> -Original Message-
> From: Felipe Balbi [mailto:ba...@ti.com]
> Sent: Monday, September 28, 2015 10:43 PM
> To: Kaukab, Yousaf
> Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
> Herrero, Gregory; he...@sntech.de; diand...@chromium.org;
> r.bald...@samsung.com; dingu.
From: Gregory Herrero
In case controller is asked to stop while devices are connected,
disconnect all devices and clean up before stopping.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Y
From: Gregory Herrero
Port can be resumed in bus_resume callback.
In this case, there is no need to drive resume a second time
when hcd ask for it.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by
From: Gregory Herrero
Correctly update lx_state on gadget connection and disconnection.
When usb cable is disconnected, lx_state must be updated to L3 as
controller could be in power off state.
When usb cable is connected, lx_state must be updated to L0 as
controller is powered.
Signed-off-by: G
From: Gregory Herrero
Print urb->iso_frame_desc.status after it has been updated using
dwc2_hcd_urb_get_iso_desc_status().
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers
From: Gregory Herrero
If an interrupt rises during hibernation process, dwc2 will assert
interrupt line to interrupt controller. If interrupt is level
sensitive, interrupt handler will be called in a loop because dwc2
will not be able to clear it while controller is hibernated.
Thus, clear all co
From: Gregory Herrero
Some high speed mass storage devices fail to enumerate with following
error:
Cannot enable port %i. Maybe the USB cable is bad?
This happens only when the device is plugged while the controller
is in hibernation state. After exiting hibernation, the controller
detects the
dwc2_hsotg_start_req starts a request only if endpoint is not stalled.
Ignore this check for ep0 as core will clear DOEPCTL0.Stall after
sending stall handshake. Prepare instead for receiving next setup
packet.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
T
If dual role configuration is not selected, check and force dr_mode
based on the selected configuration.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/platform.c | 11 +++
1 file change
From: Gregory Herrero
When disconnecting cable, controller will detect a suspend condition
and enter partial power down. If vbus_session is called by the phy
driver during hibernation, make sure controller exit hibernation
before it is accessed.
Signed-off-by: Jianqiang Tang
Signed-off-by: Greg
From: Gregory Herrero
idstschng interrupt should not be used when id pin control is
external. This is already handled on dwc2 host part. Fix it on gadget
part as well.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by:
Make sure there are no requests pending on ep0 before reinitializing
core. Otherwise, dwc2_hsotg_enqueue_setup will fail afterwards.
Also, take hsotg->lock before calling
dwc2_hsotg_core_init_disconnected() from dwc2_conn_id_status_change()
as dwc2_hsotg_complete_request() expect lock to be held.
From: Gregory Herrero
Modifying the pullup state during host mode trig a new enumeration
of attached device. Thus, avoid modifying pullup in host mode.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acke
ID status change interrupt will not be handled in peripheral only
configuration. So initialize op_state during gadget init.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/gadget.c | 2 ++
1 file
From: Gregory Herrero
No point of continue with initialization if core is not in a sane
state.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/gadget.c | 3 ++-
From: Gregory Herrero
Some device may have external id pin control enabled, so op_state
will not be set on id pin interrupt change.
Thus, ensure op_state is set to peripheral during vbus detection.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Test
If system is loaded, reset, enum-done and setup interrupts can occur
at the same time. Current interrupt handling sequence will handle
setup packet's interrupt before handling reset interrupt. Which will
break the enumeration process. Correct sequence is to handle reset,
enum-done and then any othe
There is a 200ms guard period to avoid unnecessary resets of the dwc2
ip. This delay sometimes prove to be too large when usbcv is run with
an ehci host. dwc2 only needs to be reset after addressed state.
Change the logic to reset ip after addressed state.
Signed-off-by: Mian Yousaf Kaukab
Tested
wIndex field was missing. Also print in natural order instead of
Req first, so that its easier to compare for example against
bus analyzer logs.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/ga
If the request being dequeued is already started, disable endpoint
to stop the transfer and then call dwc2_hsotg_complete_request().
Endpoint will be re-enabled on next call to dwc2_hsotg_start_req().
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by:
Controller enters hibernation through suspend interrupt on
disconnection. On connection, session request interrupt is generated.
dwc2 must exit hibernation and restore state from this interrupt
before continuing.
In host mode, exit from hibernation is handled by bus_resume function.
Signed-off-by
From: Yunzhi Li
When dwc2_hsotg_handle_unaligned_buf_complete() hs_req->req.buf
already destroyed, in dwc2_hsotg_unmap_dma(), it touches
hs_req->req.dma again, so dwc2_hsotg_unmap_dma() should be called
before dwc2_hsotg_handle_unaligned_buf_complete(). Otherwise, it
will cause a bad_page BUG, wh
req->actual == req->length means that there is no data left to enqueue,
so free the request.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/function/f_midi.c
b/drivers/usb/gadg
This fix a memory leak that will occur in this case.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_midi.c
b/drivers/usb/gadget/function/f_midi.c
index 93212ca..163c0c
Here is the third version of this patch set. It includes memory leakage bug
fix, improvements and code cleanups.
Felipe F. Tonello (4):
usb: gadget: f_midi: free usb request when done
usb: gadget: f_midi: free request when usb_ep_queue fails
usb: gadget: f_midi: Transmit data only when IN ep
This code is duplicated from f_midi_start_ep(midi, f, midi->out_ep).
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 20
1 file changed, 20 deletions(-)
diff --git a/drivers/usb/gadget/function/f_midi.c
b/drivers/usb/gadget/function/f_midi.c
ind
This makes sure f_midi doesn't try to enqueue data when the IN endpoint is
disabled, ie, USB cable is disconnected.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_mi
Hi,
this is v5 of an attempt to make it easier for devices to remain in
runtime PM when the system goes to sleep, mainly to reduce the time
spent resuming devices.
For this, we interpret the absence of all PM callback implementations as
it being safe to do direct_complete, so their ancestors aren
Have dev_pm_ops.prepare return 1 for USB devices and ports so that USB
devices can remain runtime-suspended when the system goes to a sleep
state, if their wakeup state is correct and they have runtime PM enabled.
Signed-off-by: Tomeu Vizoso
---
drivers/usb/core/port.c | 6 ++
drivers/usb
On 2015-09-26 09:28, Eric Curtin wrote:
Hi Dimitry,
Is it Debian-derivative by any chance? Their capslock setup is wonky
because CapsLock key does no actually set up as a CapsLock but another
modifier. Also is it in X or is it on text console? Because X handles
led state on its own...
I'm on
Hello.
On 09/29/2015 06:01 AM, Chunfeng Yun wrote:
add a DT binding documentation of usb3.0 phy for MT65xx
SoCs from Mediatek.
Acked-by: Rob Herring
Signed-off-by: Chunfeng Yun
---
.../devicetree/bindings/phy/phy-mt65xx-usb.txt | 68 ++
1 file changed, 68 insertion
On 29 September 2015 at 14:51, Austin S Hemmelgarn wrote:
> On 2015-09-26 09:28, Eric Curtin wrote:
>>
>> Hi Dimitry,
>>
>>> Is it Debian-derivative by any chance? Their capslock setup is wonky
>>> because CapsLock key does no actually set up as a CapsLock but another
>>> modifier. Also is it in X
On 09/29/2015 06:01 AM, Chunfeng Yun wrote:
add a DT binding documentation of xHCI host controller for the
MT8173 SoC from Mediatek.
Signed-off-by: Chunfeng Yun
---
.../devicetree/bindings/usb/mt8173-xhci.txt| 52 ++
1 file changed, 52 insertions(+)
create mode
Hello.
On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:
From: Gregory Herrero
lx_state must be used to reflect controller power state only and not
bus state. Thus add a flag to track state during bus suspend.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robe
On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:
From: Gregory Herrero
Frame number is reset in hardware after exiting hibernation.
Thus, reset frame_number and ensure qh are queued with correct
sched_frame.
Otherwise, qh->sched_frame may be too high compared to
current frame number (which i
Have dev_pm_ops.prepare return 1 for USB devices and ports so that USB
devices can remain runtime-suspended when the system goes to a sleep
state, if their wakeup state is correct and they have runtime PM enabled.
Signed-off-by: Tomeu Vizoso
---
drivers/usb/core/port.c | 6 ++
drivers/usb
Hi,
this is v6 of an attempt to make it easier for devices to remain in
runtime PM when the system goes to sleep, mainly to reduce the time
spent resuming devices.
For this, we interpret the absence of all PM callback implementations as
it being safe to do direct_complete, so their ancestors aren
Contact us as we offer our finance service at a low and affordable interest
rate for long and short cash term. Interested applicant should contact us for
further acquisition procedures. Thanks as we remain obliged to render service
to you; worldtrading1...@gmail.com
--
To unsubscribe from this
On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:
If the request being dequeued is already started, disable endpoint
to stop the transfer and then call dwc2_hsotg_complete_request().
Endpoint will be re-enabled on next call to dwc2_hsotg_start_req().
Signed-off-by: Mian Yousaf Kaukab
Tested-by
On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:
From: Gregory Herrero
Modifying the pullup state during host mode trig a new enumeration
of attached device. Thus, avoid modifying pullup in host mode.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyg
On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:
If dual role configuration is not selected, check and force dr_mode
based on the selected configuration.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drive
All USB devices connected to xHCI controller not working after power failure
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
$ uname -r
4.2.1-300.fc23.x86_64+debug
dmesg output:
[ 169.503499] xh
Looks good, but
1. We still have
spin_lock(&dev->lock);
dev->driver->disconnect(&dev->gadget);
spin_unlock(&dev->lock);
in
pch_udc_vbus_session()
pch_udc_pcd_pullup().
And also there is lock around dev->driver->setup() in
pch_udc_svc_control_out()
pch_udc_svc_intf_interrupt()
pch_udc_s
On 25 September 2015 at 16:45, Austin S Hemmelgarn wrote:
> On 2015-09-25 08:02, Jiri Kosina wrote:
>>
>> On Fri, 25 Sep 2015, Felipe Tonello wrote:
>>
>>> Maybe a better description on Kconfig and/or comments on source code
>>> it's enough.
>>
>>
>> I personally find the current Kconfig descripti
(avoid top-posting. If you want to know the reasons, google is your friend)
On Tue, Sep 29, 2015 at 10:38:05PM +0300, Alexey Khoroshilov wrote:
> Looks good, but
> 1. We still have
> spin_lock(&dev->lock);
> dev->driver->disconnect(&dev->gadget);
> spin_unlock(&dev->lock);
> in
> pch_u
On Tue, Sep 22, 2015 at 7:56 AM, Peter Chen wrote:
> On Mon, Sep 21, 2015 at 09:49:11PM -0300, Fabio Estevam wrote:
>> On Sun, Sep 20, 2015 at 9:43 PM, Peter Chen wrote:
>> > This patch set changes usb clock information for legacy i.mx platforms.
>> > At these platforms, they needs three clocks t
Hello,
On 2015-08-27 11:54, Kishon Vijay Abraham I wrote:
On Tuesday 25 August 2015 11:42 AM, Krzysztof Kozlowski wrote:
On 25.08.2015 14:47, Marek Szyprowski wrote:
Hello,
On 2015-08-21 14:44, Kishon Vijay Abraham I wrote:
On Friday 21 August 2015 06:08 PM, Marek Szyprowski wrote:
Exynos U
65 matches
Mail list logo