From: Suman Tripathi <stripathi@amperecomputing.com>
To: hdegoede@redhat.com, tj@kernel.org, linux-ide@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, joe@perches.com, arnd@arndb.de,
gregkh@linuxfoundation.org
Cc: patches@amperecomputing.com,
Suman Tripathi <stripathi@amperecomputing.com>,
Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
Subject: [PATCH] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
Date: Mon, 27 Aug 2018 11:47:53 -0700 [thread overview]
Message-ID: <1535395673-30649-1-git-send-email-stripathi@amperecomputing.com> (raw)
Due to hardware errata, Ampere Computing eMAG SATA can't support
AHCI ALPM feature. This patch disables the AHCI ALPM feature for
eMAG SATA.
Signed-off-by: Suman Tripathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
drivers/ata/ahci_platform.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a89..0d0233e 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -26,7 +26,7 @@
#define DRV_NAME "ahci"
-static const struct ata_port_info ahci_port_info = {
+static struct ata_port_info ahci_port_info = {
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
@@ -41,6 +41,8 @@ static int ahci_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
+ struct acpi_device_info *info;
+ acpi_status status;
int rc;
hpriv = ahci_platform_get_resources(pdev);
@@ -57,6 +59,15 @@ static int ahci_probe(struct platform_device *pdev)
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
+ status = acpi_get_object_info(ACPI_HANDLE(dev), &info);
+ if (ACPI_SUCCESS(status)) {
+ if (info->valid & ACPI_VALID_HID) {
+ if (!strcmp("APMC0D33", info->hardware_id.string))
+ ahci_port_info.flags |= ATA_FLAG_NO_LPM;
+ }
+ ACPI_FREE(info);
+ }
+
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
&ahci_platform_sht);
if (rc)
--
1.8.3.1
next reply other threads:[~2018-08-27 18:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 18:47 Suman Tripathi [this message]
2018-08-27 19:08 ` [PATCH] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA Hans de Goede
2018-08-27 19:13 ` Suman Tripathi
-- strict thread matches above, loose matches on Subject: below --
2018-08-25 20:29 Suman Tripathi
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=1535395673-30649-1-git-send-email-stripathi@amperecomputing.com \
--to=stripathi@amperecomputing.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@amperecomputing.com \
--cc=rameshwar.sahu@amperecomputing.com \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).