* [PATCH] usb: musb: fix bug in musbhsdma programming
@ 2009-01-08 12:31 Ajay Kumar Gupta
2009-01-23 10:18 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: Ajay Kumar Gupta @ 2009-01-08 12:31 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, david-b, felipe.balbi, Ajay Kumar Gupta
Mode bit should be set based on function parameter "mode" of
configure_channel() function.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
---
drivers/usb/musb/musbhsdma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index a23d005..d87c6c7 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -225,13 +225,14 @@ static void configure_channel(struct dma_channel *channel,
csr |= MUSB_HSDMA_BURSTMODE_INCR4;
csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
- | MUSB_HSDMA_MODE1
| MUSB_HSDMA_ENABLE
| MUSB_HSDMA_IRQENABLE
| (musb_channel->transmit
? MUSB_HSDMA_TRANSMIT
: 0);
+ if (mode)
+ csr |= MUSB_HSDMA_MODE1;
/* address/count */
musb_write_hsdma_addr(mbase, bchannel, dma_addr);
musb_write_hsdma_count(mbase, bchannel, len);
--
1.5.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: musb: fix bug in musbhsdma programming
2009-01-08 12:31 [PATCH] usb: musb: fix bug in musbhsdma programming Ajay Kumar Gupta
@ 2009-01-23 10:18 ` Felipe Balbi
2009-01-23 18:36 ` David Brownell
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2009-01-23 10:18 UTC (permalink / raw)
To: ext Ajay Kumar Gupta; +Cc: linux-usb, linux-omap, david-b, felipe.balbi
On Thu, Jan 08, 2009 at 06:01:36PM +0530, Ajay Kumar Gupta wrote:
> Mode bit should be set based on function parameter "mode" of
> configure_channel() function.
>
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
> drivers/usb/musb/musbhsdma.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index a23d005..d87c6c7 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -225,13 +225,14 @@ static void configure_channel(struct dma_channel *channel,
> csr |= MUSB_HSDMA_BURSTMODE_INCR4;
>
> csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
> - | MUSB_HSDMA_MODE1
> | MUSB_HSDMA_ENABLE
> | MUSB_HSDMA_IRQENABLE
> | (musb_channel->transmit
> ? MUSB_HSDMA_TRANSMIT
> : 0);
>
> + if (mode)
> + csr |= MUSB_HSDMA_MODE1;
> /* address/count */
> musb_write_hsdma_addr(mbase, bchannel, dma_addr);
> musb_write_hsdma_count(mbase, bchannel, len);
> --
> 1.5.6
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: musb: fix bug in musbhsdma programming
2009-01-23 10:18 ` Felipe Balbi
@ 2009-01-23 18:36 ` David Brownell
[not found] ` <200901231036.04376.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-01-24 3:04 ` Gupta, Ajay Kumar
0 siblings, 2 replies; 7+ messages in thread
From: David Brownell @ 2009-01-23 18:36 UTC (permalink / raw)
To: felipe.balbi; +Cc: ext Ajay Kumar Gupta, linux-usb, linux-omap
On Friday 23 January 2009, Felipe Balbi wrote:
> On Thu, Jan 08, 2009 at 06:01:36PM +0530, Ajay Kumar Gupta wrote:
> > Mode bit should be set based on function parameter "mode" of
> > configure_channel() function.
> >
> > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
>
> Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
NAK -- interpretation of the MODE parameter is correct
(though it's not clear to me that the callers set it right),
but this won't apply to current GIT since the code differs.
I don't know what this is *against* but it's not mainline
or the OMAP tree...
csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
| (1 << MUSB_HSDMA_ENABLE_SHIFT)
| (1 << MUSB_HSDMA_IRQENABLE_SHIFT)
| (musb_channel->transmit
? (1 << MUSB_HSDMA_TRANSMIT_SHIFT)
: 0);
Ajay, if this needs to merge to mainline (e.g. so it can be
pulled down to omap-git and fix DMA there) please re-issue.
- Dave
>
> > ---
> > drivers/usb/musb/musbhsdma.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> > index a23d005..d87c6c7 100644
> > --- a/drivers/usb/musb/musbhsdma.c
> > +++ b/drivers/usb/musb/musbhsdma.c
> > @@ -225,13 +225,14 @@ static void configure_channel(struct dma_channel *channel,
> > csr |= MUSB_HSDMA_BURSTMODE_INCR4;
> >
> > csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
> > - | MUSB_HSDMA_MODE1
> > | MUSB_HSDMA_ENABLE
> > | MUSB_HSDMA_IRQENABLE
> > | (musb_channel->transmit
> > ? MUSB_HSDMA_TRANSMIT
> > : 0);
> >
> > + if (mode)
> > + csr |= MUSB_HSDMA_MODE1;
> > /* address/count */
> > musb_write_hsdma_addr(mbase, bchannel, dma_addr);
> > musb_write_hsdma_count(mbase, bchannel, len);
> > --
> > 1.5.6
>
> --
> balbi
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: musb: fix bug in musbhsdma programming
[not found] ` <200901231036.04376.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2009-01-23 18:38 ` Felipe Balbi
2009-01-23 18:50 ` David Brownell
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2009-01-23 18:38 UTC (permalink / raw)
To: David Brownell
Cc: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w, Ajay Kumar Gupta,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
On Fri, Jan 23, 2009 at 10:36:04AM -0800, David Brownell wrote:
> On Friday 23 January 2009, Felipe Balbi wrote:
> > On Thu, Jan 08, 2009 at 06:01:36PM +0530, Ajay Kumar Gupta wrote:
> > > Mode bit should be set based on function parameter "mode" of
> > > configure_channel() function.
> > >
> > > Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
> >
> > Acked-by: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
>
> NAK -- interpretation of the MODE parameter is correct
> (though it's not clear to me that the callers set it right),
> but this won't apply to current GIT since the code differs.
hmmm.. don't get what you mean. If mode parameter in channel_program()
is true, that means channel->desired_mode should be true and we're
trying to kick mode1 dma, isn't it ??
But true, should be re-issued
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: musb: fix bug in musbhsdma programming
2009-01-23 18:38 ` Felipe Balbi
@ 2009-01-23 18:50 ` David Brownell
0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2009-01-23 18:50 UTC (permalink / raw)
To: me-uiRdBs8odbtmTBlB0Cgj/Q
Cc: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w, Ajay Kumar Gupta,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
On Friday 23 January 2009, Felipe Balbi wrote:
>
> > NAK -- interpretation of the MODE parameter is correct
> > (though it's not clear to me that the callers set it right),
> > but this won't apply to current GIT since the code differs.
>
> hmmm.. don't get what you mean. If mode parameter in channel_program()
> is true, that means channel->desired_mode should be true and we're
> trying to kick mode1 dma, isn't it ??
What I mean is: you're working on "mode1 DMA"
(multiple packets per request, the only sane mode,
when it works) ... and I know you've had a hard time
getting it all to behave. Ergo it's not clear to me
that Ajay's patch could be sufficient. If it were,
then you've been spending a LOT of time on something
very simple ... ;)
The "desired_mode" thing is confusing too; it's
TX vs RX, unrelated to "mode1" or "mode0", but
that's a separate naming issue.
- Dave
>
> But true, should be re-issued
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] usb: musb: fix bug in musbhsdma programming
2009-01-23 18:36 ` David Brownell
[not found] ` <200901231036.04376.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2009-01-24 3:04 ` Gupta, Ajay Kumar
[not found] ` <19F8576C6E063C45BE387C64729E739403FA6CCD3A-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Gupta, Ajay Kumar @ 2009-01-24 3:04 UTC (permalink / raw)
To: David Brownell, felipe.balbi@nokia.com
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
> On Thu, Jan 08, 2009 at 06:01:36PM +0530, Ajay Kumar Gupta wrote:
> > Mode bit should be set based on function parameter "mode" of
> > configure_channel() function.
> >
> > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
>
> Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
> NAK -- interpretation of the MODE parameter is correct
> (t hough it's not clear to me that the callers set it right),
> but this won't apply to current GIT since the code differs.
> I don't know what this is *against* but it's not mainline
> or the OMAP tree...
> csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
> | (1 << MUSB_HSDMA_ENABLE_SHIFT)
> | (1 << MUSB_HSDMA_IRQENABLE_SHIFT)
> | (musb_channel->transmit
> ? (1 << MUSB_HSDMA_TRANSMIT_SHIFT)
> : 0);
>Ajay, if this needs to merge to mainline (e.g. so it can be
>pulled down to omap-git and fix DMA there) please re-issue.
This patch is not for mainline.
It is intended for MV's OMAP GIT to solve the bug introduced by [1] below
and is already applied at [2], the modified version of this patch.
As [1] is not yet gone to mainline so this patch is also not required in mainline.
[1] usb: musb: musbhsdma cleanup
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6-historic.git;a=commitdiff;h=cd66af4a8d9ea5923e9e935a9d6fb7bded6e1655
[2]usb: musb: fix bug in musbhsdma programming
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6-historic.git;a=commitdiff;h=15f75b6226c2d3b82062bb721e7cb9a1d6f35efd
-Ajay
>- Dave
>
> > ---
> > drivers/usb/musb/musbhsdma.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> > index a23d005..d87c6c7 100644
> > --- a/drivers/usb/musb/musbhsdma.c
> > +++ b/drivers/usb/musb/musbhsdma.c
> > @@ -225,13 +225,14 @@ static void configure_channel(struct dma_channel *channel,
> > csr |= MUSB_HSDMA_BURSTMODE_INCR4;
> >
> > csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
> > - | MUSB_HSDMA_MODE1
> > | MUSB_HSDMA_ENABLE
> > | MUSB_HSDMA_IRQENABLE
> > | (musb_channel->transmit
> > ? MUSB_HSDMA_TRANSMIT
> > : 0);
> >
> > + if (mode)
> > + csr |= MUSB_HSDMA_MODE1;
> > /* address/count */
> > musb_write_hsdma_addr(mbase, bchannel, dma_addr);
> > musb_write_hsdma_count(mbase, bchannel, len);
> > --
> > 1.5.6
>
> --
> balbi
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: musb: fix bug in musbhsdma programming
[not found] ` <19F8576C6E063C45BE387C64729E739403FA6CCD3A-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2009-01-24 4:31 ` David Brownell
0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2009-01-24 4:31 UTC (permalink / raw)
To: Gupta, Ajay Kumar
Cc: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Friday 23 January 2009, Gupta, Ajay Kumar wrote:
> This patch is not for mainline.
> It is intended for MV's OMAP GIT
Ah, I see. Thanks for clarifying.
However ... that's not MontaVista's GIT tree, exactly,
except in that they've hosted the OMAP community tree.
And since that tree is now obsolete, and that patch
isn't in the main branch ... I'll just ignore this. :)
- Dave
> to solve the bug introduced by [1] below
> and is already applied at [2], the modified version of this patch.
>
> As [1] is not yet gone to mainline so this patch is also not required in mainline.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-01-24 4:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 12:31 [PATCH] usb: musb: fix bug in musbhsdma programming Ajay Kumar Gupta
2009-01-23 10:18 ` Felipe Balbi
2009-01-23 18:36 ` David Brownell
[not found] ` <200901231036.04376.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-01-23 18:38 ` Felipe Balbi
2009-01-23 18:50 ` David Brownell
2009-01-24 3:04 ` Gupta, Ajay Kumar
[not found] ` <19F8576C6E063C45BE387C64729E739403FA6CCD3A-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2009-01-24 4:31 ` David Brownell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox