All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Pierre LE MAGOUROU <plemagourou@softbankrobotics.com>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>,
	Julien Massot <jmassot@softbankrobotics.com>,
	Manu Gautam <mgautam@codeaurora.org>,
	andy.gross@linaro.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	dianders@chromium.org, linux-usb@vger.kernel.org,
	gregkh@linuxfoundation.org, bjorn.andersson@linaro.org
Subject: Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB
Date: Wed, 27 Jun 2018 15:30:12 +0300	[thread overview]
Message-ID: <87in64s97v.fsf@linux.intel.com> (raw)
In-Reply-To: <CADb+VZJVtfgSDD+7F1J6p2YG0dguN7BhP=bzz3r8jO7FT7dk8w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]


Hi,

Pierre LE MAGOUROU <plemagourou@softbankrobotics.com> writes:
>> >> Thanks a lot,
>> >> I will test this branch.
>> >>
>> >>
>> > I just tested USB gadget with this branch on the db820c.
>> >
>> > If I activate a USB composite gadget device with EEM function, I can see
>> > the 'usb0' Ethernet interfaces on the device and on the host and I can
>> ping
>> > the db820c from the host.
>> > When I create a USB composite gadget device with UAC2 function, I can see
>> > the audio cards on host and device but cannot play or record any sound.
>> >
>> > While looking at dwc3 traces with Ftrace, I noticed that the dwc3 driver
>> is
>> > stuck on wait_event_lock_irq() in dwc3_gadget_ep_dequeue() function when
>> I
>> > use UAC2 gadget.
>>
>> can you share tracepoint data?
>>
>>
> Here are the trace results when I start the UAC2 gadget device (all dwc3
> functions and events are activated) : https://pastebin.com/NBP3tM8N
> The last line you see "before wait_event EP_END_TRANSFER_PENDING" is a
> trace_printk I added just before wait_event_lock_irq(). I also have a
> trace_printk after the wait_event_lock_irq() that is never called.

looks like we need to do away with the wait_event_lock_irq()
call. usb_ep_dequeue() can be called from within the controller's
interrupt handler, so we can't rely on wait_event_lock_irq(). I guess
the best thing here would be to mark TRBs as dirty (and not increment
dequeue pointer), so they aren't reused by accident, then let endpoint
continue processing. Once command completion interrupt fires, we
increment dequeue pointer.

This should work better, I suppose. Do you want a shot at implementing
this?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

WARNING: multiple messages have this Message-ID
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Pierre LE MAGOUROU <plemagourou@softbankrobotics.com>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>,
	Julien Massot <jmassot@softbankrobotics.com>,
	Manu Gautam <mgautam@codeaurora.org>,
	andy.gross@linaro.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	dianders@chromium.org, linux-usb@vger.kernel.org,
	gregkh@linuxfoundation.org, bjorn.andersson@linaro.org
Subject: [v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB
Date: Wed, 27 Jun 2018 15:30:12 +0300	[thread overview]
Message-ID: <87in64s97v.fsf@linux.intel.com> (raw)

Hi,

Pierre LE MAGOUROU <plemagourou@softbankrobotics.com> writes:
>> >> Thanks a lot,
>> >> I will test this branch.
>> >>
>> >>
>> > I just tested USB gadget with this branch on the db820c.
>> >
>> > If I activate a USB composite gadget device with EEM function, I can see
>> > the 'usb0' Ethernet interfaces on the device and on the host and I can
>> ping
>> > the db820c from the host.
>> > When I create a USB composite gadget device with UAC2 function, I can see
>> > the audio cards on host and device but cannot play or record any sound.
>> >
>> > While looking at dwc3 traces with Ftrace, I noticed that the dwc3 driver
>> is
>> > stuck on wait_event_lock_irq() in dwc3_gadget_ep_dequeue() function when
>> I
>> > use UAC2 gadget.
>>
>> can you share tracepoint data?
>>
>>
> Here are the trace results when I start the UAC2 gadget device (all dwc3
> functions and events are activated) : https://pastebin.com/NBP3tM8N
> The last line you see "before wait_event EP_END_TRANSFER_PENDING" is a
> trace_printk I added just before wait_event_lock_irq(). I also have a
> trace_printk after the wait_event_lock_irq() that is never called.

looks like we need to do away with the wait_event_lock_irq()
call. usb_ep_dequeue() can be called from within the controller's
interrupt handler, so we can't rely on wait_event_lock_irq(). I guess
the best thing here would be to mark TRBs as dirty (and not increment
dequeue pointer), so they aren't reused by accident, then let endpoint
continue processing. Once command completion interrupt fires, we
increment dequeue pointer.

This should work better, I suppose. Do you want a shot at implementing
this?

  parent reply	other threads:[~2018-06-27 12:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 10:47 Manu Gautam
2018-05-31 10:47 ` [v2] " Manu Gautam
2018-06-07  8:30 ` [PATCH v2] " Vivek Gautam
2018-06-07  8:30   ` [v2] " Vivek Gautam
2018-06-11  6:36   ` [PATCH v2] " Julien Massot
2018-06-11  6:36     ` [v2] " Julien Massot
2018-06-11  7:01     ` [PATCH v2] " Vivek Gautam
2018-06-11  7:01       ` [v2] " Vivek Gautam
2018-06-11 12:33       ` [PATCH v2] " Julien Massot
2018-06-11 12:33         ` [v2] " Julien Massot
     [not found]         ` <CADb+VZKtAspuvO64FVEBHUbcB0Nr57jWpBmpS5GfCE+QKD4CcA@mail.gmail.com>
2018-06-27  9:27           ` [PATCH v2] " Felipe Balbi
2018-06-27  9:27             ` [v2] " Felipe Balbi
     [not found]             ` <CADb+VZJVtfgSDD+7F1J6p2YG0dguN7BhP=bzz3r8jO7FT7dk8w@mail.gmail.com>
2018-06-27 12:30               ` Felipe Balbi [this message]
2018-06-27 12:30                 ` Felipe Balbi
2018-07-10 15:03                 ` [PATCH v2] " Pierre Le Magourou
2018-07-10 15:03                   ` [v2] " lemagoup
2018-06-26  9:37   ` [PATCH v2] " Manu Gautam
2018-06-26  9:37     ` [v2] " Manu Gautam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in64s97v.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmassot@softbankrobotics.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    --cc=plemagourou@softbankrobotics.com \
    --cc=vivek.gautam@codeaurora.org \
    --subject='Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.