Bug#854854: Cherry pick and backport patches for rtc-s35390a (Was: Bug#854854: qcontrol: reboot/poweroff)

2017-04-19 Thread Ian Campbell
Control: retitle -1 Cherry pick and backport patches for rtc-s35390a to Jessie
Control: found -1 3.16.39-1+deb8u2
Control: fixed -1 4.6.4-1

stable@ please see the list of requested backports at the end.

debian-*: I tried (and succeeded!) to reassign to src:linux and tried
(and failed!) to merge with 794266, actually that failure was probably
for the best. I've tried to reflect the fact that 794266 was fixed in
4.6.4-1 but that the issue is still found in Jessie and the stable
3.16.y tree (since I don't see the fix in the changelog of either) with
the above runes.

(the original bug report was all in the $subject, so reproducing here
since the retitle should overwrite it:

After new installation of Debian the system is properly powering 
down either shutdownor by power button. Also the restart is working
by power button. But after some days running the system the machine
is not powering down completely anymore. The status-LED is blinking
red/green, power LED is blue. The system can only be restarted by
disconnecting from power. The power button is not working in this
moment. This effect happens if I stop by shutdown command as well as
by power button. nowby
)

On Mon, 2017-04-03 at 21:09 +0200, Alexandre Belloni wrote:
> Hi,
> 
> On 16/03/2017 at 09:45:07 +0100, Uwe Kleine-König wrote:
> > Back then I prepared a backport to jessie (which still sits in a
> > topic
> > branch in the debian-kernel repo[2]) but it seems I forgot to merge
> > it into
> > the jessie kernel.
> > 
> > I wonder if the better fix would be to fix this in linux-stable
> > instead.
> > What do you think?
> > 
> 
> I agree that this should be backported to any stable kernel that is used
> by a distribution. I can ack the patch if you send one to stable@

According to 
https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=1d69dac66c315a290fb61c5f400e056e8d01fe50
linked from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854854#15

The set of requested backports is:
f87e904ddd8f rtc: s35390a: fix reading out alarm
8e6583f1b5d1 rtc: s35390a: implement reset routine as suggested by the reference
3bd32722c827 rtc: s35390a: improve irq handling

all of which are in mainline already. They should/could be backported
to the active LTS branches between v3.7..v4.5 AFAICT.

Uwe, can you confirm for stable@ that these are the patches and
releases where these are needed?

I also see
https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/patches/bugfix/all/rtc-s35390a-initialize-all-fields.patch?id=1d69dac66c315a290fb61c5f400e056e8d01fe50
in your branch but not sure if that is needed upstream or if it was
intended only for the distro packages

Uwe, Maybe you should merge your Debian kernel package branch in the
meantime and we can drop the patches when they hit stable?

Ian.



Bug#854854: qcontrol: reboot/poweroff

2017-04-03 Thread Alexandre Belloni
Hi,

On 16/03/2017 at 09:45:07 +0100, Uwe Kleine-König wrote:
> Back then I prepared a backport to jessie (which still sits in a topic
> branch in the debian-kernel repo[2]) but it seems I forgot to merge it into
> the jessie kernel.
> 
> I wonder if the better fix would be to fix this in linux-stable instead.
> What do you think?
> 

I agree that this should be backported to any stable kernel that is used
by a distribution. I can ack the patch if you send one to stable@


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



Bug#854854: AW: Bug#854854: qcontrol: reboot/poweroff

2017-03-16 Thread Peter Buechner
Hello,

I cleared the bug according the link below and the system is working now .

But what I wonder: my kernel version is 3.16.0-4-kirkwood. How I got this?

I followed the procedure on page 
http://www.cyrius.com/debian/kirkwood/qnap/ts-119/deinstall/
And got the kernel and initrd files of the installer via links there.  You are 
writing actual version would be  4.6.4-1.
How to get the actual kernel?

Regards
Peter Buechner


-Ursprüngliche Nachricht-
Von: Uwe Kleine-König [mailto:u...@kleine-koenig.org] 
Gesendet: Donnerstag, 16. März 2017 09:45
An: Martin Michlmayr
Cc: peter; 854...@bugs.debian.org; Alexandre Belloni; 
debian-ker...@lists.debian.org; sta...@kernel.org
Betreff: Re: Bug#854854: qcontrol: reboot/poweroff

Cc += Alexandre Belloni, debian-kernel, stable@k.o

Hello,

On Wed, Mar 15, 2017 at 06:10:47PM -0700, Martin Michlmayr wrote:
> > After new installation of Debian the system is properly powering 
> > down either shutdownor by power button. Also the restart is working 
> > by power button. But after some days running the system the machine 
> > is not powering down completely anymore. The status-LED is blinking 
> > red/green, power LED is blue. The system can only be restarted by 
> > disconnecting from power. The power button is not working in this 
> > moment.  This effect happens if I stop by shutdown command as well 
> > as by power button.
> 
> Peter pointed out that this is #794266 which Uwe fixed in the kernel.
> 
> So my question: does that also have to be fixed in the kernel in 
> stable?
> 
> IIRC this was only triggered by newer versions qcontrol but I can't 
> remember the details.

I don't know about qcontrol, I only triggered this by direct interaction with 
the rtc. There the problem happens if the alarm is enabled and the respective 
irq event fires. (So I guess qcontrol enables the alarm.)

This is fixed (as good as possible) in mainline since v4.8-rc1[1]. In Debian 
it's fixed since 4.6.4-1. The kernel supports setting an alarm since

542dd33a4925 ("drivers/rtc/rtc-s35390a.c: add wakealarm support for 
rtc-s35390A rtc chip")

which is in v3.7-rc1.

If the device is already in a borked state (i.e.  the irq is active but the 
respective flag is already read and so cleared) even a new kernel doesn't 
repair this. To fix it follow the directions in

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266#95

.

Back then I prepared a backport to jessie (which still sits in a topic branch 
in the debian-kernel repo[2]) but it seems I forgot to merge it into the jessie 
kernel.

I wonder if the better fix would be to fix this in linux-stable instead.
What do you think?

Best regards
Uwe

[1] http://git.kernel.org/linus/3bd32722c827
[2] 
https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=1d69dac66c315a290fb61c5f400e056e8d01fe50



Bug#854854: AW: Bug#854854: qcontrol: reboot/poweroff

2017-03-16 Thread Uwe Kleine-König
Hello Peter,

On 03/16/2017 10:52 AM, Peter Buechner wrote:
> I cleared the bug according the link below and the system is working now .

\o/

> But what I wonder: my kernel version is 3.16.0-4-kirkwood. How I got this?

This is expected for a jessie system.

> I followed the procedure on page 
> http://www.cyrius.com/debian/kirkwood/qnap/ts-119/deinstall/
> And got the kernel and initrd files of the installer via links there.  You 
> are writing actual version would be  4.6.4-1.
> How to get the actual kernel?

4.6.4-1 is the version where the bug is fixed. So you had the problem
because you use an older kernel than 4.6.4-1.

Is this more clear now?

Best regards
Uwe



signature.asc
Description: OpenPGP digital signature


Bug#854854: qcontrol: reboot/poweroff

2017-03-16 Thread Uwe Kleine-König
Cc += Alexandre Belloni, debian-kernel, stable@k.o

Hello,

On Wed, Mar 15, 2017 at 06:10:47PM -0700, Martin Michlmayr wrote:
> > After new installation of Debian the system is properly powering
> > down either shutdownor by power button. Also the restart is working
> > by power button. But after some days running the system the machine
> > is not powering down completely anymore. The status-LED is blinking
> > red/green, power LED is blue. The system can only be restarted by
> > disconnecting from power. The power button is not working in this
> > moment.  This effect happens if I stop by shutdown command as well
> > as by power button.
> 
> Peter pointed out that this is #794266 which Uwe fixed in the kernel.
> 
> So my question: does that also have to be fixed in the kernel in
> stable?
> 
> IIRC this was only triggered by newer versions qcontrol but I can't
> remember the details.

I don't know about qcontrol, I only triggered this by direct interaction
with the rtc. There the problem happens if the alarm is enabled and the
respective irq event fires. (So I guess qcontrol enables the alarm.)

This is fixed (as good as possible) in mainline since v4.8-rc1[1]. In
Debian it's fixed since 4.6.4-1. The kernel supports setting an alarm
since

542dd33a4925 ("drivers/rtc/rtc-s35390a.c: add wakealarm support for 
rtc-s35390A rtc chip")

which is in v3.7-rc1.

If the device is already in a borked state (i.e.  the irq is active but
the respective flag is already read and so cleared) even a new kernel
doesn't repair this. To fix it follow the directions in

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266#95

.

Back then I prepared a backport to jessie (which still sits in a topic
branch in the debian-kernel repo[2]) but it seems I forgot to merge it into
the jessie kernel.

I wonder if the better fix would be to fix this in linux-stable instead.
What do you think?

Best regards
Uwe

[1] http://git.kernel.org/linus/3bd32722c827
[2] 
https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=1d69dac66c315a290fb61c5f400e056e8d01fe50


signature.asc
Description: PGP signature


Bug#854854: qcontrol: reboot/poweroff

2017-03-15 Thread Martin Michlmayr
> After new installation of Debian the system is properly powering
> down either shutdownor by power button. Also the restart is working
> by power button. But after some days running the system the machine
> is not powering down completely anymore. The status-LED is blinking
> red/green, power LED is blue. The system can only be restarted by
> disconnecting from power. The power button is not working in this
> moment.  This effect happens if I stop by shutdown command as well
> as by power button.

Peter pointed out that this is #794266 which Uwe fixed in the kernel.

So my question: does that also have to be fixed in the kernel in
stable?

IIRC this was only triggered by newer versions qcontrol but I can't
remember the details.

Uwe?

-- 
Martin Michlmayr
http://www.cyrius.com/