Shawn Guo | 1 Jan 02:04 2012

[GIT PULL] tty: serial: imx changes for 3.3

Hi Greg,

I collected a few imx tty/serial changes below for 3.3.  Can you please
take a look and consider to pull the branch for 3.3 if it looks all
good to you?

Regards,
Shawn

The following changes since commit 5f0a6e2d503896062f641639dacfe5055c2f593b:

  Linux 3.2-rc7 (2011-12-23 21:51:06 -0800)

are available in the git repository at:
  git://git.linaro.org/people/shawnguo/linux-2.6.git imx/serial

Dirk Behme (1):
      imx: Add save/restore functions for UART control regs

Eric Miao (1):
      tty: serial: imx: move del_timer_sync() to avoid potential deadlock

Fabio Estevam (1):
      tty: serial: imx: Allow UART to be a source for wakeup

Saleem Abdulrasool (1):
      imx: add polled io uart methods

Uwe Kleine-König (2):
      serial/imx: propagate error from of_alias_get_id instead of using -ENODEV
(Continue reading)

Bedia, Vaibhav | 2 Jan 10:25 2012
Picon

RE: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

Hello,

On Fri, Nov 11, 2011 at 15:31:52, R, Govindraj wrote:
[...]
>  
> -	if ((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
> +	if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
> +			&& !uart_debug)
>  		device_init_wakeup(&pdev->dev, true);
>  }

I was testing this on AM335x and realized that this leads to creation of two
'wakeup' entries for UART. One is created by the tty layer in serial-core.c
and the other is created here.

Here's what I see on a branch based on Tony's 3.2-rc6:

./sys/devices/platform/omap/omap_uart.0/power/wakeup
./sys/devices/platform/omap/omap_uart.0/tty/ttyO0/power/wakeup

Shouldn't the OMAP serial just enable the 'wakeup' entry created by serial-core.c?

Regards,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Govindraj | 2 Jan 11:30 2012
Picon

Re: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

Hi Vaibhav,

On Mon, Jan 2, 2012 at 2:55 PM, Bedia, Vaibhav <vaibhav.bedia <at> ti.com> wrote:
> Hello,
>
> On Fri, Nov 11, 2011 at 15:31:52, R, Govindraj wrote:
> [...]
>>
>> -     if ((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
>> +     if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
>> +                     && !uart_debug)
>>               device_init_wakeup(&pdev->dev, true);
>>  }
>
> I was testing this on AM335x and realized that this leads to creation of two
> 'wakeup' entries for UART. One is created by the tty layer in serial-core.c
> and the other is created here.
>
> Here's what I see on a branch based on Tony's 3.2-rc6:
>
> ./sys/devices/platform/omap/omap_uart.0/power/wakeup
> ./sys/devices/platform/omap/omap_uart.0/tty/ttyO0/power/wakeup
>
> Shouldn't the OMAP serial just enable the 'wakeup' entry created by serial-core.c?

currently runtime pm is available from omap-serial device and not from tty_dev.
Setting tty_dev wakeup is to use irq_wakeup from suspend available
from serail_core layer which I think we are not using for omap-uart
and we use pad wakeup from suspend path.

(Continue reading)

Bedia, Vaibhav | 3 Jan 11:24 2012
Picon

RE: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

Hi Govindraj,

On Mon, Jan 02, 2012 at 16:00:37, Govindraj wrote:
> 
> currently runtime pm is available from omap-serial device and not from tty_dev.
> Setting tty_dev wakeup is to use irq_wakeup from suspend available
> from serail_core layer which I think we are not using for omap-uart
> and we use pad wakeup from suspend path.
> 
> Also omap-uart.x/power/wakeup is used to gate uart clocks using runtime
> PM api's in omap-serial driver.
> 

Thanks for clarifying. On AM335x, one of the UARTs is in a wakeup domain
and swakeup from this is used to come out of suspend.

I have basic suspend-resume working on it. Strangely this works irrespective
of the value of tty_dev wakeup entry. Do you know if this is expected on OMAP?

The other issue concerning runtime PM is that as soon as I set a non-zero to
the autosuspend_delay_ms I get some garbage characters and eventually the
console stops responding.

[root <at> arago /]# cat .../omap_uart.0/power/autosuspend_delay_ms
-1
[root <at> arago /]# echo 3000 > ÖKWëé«+×é«+wU.Éѹ,z,½Ý.ɽosuspend_delayÕ£½ÍÕÍ...
[root <at> arago /]#	<- No response after some time

The comment in the code mentions delay is receiving characters if runtime PM
is enabled. Any idea what's going wrong at my end?
(Continue reading)

Govindraj | 3 Jan 11:31 2012
Picon

Re: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

On Tue, Jan 3, 2012 at 3:54 PM, Bedia, Vaibhav <vaibhav.bedia <at> ti.com> wrote:
> Hi Govindraj,
>
> On Mon, Jan 02, 2012 at 16:00:37, Govindraj wrote:
>>
>> currently runtime pm is available from omap-serial device and not from tty_dev.
>> Setting tty_dev wakeup is to use irq_wakeup from suspend available
>> from serail_core layer which I think we are not using for omap-uart
>> and we use pad wakeup from suspend path.
>>
>> Also omap-uart.x/power/wakeup is used to gate uart clocks using runtime
>> PM api's in omap-serial driver.
>>
>
> Thanks for clarifying. On AM335x, one of the UARTs is in a wakeup domain
> and swakeup from this is used to come out of suspend.
>
> I have basic suspend-resume working on it. Strangely this works irrespective
> of the value of tty_dev wakeup entry. Do you know if this is expected on OMAP?
>

AFAIK yes.

> The other issue concerning runtime PM is that as soon as I set a non-zero to
> the autosuspend_delay_ms I get some garbage characters and eventually the
> console stops responding.
>
> [root <at> arago /]# cat .../omap_uart.0/power/autosuspend_delay_ms
> -1
> [root <at> arago /]# echo 3000 > ÖKWëé«+×é«+wU.Éѹ,z,½Ý.ɽosuspend_delayÕ£½ÍÕÍ...
(Continue reading)

Bedia, Vaibhav | 3 Jan 12:52 2012
Picon

RE: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

On Tue, Jan 03, 2012 at 16:01:52, Govindraj wrote:
> >
> > I have basic suspend-resume working on it. Strangely this works irrespective
> > of the value of tty_dev wakeup entry. Do you know if this is expected on OMAP?
> >
> 
> AFAIK yes.

Ok.

> 
> > The other issue concerning runtime PM is that as soon as I set a non-zero to
> > the autosuspend_delay_ms I get some garbage characters and eventually the
> > console stops responding.
> >
> > [root <at> arago /]# cat .../omap_uart.0/power/autosuspend_delay_ms
> > -1
> > [root <at> arago /]# echo 3000 > ÖKWëé«+×é«+wU.Éѹ,z,½Ý.ɽosuspend_delayÕ£½ÍÕÍ...
> > [root <at> arago /]# <- No response after some time
> >
> 
> try enabling CONFIG_CPU_IDLE for pm qos_usage from uart driver.
> 

Its enabled.

Regards,
Vaibhav

--
(Continue reading)

Govindraj | 3 Jan 15:12 2012
Picon

Re: [PATCH v8 19/20] OMAP2+: UART: Do not gate uart clocks if used for debug_prints

On Tue, Jan 3, 2012 at 5:22 PM, Bedia, Vaibhav <vaibhav.bedia <at> ti.com> wrote:
> On Tue, Jan 03, 2012 at 16:01:52, Govindraj wrote:
>> >
>> > I have basic suspend-resume working on it. Strangely this works irrespective
>> > of the value of tty_dev wakeup entry. Do you know if this is expected on OMAP?
>> >
>>
>> AFAIK yes.
>
> Ok.
>
>>
>> > The other issue concerning runtime PM is that as soon as I set a non-zero to
>> > the autosuspend_delay_ms I get some garbage characters and eventually the
>> > console stops responding.
>> >
>> > [root <at> arago /]# cat .../omap_uart.0/power/autosuspend_delay_ms
>> > -1
>> > [root <at> arago /]# echo 3000 > ÖKWëé«+×é«+wU.Éѹ,z,½Ý.ɽosuspend_delayÕ£½ÍÕÍ...
>> > [root <at> arago /]# <- No response after some time
>> >
>>
>> try enabling CONFIG_CPU_IDLE for pm qos_usage from uart driver.
>>
>
> Its enabled.

I checked on Beagle-xm with latest LO master I don't see that issue.

Lo master commit used
(Continue reading)

Greg KH | 4 Jan 00:58 2012

Re: USB disconnect -> kernel panic

On Mon, Jan 02, 2012 at 10:22:55AM -0800, Sarah Sharp wrote:
> On Sat, Dec 24, 2011 at 03:32:26PM -0700, Bdale Garbee wrote:
> > Hi Sarah!  Merry Christmas!
> > 
> > I've been working on another production run of Altus Metrum products
> > today, and in the process of flashing and calibrating a pile of our
> > TeleDongle units, I've been seeing sporadic kernel panics when
> > unplugging them from my notebook USB.  Has now happened three times this
> > morning. 
> > 
> > I'm running 3.1.6 now, but I saw this under 3.1.5 too, at least once.
> > The notebook is an HP 2540p.
> > 
> > Keith suggested I send you the attached photo of my screen showing the
> > panic info. 
> 
> It's somewhere in the tty layer, and doesn't look USB related.  I think
> Greg KH is the tty maintainer right now, so you might want to ask him.

We've had some cdc_acm driver problems in the past, but I thought they
were all resolved.  3.1.3 should have fixed those problems.  We have
some more cleanups queued up for 3.3, but nothing that should be fixing
something like this.

Oliver, any thoughts about this (see the original post on linux-usb for
the crash dump.)

thanks,

greg k-h
(Continue reading)

Bdale Garbee | 4 Jan 04:09 2012

Re: USB disconnect -> kernel panic

On Tue, 3 Jan 2012 15:58:47 -0800, Greg KH <greg@...> wrote:
> On Mon, Jan 02, 2012 at 10:22:55AM -0800, Sarah Sharp wrote:
> > On Sat, Dec 24, 2011 at 03:32:26PM -0700, Bdale Garbee wrote:
> > > Hi Sarah!  Merry Christmas!
> > > 
> > > I've been working on another production run of Altus Metrum products
> > > today, and in the process of flashing and calibrating a pile of our
> > > TeleDongle units, I've been seeing sporadic kernel panics when
> > > unplugging them from my notebook USB.  Has now happened three times this
> > > morning. 
> > > 
> > > I'm running 3.1.6 now, but I saw this under 3.1.5 too, at least once.
> > > The notebook is an HP 2540p.
> > > 
> > > Keith suggested I send you the attached photo of my screen showing the
> > > panic info. 
> > 
> > It's somewhere in the tty layer, and doesn't look USB related.  I think
> > Greg KH is the tty maintainer right now, so you might want to ask him.
> 
> We've had some cdc_acm driver problems in the past, but I thought they
> were all resolved.  3.1.3 should have fixed those problems.  We have
> some more cleanups queued up for 3.3, but nothing that should be fixing
> something like this.
> 
> Oliver, any thoughts about this (see the original post on linux-usb for
> the crash dump.)

For what it's worth, it happened to me again today running 3.2.0-rc7.  I
didn't bother photographing the screen again, though I'm happy to do
(Continue reading)

Oliver Neukum | 4 Jan 10:01 2012
Picon

Re: USB disconnect -> kernel panic

Am Mittwoch, 4. Januar 2012, 00:58:47 schrieb Greg KH:
> On Mon, Jan 02, 2012 at 10:22:55AM -0800, Sarah Sharp wrote:
> > On Sat, Dec 24, 2011 at 03:32:26PM -0700, Bdale Garbee wrote:
> > > Hi Sarah!  Merry Christmas!
> > > 
> > > I've been working on another production run of Altus Metrum products
> > > today, and in the process of flashing and calibrating a pile of our
> > > TeleDongle units, I've been seeing sporadic kernel panics when
> > > unplugging them from my notebook USB.  Has now happened three times this
> > > morning. 
> > > 
> > > I'm running 3.1.6 now, but I saw this under 3.1.5 too, at least once.
> > > The notebook is an HP 2540p.
> > > 
> > > Keith suggested I send you the attached photo of my screen showing the
> > > panic info. 
> > 
> > It's somewhere in the tty layer, and doesn't look USB related.  I think
> > Greg KH is the tty maintainer right now, so you might want to ask him.
> 
> We've had some cdc_acm driver problems in the past, but I thought they
> were all resolved.  3.1.3 should have fixed those problems.  We have
> some more cleanups queued up for 3.3, but nothing that should be fixing
> something like this.
> 
> Oliver, any thoughts about this (see the original post on linux-usb for
> the crash dump.)

Do you have a pointer? I assumed this to be this issue:
http://www.spinics.net/lists/linux-usb/msg55779.html
(Continue reading)


Gmane