* [PATCH] fix NULL pointer with MUSB and DMA on ISO ep
@ 2007-11-01 22:40 Hunyue Yau
2007-11-02 16:36 ` David Brownell
0 siblings, 1 reply; 3+ messages in thread
From: Hunyue Yau @ 2007-11-01 22:40 UTC (permalink / raw)
To: linux-omap-open-source
Hi,
The MUSB driver fails to pass a proper buffer pointer to
musb_write_fifo if DMA is enabled and it is an ISO endpoint.
This removes the check that was preventing a proper buffer
pointer from being passed.
Tested with a bluetooth headset and USB bluetooth dongle
using SCO audio on the 2430SDP.
-- Hunyue
---------------------------------------------------------------------------------
Description:
For the case of an isochonous endpoint, musb_write_fifo may be
called with a NULL buffer from musb_host_tx if DMA is enabled.
Remove DMA check and always supply a valid buffer as long as
the URB contains a valid buffer.
Signed-off-by: Hunyue Yau <hyau@mvista.com>
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index e488ac7..a7fe072 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1258,7 +1258,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
d->actual_length = qh->segsize;
if (++qh->iso_idx >= urb->number_of_packets) {
done = true;
- } else if (!dma) {
+ } else {
d++;
buf = urb->transfer_buffer + d->offset;
wLength = d->length;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] fix NULL pointer with MUSB and DMA on ISO ep
2007-11-01 22:40 [PATCH] fix NULL pointer with MUSB and DMA on ISO ep Hunyue Yau
@ 2007-11-02 16:36 ` David Brownell
2007-11-15 20:51 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: David Brownell @ 2007-11-02 16:36 UTC (permalink / raw)
To: linux-omap-open-source
On Thursday 01 November 2007, Hunyue Yau wrote:
> Hi,
>
> The MUSB driver fails to pass a proper buffer pointer to
> musb_write_fifo if DMA is enabled and it is an ISO endpoint.
> This removes the check that was preventing a proper buffer
> pointer from being passed.
>
> Tested with a bluetooth headset and USB bluetooth dongle
> using SCO audio on the 2430SDP.
>
> -- Hunyue
> ---------------------------------------------------------------------------------
> Description:
> For the case of an isochonous endpoint, musb_write_fifo may be
> called with a NULL buffer from musb_host_tx if DMA is enabled.
> Remove DMA check and always supply a valid buffer as long as
> the URB contains a valid buffer.
>
> Signed-off-by: Hunyue Yau <hyau@mvista.com>
>
> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> index e488ac7..a7fe072 100644
> --- a/drivers/usb/musb/musb_host.c
> +++ b/drivers/usb/musb/musb_host.c
> @@ -1258,7 +1258,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
> d->actual_length = qh->segsize;
> if (++qh->iso_idx >= urb->number_of_packets) {
> done = true;
> - } else if (!dma) {
> + } else {
... looks right. ACK.
> d++;
> buf = urb->transfer_buffer + d->offset;
> wLength = d->length;
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] fix NULL pointer with MUSB and DMA on ISO ep
2007-11-02 16:36 ` David Brownell
@ 2007-11-15 20:51 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2007-11-15 20:51 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
* David Brownell <david-b@pacbell.net> [071102 09:37]:
> On Thursday 01 November 2007, Hunyue Yau wrote:
> > Hi,
> >
> > The MUSB driver fails to pass a proper buffer pointer to
> > musb_write_fifo if DMA is enabled and it is an ISO endpoint.
> > This removes the check that was preventing a proper buffer
> > pointer from being passed.
> >
> > Tested with a bluetooth headset and USB bluetooth dongle
> > using SCO audio on the 2430SDP.
> >
> > -- Hunyue
> > ---------------------------------------------------------------------------------
> > Description:
> > For the case of an isochonous endpoint, musb_write_fifo may be
> > called with a NULL buffer from musb_host_tx if DMA is enabled.
> > Remove DMA check and always supply a valid buffer as long as
> > the URB contains a valid buffer.
> >
> > Signed-off-by: Hunyue Yau <hyau@mvista.com>
> >
> > diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> > index e488ac7..a7fe072 100644
> > --- a/drivers/usb/musb/musb_host.c
> > +++ b/drivers/usb/musb/musb_host.c
> > @@ -1258,7 +1258,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
> > d->actual_length = qh->segsize;
> > if (++qh->iso_idx >= urb->number_of_packets) {
> > done = true;
> > - } else if (!dma) {
> > + } else {
>
> ... looks right. ACK.
>
> > d++;
> > buf = urb->transfer_buffer + d->offset;
> > wLength = d->length;
> >
Pushing today.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-15 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-01 22:40 [PATCH] fix NULL pointer with MUSB and DMA on ISO ep Hunyue Yau
2007-11-02 16:36 ` David Brownell
2007-11-15 20:51 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox