mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Ken Xue <ken.xue@amd.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, SPG_Linux_Kernel@amd.com,
	mika.westerberg@linux.intel.com,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Ivan.Zheng@amd.com, Alex.Chuang@amd.com
Subject: Re: [PATCH 1/1] ACPI: Support D3 COLD device for old BIOS
Date: Tue, 08 Dec 2015 14:14:17 +0100	[thread overview]
Message-ID: <1717488.DiPkR8HF9g@vostro.rjw.lan> (raw)
In-Reply-To: <1449538676.2175.35.camel@kxue-X58A-UD3R>

On Tuesday, December 08, 2015 09:37:56 AM Ken Xue wrote:
> On Mon, 2015-12-07 at 23:48 +0100, Rafael J. Wysocki wrote:
> > On Monday, December 07, 2015 12:44:33 PM Ken Xue wrote:
> > > D3cold is only regarded as valid if the "_PR3" object is present
> > > for the given device after the commit <20dacb71ad28>
> > > (ACPI/PM: Reworkdevice power management to follow ACPI 6).
> > > 
> > > But some old BIOS only defined "_PS3" for the D3COLD device.
> > > And old kernel also believes the device has "_PS3" is a
> > > D3COLD device.
> > > 
> > > So, add some logics for supporting D3 COLD device for old BIOS
> > > which is compatible with earlier ACPI spec.
> > > 
> > > Signed-off-by: Ken Xue <Ken.Xue@amd.com>
> > > Reported-and-tested-by: Gang Long <Gang.Long@amd.com>
> > 
> > Well, what really is the problem?
> 
> My problem is that
> "acpi_device_can_poweroff" is called by "zpodd_init" in libata-zpodd.c. 
> And ZPODD feature only can be enabled when D3_COLD is valid.

This means that acpi_device_can_poweroff() needs to be updated.  What about
like this:

static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
{
	return adev->power.states[ACPI_STATE_D3_COLD].flags.valid
		|| adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set;
}

Thanks,
Rafael


  reply	other threads:[~2015-12-08 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07  4:44 Ken Xue
2015-12-07 22:48 ` Rafael J. Wysocki
2015-12-08  1:37   ` Ken Xue
2015-12-08 13:14     ` Rafael J. Wysocki [this message]
2015-12-09  1:18       ` Ken Xue

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=1717488.DiPkR8HF9g@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=Alex.Chuang@amd.com \
    --cc=Ivan.Zheng@amd.com \
    --cc=SPG_Linux_Kernel@amd.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=ken.xue@amd.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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

all inboxes | Powered by JetHome®