76e0da3 "usb-gadget/uvc: use per-attribute show and store methods"
removed write permission for writeable attributes. Correct attribute
permissions.
Fixes: 76e0da3 "usb-gadget/uvc: use per-attribute show and store methods"
Signed-off-by: Mian Yousaf Kaukab
---
drivers
Defect 7374 workaround enables all GPEP as endpoint 0. Restore
endpoint number when defect 7374 workaround is disabled. Otherwise,
check to match USB endpoint number to hardware endpoint number in
net2280_enable() fails.
Cc: # 4.2
Reported-by: Paul Jones
Signed-off-by: Mian Yousaf Kaukab
Fix a duplicate argument warning reported by 0-DAY kernel test
infrastructure in the following patch:
77dbf71 usb: dwc2: host: add disconnect interrupt to host only interrupts
Signed-off-by: Mian Yousaf Kaukab
---
drivers/usb/dwc2/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
-by: Mian Yousaf Kaukab
Signed-off-by: Gregory Herrero
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/core_intr.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2
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
n any other endpoint interrupts.
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 | 60 +++
1 file changed, 30 insertions(+), 30 deletions(-)
diff
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
eld.
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 | 8 +++-
drivers/usb/dwc2/hcd.c| 3 +++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2/gadge
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
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
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
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
: 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 | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2
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
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
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
urbs. To avoid this return urb with
-ECONNRESET status
This issue usually happens while removing mass storage device during
transfer.
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
---
d
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
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 Y
: 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 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2
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
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 Y
: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/hcd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 844bf83..30dc21d 100644
--- a
controller interrupts before hibernation entry.
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.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a
of transfers until frame number reaches qh->sched_frame.
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.c | 1 +
drivers/usb/dwc2/hcd_queue.c | 7
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
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
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
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
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
c2: gadget: don't modify pullup state in host mode
usb: dwc2: gadget: set op_state in vbus_session call
usb: dwc2: gadget: abort core init if core_reset fails
usb: dwc2: gadget: unmask idstschng interrupt only if controller
supports it
usb: dwc2: gadget: exit hibernation before power
ites, read hprt0 again.
Since the phy clock is stopped in dwc2_port_suspend(), enable it
here and remove the PCGCTL write from dwc2_hcd_hub_control()
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:
detects bus activity, it must call
usb_hcd_resume_root_hub.
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/hcd.c | 140
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
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
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
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
-by: Mian Yousaf Kaukab
Signed-off-by: Gregory Herrero
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/core_intr.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2
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
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
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
n any other endpoint interrupts.
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 | 60 +++
1 file changed, 30 insertions(+), 30 deletions(-)
diff
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
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
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
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
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
: 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 | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2
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
eld.
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 | 8 +++-
drivers/usb/dwc2/hcd.c| 3 +++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2/gadge
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 Y
controller interrupts before hibernation entry.
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.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a
: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
Tested-by: Dinh Nguyen
Tested-by: John Youn
Acked-by: John Youn
---
drivers/usb/dwc2/hcd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index de9d2e2..65044da 100644
--- a
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
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
: 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 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2
of transfers until frame number reaches qh->sched_frame.
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.c | 1 +
drivers/usb/dwc2/hcd_queue.c | 8 +
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 Y
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
urbs. To avoid this return urb with
-ECONNRESET status
This issue usually happens while removing mass storage device during
transfer.
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
---
d
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
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
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
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
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
detects bus activity, it must call
usb_hcd_resume_root_hub.
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/hcd.c | 140
supports it
usb: dwc2: gadget: exit hibernation before power down
Mian Yousaf Kaukab (10):
usb: dwc2: host: add disconnect interrupt to host only interrupts
usb: dwc2: gadget: initialize op_state for peripheral only
configuration
usb: dwc2: force dr_mode in case of configuration mismatch
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
ites, read hprt0 again.
Since the phy clock is stopped in dwc2_port_suspend(), enable it
here and remove the PCGCTL write from dwc2_hcd_hub_control()
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:
ist.
Moreover, save timestamp and sof number in the urb completion callback
to avoid any delays.
Signed-off-by: Mian Yousaf Kaukab
---
[Rename from media: uvcvideo: handle urb completion in a work queue]
History:
v2:
- Change to use tasklet instead of workqueue
- Don't use local tasklet i
-by: Mian Yousaf Kaukab
Signed-off-by: Gregory Herrero
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/core_intr.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index d8a5400..27daa42 100644
n any other endpoint interrupts.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 60 +++
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
urbs. To avoid this return urb with
-ECONNRESET status
This issue usually happens while removing mass storage device during
transfer.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deleti
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
---
drivers/usb/dwc2/gadget.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
eld.
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8 +++-
drivers/usb/dwc2/hcd.c| 3 +++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 97bf696..1697eec 100644
--
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
---
drivers/usb/dwc2/gadget.c
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
---
drivers/usb/dwc2/gadget.c
: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 229dccd..a62224a 100644
--- a/drivers/usb/dwc2
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
---
drivers/usb/dwc2/gadget.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions
: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index ddd14a7..ddb5427 100644
--- a/drivers/usb/dwc2
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
---
drivers/usb/dwc2/gadget.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/dwc2/gadget.c
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
---
drivers/usb/dwc2
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
---
drivers/usb/dwc2/hcd.c | 11 ++-
1 file changed, 6 inserti
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
: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/hcd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index de9d2e2..65044da 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -2472,6 +2472,9
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
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
---
drivers/usb/dwc2/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/core.c
of transfers until frame number reaches qh->sched_frame.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/core.c | 1 +
drivers/usb/dwc2/hcd_queue.c | 8
2 files changed, 9 insertions(+)
diff --git a/drivers/us
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
---
drivers/usb/dwc2/hcd.c | 5 +
1 file changed, 5
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
---
drivers/usb/dwc2/platform.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/usb/dwc2/platform.c b
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
---
drivers/usb/dwc2/gadget.c | 9 -
1
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
---
drivers/usb/dwc2/hcd_queue.c | 3 +++
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
---
drivers/usb/dwc2/hcd.c | 3 +++
1 file changed, 3
controller interrupts before hibernation entry.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/core.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index c5e0a45
detects bus activity, it must call
usb_hcd_resume_root_hub.
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/hcd.c | 140 -
1 file changed, 128 insertions(+), 12 deletions(-)
diff --git a
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
---
drivers/usb/dwc2/core.h | 1 +
drivers/usb
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
---
drivers/usb/dwc2/hcd.c | 3 ++-
1 file changed
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
ites, read hprt0 again.
Since the phy clock is stopped in dwc2_port_suspend(), enable it
here and remove the PCGCTL write from dwc2_hcd_hub_control()
Signed-off-by: Gregory Herrero
Signed-off-by: Mian Yousaf Kaukab
Tested-by: Robert Baldyga
---
drivers/usb/dwc2/
1 - 100 of 472 matches
Mail list logo