public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* pending patch
@ 2008-04-25  7:52 Felipe Balbi
  2008-04-25  9:35 ` David Brownell
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-04-25  7:52 UTC (permalink / raw)
  To: tony, linux-omap; +Cc: david-b

Hi Tony and Dave,

there's this one pending patch [1]. Do you guys have any comments on that
one?

Author: Felipe Balbi <felipe.balbi@nokia.com>
Date:   Thu Apr 17 17:34:20 2008 +0300

    USB: MUSB: Don't ignore disconnect on suspend
    
    As soon as a usb device is disconnect we should
    fall into a_wait_bcon state, ignoring disconnect
    irq will prevent this behaviour.
    
    Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c5816a2..019898a 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -659,7 +659,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
                        switch (musb->xceiv.state) {
 #ifdef CONFIG_USB_OTG
                        case OTG_STATE_A_SUSPEND:
-                               musb->ignore_disconnect = 1;
+                               musb->ignore_disconnect = 0;
                                musb_g_reset(musb);
                                /* FALLTHROUGH */
                        case OTG_STATE_A_WAIT_BCON:     /* OPT TD.4.7-900ms */

[1] http://marc.info/?l=linux-omap&m=120844324526642&w=2
-- 
	- Balbi

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-04-25  7:52 pending patch Felipe Balbi
@ 2008-04-25  9:35 ` David Brownell
  2008-04-25 10:18   ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: David Brownell @ 2008-04-25  9:35 UTC (permalink / raw)
  To: felipe.balbi; +Cc: tony, linux-omap

On Friday 25 April 2008, Felipe Balbi wrote:
> Hi Tony and Dave,
> 
> there's this one pending patch [1]. Do you guys have any comments on that
> one?
> 
> Author: Felipe Balbi <felipe.balbi@nokia.com>
> Date:   Thu Apr 17 17:34:20 2008 +0300
> 
>     USB: MUSB: Don't ignore disconnect on suspend
>     
>     As soon as a usb device is disconnect we should
>     fall into a_wait_bcon state, ignoring disconnect
>     irq will prevent this behaviour.

If it passes the OTG tests, fine.  I don't recall how the
HNP handoff's disconnect signaling is handled ... presumably
it's different from some "real" disconnect.



>     Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index c5816a2..019898a 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -659,7 +659,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
>                         switch (musb->xceiv.state) {
>  #ifdef CONFIG_USB_OTG
>                         case OTG_STATE_A_SUSPEND:
> -                               musb->ignore_disconnect = 1;
> +                               musb->ignore_disconnect = 0;
>                                 musb_g_reset(musb);
>                                 /* FALLTHROUGH */
>                         case OTG_STATE_A_WAIT_BCON:     /* OPT TD.4.7-900ms */
> 
> [1] http://marc.info/?l=linux-omap&m=120844324526642&w=2
> -- 
> 	- Balbi
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-04-25  9:35 ` David Brownell
@ 2008-04-25 10:18   ` Felipe Balbi
  2008-04-25 16:36     ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-04-25 10:18 UTC (permalink / raw)
  To: ext David Brownell; +Cc: felipe.balbi, tony, linux-omap

On Fri, Apr 25, 2008 at 02:35:21AM -0700, David Brownell wrote:
> On Friday 25 April 2008, Felipe Balbi wrote:
> > Hi Tony and Dave,
> > 
> > there's this one pending patch [1]. Do you guys have any comments on that
> > one?
> > 
> > Author: Felipe Balbi <felipe.balbi@nokia.com>
> > Date:   Thu Apr 17 17:34:20 2008 +0300
> > 
> >     USB: MUSB: Don't ignore disconnect on suspend
> >     
> >     As soon as a usb device is disconnect we should
> >     fall into a_wait_bcon state, ignoring disconnect
> >     irq will prevent this behaviour.
> 
> If it passes the OTG tests, fine.  I don't recall how the
> HNP handoff's disconnect signaling is handled ... presumably
> it's different from some "real" disconnect.

No opt available for now...
The problem is that when you ignore disconnect on suspend you only ack
the disconnect interrupt after attaching other device. It won't get us
too much trouble besides the bit will still set in int_src, but still
musb should ack disconnect as soon as it happens, shouldn't it? And
right after that start the timer for switching from a_wait_bcon to
a_wait_vfall and after that a_idle.

But as soon as I have and opt available, I'll try to run this test and
report you if I can see any issues with this patch applied.

For now, let's keep it as pending so.

-- 
	- Balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-04-25 10:18   ` Felipe Balbi
@ 2008-04-25 16:36     ` Tony Lindgren
  2008-04-25 18:45       ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2008-04-25 16:36 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: ext David Brownell, linux-omap

* Felipe Balbi <felipe.balbi@nokia.com> [080425 03:19]:
> On Fri, Apr 25, 2008 at 02:35:21AM -0700, David Brownell wrote:
> > On Friday 25 April 2008, Felipe Balbi wrote:
> > > Hi Tony and Dave,
> > > 
> > > there's this one pending patch [1]. Do you guys have any comments on that
> > > one?
> > > 
> > > Author: Felipe Balbi <felipe.balbi@nokia.com>
> > > Date:   Thu Apr 17 17:34:20 2008 +0300
> > > 
> > >     USB: MUSB: Don't ignore disconnect on suspend
> > >     
> > >     As soon as a usb device is disconnect we should
> > >     fall into a_wait_bcon state, ignoring disconnect
> > >     irq will prevent this behaviour.
> > 
> > If it passes the OTG tests, fine.  I don't recall how the
> > HNP handoff's disconnect signaling is handled ... presumably
> > it's different from some "real" disconnect.
> 
> No opt available for now...
> The problem is that when you ignore disconnect on suspend you only ack
> the disconnect interrupt after attaching other device. It won't get us
> too much trouble besides the bit will still set in int_src, but still
> musb should ack disconnect as soon as it happens, shouldn't it? And
> right after that start the timer for switching from a_wait_bcon to
> a_wait_vfall and after that a_idle.
> 
> But as soon as I have and opt available, I'll try to run this test and
> report you if I can see any issues with this patch applied.
> 
> For now, let's keep it as pending so.

Yeah. I have not applied any musb/tusb patches because of being afraid
of the HS OTG OPT tests breaking.. Still have them all in my l-o mailbox
though. So let's plan on applying things after somebody (Felipe?) gets
to run HS OTG OPT on them for musb and tusb.

Of course this discussion should get moved to linux-usb-devel..

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-04-25 16:36     ` Tony Lindgren
@ 2008-04-25 18:45       ` Felipe Balbi
  2008-05-09  9:19         ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-04-25 18:45 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Felipe Balbi, ext David Brownell, linux-omap

On Fri, Apr 25, 2008 at 09:36:44AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <felipe.balbi@nokia.com> [080425 03:19]:
> > On Fri, Apr 25, 2008 at 02:35:21AM -0700, David Brownell wrote:
> > > On Friday 25 April 2008, Felipe Balbi wrote:
> > > > Hi Tony and Dave,
> > > > 
> > > > there's this one pending patch [1]. Do you guys have any comments on that
> > > > one?
> > > > 
> > > > Author: Felipe Balbi <felipe.balbi@nokia.com>
> > > > Date:   Thu Apr 17 17:34:20 2008 +0300
> > > > 
> > > >     USB: MUSB: Don't ignore disconnect on suspend
> > > >     
> > > >     As soon as a usb device is disconnect we should
> > > >     fall into a_wait_bcon state, ignoring disconnect
> > > >     irq will prevent this behaviour.
> > > 
> > > If it passes the OTG tests, fine.  I don't recall how the
> > > HNP handoff's disconnect signaling is handled ... presumably
> > > it's different from some "real" disconnect.
> > 
> > No opt available for now...
> > The problem is that when you ignore disconnect on suspend you only ack
> > the disconnect interrupt after attaching other device. It won't get us
> > too much trouble besides the bit will still set in int_src, but still
> > musb should ack disconnect as soon as it happens, shouldn't it? And
> > right after that start the timer for switching from a_wait_bcon to
> > a_wait_vfall and after that a_idle.
> > 
> > But as soon as I have and opt available, I'll try to run this test and
> > report you if I can see any issues with this patch applied.
> > 
> > For now, let's keep it as pending so.
> 
> Yeah. I have not applied any musb/tusb patches because of being afraid
> of the HS OTG OPT tests breaking.. Still have them all in my l-o mailbox
> though. So let's plan on applying things after somebody (Felipe?) gets
> to run HS OTG OPT on them for musb and tusb.

I think current driver won't pass opt at all. First of all we have a bug
in queued control transfers that gives us an oops. Quite easy to
reproduce: testusb -t 10 (just put a g_zero on the other side).

According to Dave we have two patches on ehci to help with that. I'm
looking for them in the archives without much luck but once I find them
it should be easy to make any other necessary changes to musb driver
(if any). Anyways, I get an oops in drivers/usb/hcd.c:unmap_urb_for_dma,
right in the test if (is_root_hub(urb->dev), tracking back to musb, we
would fall in __musb_giveback_urb()...

Also, we don't have the messaging support (but that's piece of cake).

> Of course this discussion should get moved to linux-usb-devel..

Yeah, i'm waiting to get all opt and testusb stuff ready so I can
prepare patches on top of mailine and send to linux-usb-devel. It's
about time.

-- 
Best Regards,

Felipe Balbi
me@felipebalbi.com
http://blog.felipebalbi.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-04-25 18:45       ` Felipe Balbi
@ 2008-05-09  9:19         ` Felipe Balbi
  2008-05-09 21:55           ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-05-09  9:19 UTC (permalink / raw)
  To: ext Felipe Balbi
  Cc: Tony Lindgren, Felipe Balbi, ext David Brownell, linux-omap

On Fri, Apr 25, 2008 at 09:45:43PM +0300, ext Felipe Balbi wrote:
> On Fri, Apr 25, 2008 at 09:36:44AM -0700, Tony Lindgren wrote:
> > * Felipe Balbi <felipe.balbi@nokia.com> [080425 03:19]:
> > > On Fri, Apr 25, 2008 at 02:35:21AM -0700, David Brownell wrote:
> > > > On Friday 25 April 2008, Felipe Balbi wrote:
> > > > > Hi Tony and Dave,
> > > > > 
> > > > > there's this one pending patch [1]. Do you guys have any comments on that
> > > > > one?
> > > > > 
> > > > > Author: Felipe Balbi <felipe.balbi@nokia.com>
> > > > > Date:   Thu Apr 17 17:34:20 2008 +0300
> > > > > 
> > > > >     USB: MUSB: Don't ignore disconnect on suspend
> > > > >     
> > > > >     As soon as a usb device is disconnect we should
> > > > >     fall into a_wait_bcon state, ignoring disconnect
> > > > >     irq will prevent this behaviour.
> > > > 
> > > > If it passes the OTG tests, fine.  I don't recall how the
> > > > HNP handoff's disconnect signaling is handled ... presumably
> > > > it's different from some "real" disconnect.
> > > 
> > > No opt available for now...
> > > The problem is that when you ignore disconnect on suspend you only ack
> > > the disconnect interrupt after attaching other device. It won't get us
> > > too much trouble besides the bit will still set in int_src, but still
> > > musb should ack disconnect as soon as it happens, shouldn't it? And
> > > right after that start the timer for switching from a_wait_bcon to
> > > a_wait_vfall and after that a_idle.
> > > 
> > > But as soon as I have and opt available, I'll try to run this test and
> > > report you if I can see any issues with this patch applied.
> > > 
> > > For now, let's keep it as pending so.
> > 
> > Yeah. I have not applied any musb/tusb patches because of being afraid
> > of the HS OTG OPT tests breaking.. Still have them all in my l-o mailbox
> > though. So let's plan on applying things after somebody (Felipe?) gets
> > to run HS OTG OPT on them for musb and tusb.

Ok, this patch doesn't break any opt tests. Safe to apply. Tested
yesterday.

-- 
	- Balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pending patch
  2008-05-09  9:19         ` Felipe Balbi
@ 2008-05-09 21:55           ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2008-05-09 21:55 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: ext Felipe Balbi, ext David Brownell, linux-omap

* Felipe Balbi <felipe.balbi@nokia.com> [080509 02:20]:
> On Fri, Apr 25, 2008 at 09:45:43PM +0300, ext Felipe Balbi wrote:
> > On Fri, Apr 25, 2008 at 09:36:44AM -0700, Tony Lindgren wrote:
> > > * Felipe Balbi <felipe.balbi@nokia.com> [080425 03:19]:
> > > > On Fri, Apr 25, 2008 at 02:35:21AM -0700, David Brownell wrote:
> > > > > On Friday 25 April 2008, Felipe Balbi wrote:
> > > > > > Hi Tony and Dave,
> > > > > > 
> > > > > > there's this one pending patch [1]. Do you guys have any comments on that
> > > > > > one?
> > > > > > 
> > > > > > Author: Felipe Balbi <felipe.balbi@nokia.com>
> > > > > > Date:   Thu Apr 17 17:34:20 2008 +0300
> > > > > > 
> > > > > >     USB: MUSB: Don't ignore disconnect on suspend
> > > > > >     
> > > > > >     As soon as a usb device is disconnect we should
> > > > > >     fall into a_wait_bcon state, ignoring disconnect
> > > > > >     irq will prevent this behaviour.
> > > > > 
> > > > > If it passes the OTG tests, fine.  I don't recall how the
> > > > > HNP handoff's disconnect signaling is handled ... presumably
> > > > > it's different from some "real" disconnect.
> > > > 
> > > > No opt available for now...
> > > > The problem is that when you ignore disconnect on suspend you only ack
> > > > the disconnect interrupt after attaching other device. It won't get us
> > > > too much trouble besides the bit will still set in int_src, but still
> > > > musb should ack disconnect as soon as it happens, shouldn't it? And
> > > > right after that start the timer for switching from a_wait_bcon to
> > > > a_wait_vfall and after that a_idle.
> > > > 
> > > > But as soon as I have and opt available, I'll try to run this test and
> > > > report you if I can see any issues with this patch applied.
> > > > 
> > > > For now, let's keep it as pending so.
> > > 
> > > Yeah. I have not applied any musb/tusb patches because of being afraid
> > > of the HS OTG OPT tests breaking.. Still have them all in my l-o mailbox
> > > though. So let's plan on applying things after somebody (Felipe?) gets
> > > to run HS OTG OPT on them for musb and tusb.
> 
> Ok, this patch doesn't break any opt tests. Safe to apply. Tested
> yesterday.

Pushing.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-09 21:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25  7:52 pending patch Felipe Balbi
2008-04-25  9:35 ` David Brownell
2008-04-25 10:18   ` Felipe Balbi
2008-04-25 16:36     ` Tony Lindgren
2008-04-25 18:45       ` Felipe Balbi
2008-05-09  9:19         ` Felipe Balbi
2008-05-09 21:55           ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox