From: David Brownell <david-b@pacbell.net>
To: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH-REWORKED] OMAP: MUSB: MUSB gadget fix
Date: Thu, 29 Nov 2007 10:38:10 -0800 [thread overview]
Message-ID: <200711291038.10971.david-b@pacbell.net> (raw)
In-Reply-To: <5DF83221BE20114E9C331F665ACBC08003E80033@dbde01.ent.ti.com>
On Wednesday 21 November 2007, Pandita, Vikram wrote:
> From: Vikram Pandita <vikram.pandita@ti.com>
>
> REWORKED:
> This fix gets MUSB Gadget Isochronous IN/OUT transfers working
>
> 1) Isochronous IN transfers working for File Storage Gadget
> TXCSR register write was wrongly erasing all bits
Could you elaborate a bit? File storage is only specified to work
with bulk transfers. Were you just hacking that to become a source
of ISO data?
Normally one just configures the gadgetfs example program to set
up ISO endpoints with known/testable data patterns.
> 2) Isochronous OUT transfers working for File Storage Gadget
> Minor fix:
> ./testusb -a -t15 -c1 -s512 -g8
> Testing with -g8 option will always case OVERFLOW condition
> which should not be a problem for ISO mode. So check for that
> condition and not report it as error in gadgetfs test application
That's wrong. The reason any fault would "not" be a problem is
because the software which *issues* the transfer request knows
how to handle that fault code. And an OVERFLOW condition is very
clearly an error that might need attention ... the host goofed up
badly, sending more data than was allowed, in most cases.
>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
>
> Index: linux-omap/drivers/usb/musb/musb_gadget.c
> ===================================================================
> --- linux-omap.orig/drivers/usb/musb/musb_gadget.c 2007-11-19 18:04:25.000000000 +0530
> +++ linux-omap/drivers/usb/musb/musb_gadget.c 2007-11-21 16:15:50.000000000 +0530
> @@ -111,7 +111,8 @@
> req = to_musb_request(request);
>
> list_del(&request->list);
> - if (req->request.status == -EINPROGRESS)
> + if (req->request.status == -EINPROGRESS ||
> + (ep->type == USB_ENDPOINT_XFER_ISOC && req->request.status == -EOVERFLOW))
... so NAK on this part ...
> req->request.status = status;
> musb = req->musb;
>
> @@ -499,9 +500,10 @@
>
> DBG(4, "sending zero pkt\n");
> musb_writew(epio, MUSB_TXCSR,
> - MUSB_TXCSR_MODE
> + csr | MUSB_TXCSR_MODE
> | MUSB_TXCSR_TXPKTRDY);
> request->zero = 0;
> + break;
This might be correct, I'd have to look in more detail at that
logic. I do seem to recall distrusting that code path, in part
because it was awkward to test.
However, your explanation of what's going on doesn't wash.
Every bit in MUSB_TXCSR_P_WZC_BITS is a write-zero-to-clear,
and you're writing zero there. So ... which bits outside of
that group needed to stay set?
Also, why the "break"? You added that in this iteration of
the patch, with no comments...
> }
>
> /* ... or if not, then complete it */
>
> ---
>
prev parent reply other threads:[~2007-11-29 18:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 1:41 [RFC] Misc cleanups Felipe Balbi
2007-11-19 1:41 ` [RFC patch] I2C: TWL4030: Remove unneded pr_err define Felipe Balbi
2007-11-19 1:42 ` [RFC patch] ARM: OMAP: Fix typo in drivers/usb/musb/Kconfig Felipe Balbi
2007-11-19 1:42 ` [RFC patch] ARM: OMAP: Define OMAP34XX_HS_BASE Felipe Balbi
2007-11-19 12:53 ` [RFC patch] ARM: OMAP: Fix typo in drivers/usb/musb/Kconfig Gadiyar, Anand
2007-11-19 12:59 ` Felipe Balbi
2007-11-19 13:48 ` Gadiyar, Anand
2007-11-19 14:30 ` Felipe Balbi
2007-11-19 13:03 ` [PATCH] OMAP: MUSB: MUSB gadget fix Pandita, Vikram
2007-11-20 9:34 ` [PATCH] OMAP: MUSB: MUSB fix to work as Module for 24xx/Davinci Pandita, Vikram
2007-11-29 18:22 ` David Brownell
2007-11-30 5:21 ` Pandita, Vikram
2007-11-30 5:31 ` David Brownell
2007-11-30 5:42 ` Pandita, Vikram
2007-11-30 10:52 ` David Brownell
2007-11-30 11:13 ` Pandita, Vikram
2007-11-21 12:23 ` [PATCH-REWORKED] OMAP: MUSB: MUSB gadget fix Pandita, Vikram
2007-11-29 18:38 ` David Brownell [this message]
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=200711291038.10971.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-omap-open-source@linux.omap.com \
/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