Opened 7 years ago

Closed 7 years ago

#1729 closed defect (fixed)

After suspend/resuming a few times, *any* SCI does "shutdown"

Reported by: cjb Owned by: dilinger
Priority: blocker Milestone: Trial-2
Component: embedded controller Version:
Keywords: power Cc: jcardona
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

Description

We have the power button set to perform a normal shutdown when we hit it in sugar. After I've been doing suspend/resume for a while on a B3, any SCI (seen: the game keys, removing AC power) causes that shutdown process to start, so it's as if those events are being seen as a power button press.

Assigning to Richard to start with.

Change History (12)

comment:1 follow-up: Changed 7 years ago by jg

  • Keywords power added

comment:2 in reply to: ↑ 1 Changed 7 years ago by rsmith

I don't think this is an EC problem. The EC does not do anything different on SCI's. There is not a shutdown SCI type or a power button SCI type. So I think the kernel is just doing the wrong thing here.

comment:3 follow-up: Changed 7 years ago by cjb

  • Owner changed from rsmith to dilinger

Fair enough. Andres, over to you.

comment:4 in reply to: ↑ 3 Changed 7 years ago by rsmith

Replying to cjb:

Fair enough. Andres, over to you.

However I'll add that power buttons do _generate_ SCI's from the EC as well fire off some stuff in the 5536. I suppose that its possible the SCI the EC generates (but with incorrect type info) could confuse the decision logic. Perhaps adding a Power button EC type is necessary. SCI types are handled by a Bitmap so currently we are limited to 8 SCI types. We are using 6 right now so there are only 2 left.

comment:5 Changed 7 years ago by kimquirk

  • Milestone changed from Trial-2 to BTest-4

Would like to fix this on the B4 boards.

comment:6 Changed 7 years ago by dilinger

I was unable to reproduce this one; cjb says he can, so I'm waiting for that.

comment:7 Changed 7 years ago by jg

  • Milestone changed from BTest-4 to Trial-2

comment:8 follow-up: Changed 7 years ago by jcardona

  • Cc jcardona added

I have observed this problem while testing wireless initiated host resume.
This may be an easier way to reproduce as it requires no key pressing. Just have one node runs a while true; do suspend.sh; done and a second node to ping it.
The problem will occur eventually, unless you hit #1755 first.

comment:9 in reply to: ↑ 8 Changed 7 years ago by jcardona

Replying to jcardona:

I have observed this problem while testing wireless initiated host resume.
This may be an easier way to reproduce as it requires no key pressing. Just have one node runs a while true; do suspend.sh; done and a second node to ping it.
The problem will occur eventually, unless you hit #1755 first.

The fact that I see this problem while on tty, and that no kernel messages shutdown messages appear on the log indicate that this may be a different problem. Created #1814.

comment:10 Changed 7 years ago by cjb

17:20 <cjb> CosmicPenguin: cool, we're making progress.  doesn't look
      like hardware.
17:20 <cjb> CosmicPenguin: the ec is strobing the power button line on
      resume, even when we don't resume with the power button
17:20 <cjb> but the kernel isn't up all the way then
17:21 <cjb> so perhaps it's being left asserted on the southbridge after
      resume
17:21 <cjb> and then we don't clear it, and the first time we try to
      read it after resume, which is when an SCI happens, we see a power
      button press waiting.
17:22 <CosmicPenguin> that would be bad
17:22 <CosmicPenguin> very bad
17:23 <CosmicPenguin> We should be clearing it after resume
17:23 <cjb> why?
17:23 <CosmicPenguin> but the devils advocate in me said that we
      shouldn't ever be setting it
17:23 <cjb> yes
17:23 <cjb> the EC sets it, and there appears to be no reason at all for
      doing so

comment:11 Changed 7 years ago by dilinger

Richard has fixed this in the EC code; we no longer strobe the power button upon resume (I'm testing with q2cdb9.rom). This code should end up in q2c19 once it's released; once that happens, this can be closed.

comment:12 Changed 7 years ago by rsmith

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.