means that bit is set, while
lowercase letter means bit is cleared.
Signed-off-by: Janusz Dziedzic
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/trace.h | 40 ++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/trace.h b/drivers
John Youn writes:
> Sparse complains even though it looks ok. Probably it cannot detect that
> the wValue, wIndex, and wLength are declared __le16 due to the macro
> magic.
should we fix sparse, instead? Oh well, doesn't hurt applying.
>
> Redeclare them as CPU endianness and make the conversion
Hi,
William Wu writes:
> This patch documents the device tree documentation required for
> Rockchip USB3.0 core wrapper consist of USB3.0 IP from Synopsys.
>
> It could operate in device mode (SS, HS, FS) and host
> mode (SS, HS, FS, LS).
>
> Signed-off-by: William Wu
> ---
> Changes in v2:
> -
Hi,
Roger Quadros writes:
> Implementations might use different IRQs for
> host, gadget and OTG so use named interrupt resources
> to allow Device tree to specify the 3 interrupts.
>
> Following are the interrupt names
>
> Peripheral Interrupt - peripheral
> HOST Interrupt - host
> OTG Interrupt
Hi João,
(please avoid top-posting ;)
Joao Pinto writes:
> Hi,
> Just to give you an update.
> All is working great, the cause was an FPGA configuration issue.
> Thank you for your support.
good to know :)
--
balbi
signature.asc
Description: PGP signature
Hi,
(please break lines at 80-columns and don't top-post ;)
Neil Armstrong writes:
> [ Unknown signature status ]
> Hi Felipe, Laurent,
>
> I submitted this driver for a Cadence IP library from a now abandoned
> project.
>
> The driver was working on a SoC platform ported on a FPGA, but I do
>
Hi,
William Wu writes:
> Hi Felipe,
>
> On 05/24/2016 05:32 PM, Felipe Balbi wrote:
>> Hi,
>>
>> William Wu writes:
>>> This patch documents the device tree documentation required for
>>> Rockchip USB3.0 core wrapper consist of USB3.0 IP from Syno
Hi,
Baolin Wang writes:
> When handling the endpoint interrupt handler, it maybe disable the endpoint
> from another core user to set the USB endpoint descriptor pointor to be NULL
> while issuing usb_gadget_giveback_request() function to release lock. So it
> will be one bug to check the endpoi
Hi,
Bin Liu writes:
> On Wed, May 25, 2016 at 02:18:34PM -0500, Bin Liu wrote:
>> [ 40.467381] =
>> [ 40.473013] [ INFO: possible recursive locking detected ]
>> [ 40.478651] 4.6.0-08691-g7f3db9a #37 Not tainted
>> [ 40.483466]
Hi,
Baolin Wang writes:
> Hi Felipe,
>
> On 26 May 2016 at 14:22, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Baolin Wang writes:
>>> When handling the endpoint interrupt handler, it maybe disable the endpoint
>>> from another core user to set the U
Hi,
Leo Li writes:
>>> On certain platforms (e.g. ARM64) the dma_ops needs to be explicitly set
>>> to be able to do DMA allocations, so use the of_dma_configure() helper
>>> to populate the dma properties and assign an appropriate dma_ops.
>>>
>>> Signed-off-by: Rajesh Bhagat
>>> Reviewed-by:
Hi,
Baolin Wang writes:
>> Also note that the usb_endpoint_xfer_isoc() call on line 2067 of
>> gadget.c (as in my testing/next from today) won't even get executed, so
>> we're safe there.
>
> Never will be executed? then we can remove the
> usb_endpoint_xfer_isoc() (line 2025) at risk?
>
> 20
Hi,
Baolin Wang writes:
> On 26 May 2016 at 17:45, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Baolin Wang writes:
>>
>>
>>
>>>> Also note that the usb_endpoint_xfer_isoc() call on line 2067 of
>>>> gadget.c (as in my testi
Hi,
Mathias Nyman writes:
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index d86da81..c7c9521 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -3098,6 +3098,27 @@ static u32 xhci_td_remainder(struct xhci_hcd *xhci,
> int trans
Hi,
Mathias Nyman writes:
> TD fragments section 4.11.7.1 in xhci specs have additional requirements
> on how trbs in TDs must be organized.
>
> TD fragments shall not span transfer ring segments and TD fragments must
> be packet aligned. Normally we don't care about TD fragments, on TD is one
>
Hi,
Mathias Nyman writes:
> @@ -3098,24 +3136,66 @@ static u32 xhci_td_remainder(struct xhci_hcd *xhci,
> int transferred,
> return (total_packet_count - ((transferred + trb_buff_len) / maxp));
> }
>
> +
> static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32
> enqd_le
>> Bin Liu writes:
>> > On Wed, May 25, 2016 at 02:18:34PM -0500, Bin Liu wrote:
>> >> [ 40.467381] =
>> >> [ 40.473013] [ INFO: possible recursive locking detected ]
>> >> [ 40.478651] 4.6.0-08691-g7f3db9a #37 Not tainted
>> >> [ 40.483466] ---
Hi,
William Wu writes:
> Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit,
> which specifies whether the USB2.0 PHY provides a free-running
> PHY clock, which is active when the clock control input is active.
>
> Signed-off-by: William Wu
can you rebase on top of my testing/next? We'
Hi,
Krzysztof Kozlowski writes:
> On 05/27/2016 01:46 PM, Steinar H. Gunderson wrote:
>> On Fri, May 27, 2016 at 03:23:35PM +0530, Vivek Gautam wrote:
>>> I don't have any concerns with the patch apart from the ones
>>> Krzysztof has already pointed out.
>>> LGTM.
>>
>> Should I repost the patc
Hi,
"Steinar H. Gunderson" writes:
> On Fri, May 27, 2016 at 04:12:59PM +0300, Felipe Balbi wrote:
>> yes, please do that. Keep in mind, also, that we're still in the middle
>> of the merge window and nothing will really happen until v4.7-rc1 is
>> tagged.
Hi,
Leo Li writes:
>> Leo Li writes:
> On certain platforms (e.g. ARM64) the dma_ops needs to be explicitly set
> to be able to do DMA allocations, so use the of_dma_configure() helper
> to populate the dma properties and assign an appropriate dma_ops.
>
> Signed-off-by: Raj
Hi Janusz,
(good to see your email here)
Janusz Dziedzic writes:
> On 19 May 2016 at 09:08, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Paul Zimmerman writes:
>>> Felipe Balbi writes:
>>>
>>>> If we're going to issue a Update Transfer
Hi,
Mason writes:
> Hello everyone,
>
> I'm working on a SoC which embeds an IP block from GDA Technologies
> labeled "Pravega USB3 SuperSpeed Controller" (data-sheet is v0.99r
> dated 2014-01-29). A cursory search returns:
>
> http://www.sourcing.co.jp/prod_ip.htm
> http://www.sourcing.co.jp/pr
Hi,
Heikki Krogerus writes:
> Hi Felipe,
>
> On Tue, Apr 19, 2016 at 02:10:45PM +0300, Heikki Krogerus wrote:
>> This should allow xhci to remove handling of platform data.
>>
>> Signed-off-by: Heikki Krogerus
>> Cc: Felipe Balbi
>
> Is this OK n
Hi,
Mason writes:
> Hello Felipe,
>
> On 30/05/2016 08:58, Felipe Balbi wrote:
>
>> Mason writes:
>>
>>> I'm working on a SoC which embeds an IP block from GDA Technologies
>>> labeled "Pravega USB3 SuperSpeed Controller" (data-sheet
Hi,
Heikki Krogerus writes:
> On Mon, May 30, 2016 at 11:12:40AM +0300, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Heikki Krogerus writes:
>> > Hi Felipe,
>> >
>> > On Tue, Apr 19, 2016 at 02:10:45PM +0300, Heikki Krogerus wrote:
>> &
valid range for storage buffers is encoded in
Kconfig already. Instead of checking again, let's
drop fsg_num_buffers_validate() altogether.
Signed-off-by: Felipe Balbi
---
drivers/usb/gadget/function/f_mass_storage.c | 22 +-
1 file changed, 1 insertion(+), 21 dele
I have on testing/next and
really report problems. For PM runtime, if anybody has issues, I guess I can
keep it enabled but forbidden so users have to echo "auto" > //power/control
But, hey, PM runtime is working fine for me here.
Again, sorry for the patch bomb folks :-s
with LPM
enabled.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index db7bbbd0cecd..eca131f0be59 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/
now that we have re-factored dwc3_core_init() and
dwc3_core_exit() we can use them for suspend/resume
operations.
This will help us avoid some common mistakes when
patching code when we have duplicated pieces of code
doing the same thing.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c
as it turns out, we don't need the extra 'start_new'
argument as that can be inferred from DWC3_EP_BUSY
flag.
Because of that, we can simplify
__dwc3_gadget_kick_transfer() by quite a bit, even
allowing us to prepare more TRBs unconditionally.
Signed-off-by: Felipe Balbi
---
d
When we send an endpoint command, we want that to
complete as soon as possible, so let's remove the
unnecessary udelay(1) call.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gad
that macro is unnecessary and just adds pointless
obfuscation. Let's remove it.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index a590cd225bb7..245f4ff
umber];
to just passing struct dwc3_ep *dep as argument.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 8
drivers/usb/dwc3/ep0.c| 5 ++---
drivers/usb/dwc3/gadget.c | 33 +
3 files changed, 23 insertions(+), 23 deletions(-)
diff --gi
sg_is_last() and list_is_last() will encode the
required information for the driver to make
decisions WRT CHN and LST bits.
While at that, also replace '1' with 'true' for
consistency.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 10 +-
1 file changed
Instead of using burst size to configure NUMP, we
should be using RxFIFO Size instead. DWC3 is smart
enough to know that it shouldn't burst in case burst
size is 0.
Reported-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 12 +++
drivers/usb/dwc3/gadget.c
implemented once we decide to support hibernation,
which is to allow runtime_suspend with cable
connected when bus is in U3. That's subject to a
separate patch, however.
Tested-by: Baolin Wang
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c
by holding gadget's IRQ number in dwc->irq_gadget,
it'll be simpler to free_irq() and disable the IRQ
in case an IRQ fires while we are runtime suspended.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 2 ++
drivers/usb/dwc3/gadget.c | 5 ++---
2 files changed, 4 ins
: Felipe Balbi
---
drivers/usb/gadget/udc/Kconfig | 4 +++-
drivers/usb/gadget/udc/net2280.c | 51 +++-
drivers/usb/gadget/udc/net2280.h | 1 +
3 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget
we will be re-using it for suspend/resume, so
instead of duplicating code, let's just re-factor
the functions so they can be re-used.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 90 ++-
1 file changed, 49 insertions(+), 41 dele
ring, we check if we have space to wrap around
the ring properly.
Note that this only happens when our enqueue and
dequeue pointers are equal (which is the case for
bulk endpoints after an XferComplete event).
Signed-off-by: Felipe Balbi
---
drive
As a micro-power optimization, let's only resume the
USB2 PHY if we're working on <=HIGHSPEED. If we're
gonna work on SUPERSPEED or SUPERSPEED+, there's no
point in resuming the USB2 PHY.
Fixes: 2b0f11df84bb ("usb: dwc3: gadget: clear SUSPHY bit before ep cmds&q
To aid code readability, we're gonna split
__dwc3_gadget_kick_transfer() into its constituent
parts: scatter gather and linear buffers.
That way, it's easier to follow the code and focus
debug effort when one or the other fails.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadg
e our debugfs interface and io
accessors need to be changed accordingly.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h| 13 +++-
drivers/usb/dwc3/debugfs.c | 190 ++---
drivers/usb/dwc3/ep0.c | 4 +-
drivers/usb/dwc3/gadget.c
rease
maximum number of storage buffers to a ridiculous
amount (256) so that anybody wanting to test maximum
achievable throughput can do so.
Signed-off-by: Felipe Balbi
---
drivers/usb/gadget/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/Kcon
rnation is only useful for runtime
PM, not system sleep.
While at that, also remove dwc3.dcfg which has been
rendered unnecessary.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 1 -
drivers/usb/dwc3/gadget.c | 44
2 files changed, 12
nal commit and
making sure that we check for isochronous endpoints.
Fixes: f3af36511e60 ("usb: dwc3: gadget: always enable IOC
on bulk/interrupt transfers")
Cc:
Signed-off-by: Konrad Leszczynski
Signed-off-by: Rafal Redzimski
Signed-off-by: Felipe Balbi
---
drivers/u
From: John Youn
The TRBs left calculation didn't account for the link TRB taking up one
spot.
If the trb_dequeue < trb_enqueue, then the result includes the link
TRB slot so it must be adjusted.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c |
Instead of printing command's status with a separate
trace printout, let's print it within a single call.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/debug.h | 16
drivers/usb/dwc3/gadget.c | 8 +---
drivers/usb/dwc3/trace.h | 15 +--
3 files c
From: John Youn
If the trb->enqueue == trb->dequeue, then it could be full or empty.
This could also happen at TRB index 0, so modify the check to handle
that condition. At index 0, the previous TRB is the one just before the
link TRB.
Signed-off-by: John Youn
Signed-off-by: Felipe
From: John Youn
Cleans up the sparse warning:
warning: dubious: x | !y
Since we do want a bitwise OR here, don't use a logical (true/false)
value. Probably is not a real issue but it cleans up the warning.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gad
This will allow us to process several endpoints at a
time by making sure that we lock only shared
resources.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 2 ++
drivers/usb/dwc3/gadget.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb
Allow for dwc3-pci to reach D3 and enable pm_runtime
by providing dummy PM hooks. Without them, PCI
subsystem won't put device to D3.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/dwc3-pci.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/drivers/usb
We want commands to finish ASAP, so let's remove
that udelay() call.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index f384ad379234..5cec5811169a 100644
--- a/driver
From: John Youn
Sparse complains even though it looks ok. Probably it cannot detect that
the wValue, wIndex, and wLength are declared __le16 due to the macro
magic.
Redeclare them as CPU endianness and make the conversion on assignment.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
From: John Youn
If trbs_left == 0, we don't have any space left in the TRB ring so don't
prepare anything.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/driver
From: John Youn
The DWC3_USB31_REVISION_110A macro uses an invalid constant name in its
definition. This is currently not used.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb
We don't need the extra %s when command fails.
Let's remove it
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 770664c9c83e..efb758e5c6c7 10
this bit can be reset to
default 0 after the core reset. Dump GUCTL1 reg from
debugfs is more convenient for us.
Signed-off-by: William Wu
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h| 1 +
drivers/usb/dwc3/debugfs.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers
negligible
added benefit.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 65184d9480e8..770664c9c83e 100644
--- a/drivers/usb/dwc3/gadget.c
u need to
mod the result by DWC3_TRB_NUM.
For example the same calculation with DWC3_TRB_NUM = 8, results in:
255 % 6 = 7 TRBs left.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drive
From: John Youn
Correct the use of the DWC3_DSTS_XXX_SPEED and DWC3_DCFG_XXX_SPEED
macros. The wrong set of macros were being used in a few places.
This is only a cosmetic change as the values for both sets are
identical.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb
this patch is in preparation for some further
re-factoring in dwc3 initialization. No functional
changes.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c | 16 +++-
drivers/usb/dwc3/core.h | 2 ++
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/usb
's
avoid the problem by simply returning early if we
have a NULL descriptor.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index
From: John Youn
u2sel and u2pel should be __le16. Doesn't fix any issue.
Found with sparse.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/ep0.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/
rting point.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c | 118
1 file changed, 60 insertions(+), 58 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 1f4ac355f384..cbdefbb3d302 100644
--- a/drivers/usb
instead of having infinite loop and always checking
timeout value as a break condition, we can just
decrement timeout inside while's condition.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --
From: John Youn
Clears out all the TRBs in the ring to clean up any stale data that
might be in them from the previous time the endpoint was enabled.
Also removed the existing clear of the LINK trb since the entire ring is
cleard just before.
Signed-off-by: John Youn
Signed-off-by: Felipe
Just like we did for endpoint commands, let's have a
single trace output for the command and its
status. This will improve trace readability
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/debug.h | 14 ++
drivers/usb/dwc3/gadget.c | 14 ++
drivers/usb/dwc3/tr
From: John Youn
The wIndex passed in here is CPU endianness, but the function expects
little endian.
Found with sparse.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/ep0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/ep0.c
From: John Youn
Make the skipping of the link TRBS built-in to the increment operation.
This simplifies the code wherever we increment the trb index and ensures
that we never end up pointing to a link trb.
Signed-off-by: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c
This will make it more human-friendly to read trace
output from dwc3.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/debug.h | 110 +--
drivers/usb/dwc3/ep0.c | 7 +--
drivers/usb/dwc3/trace.h | 3 +-
3 files changed, 92 insertions(+), 28
Just like we did for endpoint commands, let's use a
single return point for generic commands as
well. This aids readability.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/usb
means that bit is set, while
lowercase letter means bit is cleared.
Signed-off-by: Janusz Dziedzic
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/trace.h | 40 ++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/trace.h b/drivers
ned-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index fd3a52a8cbaf..44dbb9bbdc8f 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -860,7 +86
If we don't, we will overwrite valid TRBs.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index c42786ff4752..3d0745dece0c 100644
--- a/drivers/usb/dwc3/gad
Now we can try to issue Update Transfer every time
gadget driver queues a new request. This will make
sure we keep controller's queue busy for as long as
possible.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --
Instead of relying on empty list of queued requests,
let's rely on the number of incomplete requests
actually in traffic.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/driver
According to SNPS databook, we need to pass transfer
resource on update transfer command, let's do it.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
We will be using this information to change how we
figure out when we need LST bit. For now, just
update our counters.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.h | 4
drivers/usb/dwc3/gadget.c | 7 +++
drivers/usb/dwc3/trace.h | 9 +++--
3 files changed, 18
From: Roger Quadros
On OMAPs, OTG events come on the same IRQ so we need to share
this IRQ with the OTG device driver.
Signed-off-by: Roger Quadros
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/dwc3-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb
From: Heikki Krogerus
No more users for it.
Tested-by: John Youn
Signed-off-by: Heikki Krogerus
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/core.c | 35 --
drivers/usb/dwc3/platform_data.h | 53
2 files changed
From: Heikki Krogerus
This should allow the core driver to drop handling of
platform data and expect the platform specific details to
always come from properties.
Tested-by: John Youn
Signed-off-by: Heikki Krogerus
Cc: Huang Rui
CC: John Youn
Signed-off-by: Felipe Balbi
---
drivers/usb
Let's only set LST bit when we run out of space in
our TRB ring. For all other cases, we keep LST bit
unset which will prevent constant allocation and
deallocation of endpoint transfer resources.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 20 ++--
1 file ch
We don't need this IRQ anymore.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 7a0c787cecdd..613dde9fb538 100644
--- a/drivers/usb/dwc3/gadget.c
n the USB2 VBUS status fields in the same register."
Signed-off-by: Roger Quadros
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/dwc3-omap.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
ind
when passing strings to trace, we don't need the
trailing newline character. Trace already appends a
newline character automatically.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/ep0.c| 4 ++--
drivers/usb/dwc3/gadget.c | 32
2 files change
igned-off-by: Roger Quadros
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/dwc3-omap.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 046bb379120e..29e80cc9b634 100644
--- a/drivers/usb/dwc3
he OTG IRQ handler's
IRQ flags.
NOTE: OTG IRQ handler is yet to be added. This is a preparatory step.
Signed-off-by: Roger Quadros
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/dwc3-omap.c | 32 ++--
1 file changed, 26 insertions(+), 6 deletions(-)
diff --gi
Hi,
Roger Quadros writes:
> On 30/05/16 14:35, Felipe Balbi wrote:
>> this patch implements the most basic pm_runtime
>> support for dwc3. Whenever USB cable is dettached,
>> then we will allow core to runtime_suspend.
>>
>> Runtime suspending will involve
This is mostly cosmetic. usb_ep_disable(), which
will be called by ->reset(), should force transfers
to be stopped. We're just making sure it runs before
that.
Signed-off-by: Felipe Balbi
---
drivers/usb/dwc3/gadget.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
Instead of looping through all endpoints when
enabling ep0, let's allow for each endpoint to set
its own xfer resource. This solves an issue which
happens when we issue END_TRANSFER due to a reset
interrupt. Endpoints will be left without a xfer
resource to use.
Signed-off-by: Felipe
Hi John,
John Youn writes:
> As of core revision 2.60a the recommended programming model is to set
> the ClearPendIN bit when issuing a Clear Stall EP command for IN
> endpoints. This is to prevent an issue where some (non-compliant) hosts
> may not send ACK TPs for pending IN transfers due to a
Hi,
Michal Nazarewicz writes:
> Fixes all of the unused-but-set-variable warnings enabled when
> building with W=1. As described in the first patch, some warnings are
> left off. See said patch for more description.
>
> Michal Nazarewicz (4):
> usb: gadget: fix unused-but-set-variale warning
Hi,
John Youn writes:
> The following patch series fixes up isochronous support for the dwc2
> gadget. The existing isochronous support lacked a few features. Most
> notably it did not properly sync up with the first packet and it
> didn't handle the Incomplete ISO IN/OUT interrupts.
>
> These p
instead of defining all functions as static inlines,
let's move them to udc-core and export them with
EXPORT_SYMBOL_GPL, that way we can make sure that
only GPL drivers will use them.
As a side effect, it'll be nicer to add tracepoints
to the gadget API.
Signed-off-by: Felipe Balbi
--
same.
Signed-off-by: Felipe Balbi
---
drivers/usb/gadget/udc/Makefile | 5 +
drivers/usb/gadget/udc/{udc-core.c => core.c} | 260 +-
drivers/usb/gadget/udc/trace.c| 18 ++
drivers/usb/gadget/udc/trace.h|
instead of defining all functions as static inlines,
let's move them to udc-core and export them with
EXPORT_SYMBOL_GPL, that way we can make sure that
only GPL drivers will use them.
As a side effect, it'll be nicer to add tracepoints
to the gadget API.
Signed-off-by: Felipe Balbi
--
Hi guys,
I'm getting a weird behavior with g_mass_storage which I'm yet to verify
if it's a g_mass_storage bug on XHCI bug. So far it points to
g_mass_storage. Below you can see a commented set of trace data (see the
2-patch series I just sent):
[...]
> file-storage-1252 [003] ...1 254.79366
Hi,
Felipe Balbi writes:
>> irq/17-dwc3-1253 [000] d..1 315.944886: usb_gadget_vbus_draw: speed 5/5
>> state 7 0mA [sg:out_aligned:self-powered:activated:connected] --> -95
>> file-storage-1252 [003] ...1 315.945556: usb_ep_fifo_flush: ep1in: mps
>> 1024/1024
101 - 200 of 8014 matches
Mail list logo