From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: George Cherian <george.cherian@ti.com>, linux-usb@vger.kernel.org
Cc: balbi@ti.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] usb: musb: musb_cppi41: Handle ISOCH differently and not use the hrtimer.
Date: Fri, 24 Jan 2014 21:46:31 +0400 [thread overview]
Message-ID: <52E2A6F7.7010301@cogentembedded.com> (raw)
In-Reply-To: <1390572895-26428-4-git-send-email-george.cherian@ti.com>
Hello.
On 24-01-2014 18:14, George Cherian wrote:
> In case of ISOCH transfers the hrtimer workaround for the hardware issue
> is not very reliable. Instead of checking musb_is_tx_fifo_empty() in hrtimer
> routine, schedule a completion work and check the same in completion work.
> Signed-off-by: George Cherian <george.cherian@ti.com>
> ---
> drivers/usb/musb/musb_cppi41.c | 54 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 53 insertions(+), 1 deletion(-)
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index 39ee516..8075562 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
[...]
> @@ -165,6 +178,32 @@ static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel)
> }
> }
>
> +static void cppi_trans_done_work(struct work_struct *work)
> +{
> + unsigned long flags;
> + struct cppi41_dma_channel *cppi41_channel =
> + container_of(work, struct cppi41_dma_channel, dma_completion);
> + struct cppi41_dma_controller *controller = cppi41_channel->controller;
> + struct musb *musb = controller->musb;
> + struct musb_hw_ep *hw_ep = cppi41_channel->hw_ep;
> + bool empty;
> +
> + if (!cppi41_channel->is_tx && is_isoc(hw_ep, 1)) {
> + spin_lock_irqsave(&musb->lock, flags);
> + cppi41_trans_done(cppi41_channel);
> + spin_unlock_irqrestore(&musb->lock, flags);
This *if* arm is clearly over-indented by one tab. Compare with below
*else* arm.
> + } else {
> + empty = musb_is_tx_fifo_empty(hw_ep);
> + if (empty) {
> + spin_lock_irqsave(&musb->lock, flags);
> + cppi41_trans_done(cppi41_channel);
> + spin_unlock_irqrestore(&musb->lock, flags);
> + } else {
> + schedule_work(&cppi41_channel->dma_completion);
> + }
> + }
> +}
> +
WBR, Sergei
next prev parent reply other threads:[~2014-01-24 17:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 14:14 [PATCH 0/3] Enable ISOCH IN handling for AM335x George Cherian
2014-01-24 14:14 ` [PATCH 1/3] usb: musb: musb_host: Enable ISOCH IN handling for AM335x host George Cherian
2014-01-24 17:43 ` Sergei Shtylyov
2014-01-27 9:21 ` George Cherian
2014-01-27 12:44 ` Sergei Shtylyov
2014-01-24 14:14 ` [PATCH 2/3] usb: musb: musb_cppi41: Make CPPI aware of high bandwidth transfers George Cherian
2014-01-24 14:14 ` [PATCH 3/3] usb: musb: musb_cppi41: Handle ISOCH differently and not use the hrtimer George Cherian
2014-01-24 17:46 ` Sergei Shtylyov [this message]
2014-01-27 9:24 ` George Cherian
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=52E2A6F7.7010301@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=george.cherian@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox