All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06  4:33 ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06  4:33 UTC (permalink / raw)
  To: hdegoede, axboe, tj, linux-ide, linux-arm-kernel, linux-kernel,
	joe, arnd, gregkh
  Cc: patches, Suman Tripathi, Rameshwar Prasad Sahu

Due to hardware errata, Ampere Computing eMAG SATA can't support
AHCI ALPM feature. This patch disables the AHCI ALPM feature for
eMAG SATA.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.

Changes for v3:

* Fix the indentation and whitespace warnings.

Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
 drivers/ata/ahci_platform.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a89..9ba283f 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
 	.port_ops	= &ahci_platform_ops,
 };

+static const struct ata_port_info ahci_port_info_nolpm = {
+	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
+	.pio_mask	= ATA_PIO4,
+	.udma_mask	= ATA_UDMA6,
+	.port_ops	= &ahci_platform_ops,
+};
+
 static struct scsi_host_template ahci_platform_sht = {
 	AHCI_SHT(DRV_NAME),
 };
@@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct ahci_host_priv *hpriv;
+	const struct ata_port_info *port;
 	int rc;

 	hpriv = ahci_platform_get_resources(pdev);
@@ -57,7 +65,11 @@ 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;

-	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
+	port = acpi_device_get_match_data(dev);
+	if (!port)
+		port = &ahci_port_info;
+
+	rc = ahci_platform_init_host(pdev, hpriv, port,
 				     &ahci_platform_sht);
 	if (rc)
 		goto disable_resources;
@@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
 MODULE_DEVICE_TABLE(of, ahci_of_match);

 static const struct acpi_device_id ahci_acpi_match[] = {
+	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
 	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
 	{},
 };
--
2.7.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06  4:33 ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06  4:33 UTC (permalink / raw)
  To: linux-arm-kernel

Due to hardware errata, Ampere Computing eMAG SATA can't support
AHCI ALPM feature. This patch disables the AHCI ALPM feature for
eMAG SATA.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.

Changes for v3:

* Fix the indentation and whitespace warnings.

Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
 drivers/ata/ahci_platform.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a89..9ba283f 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
        .port_ops       = &ahci_platform_ops,
 };

+static const struct ata_port_info ahci_port_info_nolpm = {
+       .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
+       .pio_mask       = ATA_PIO4,
+       .udma_mask      = ATA_UDMA6,
+       .port_ops       = &ahci_platform_ops,
+};
+
 static struct scsi_host_template ahci_platform_sht = {
        AHCI_SHT(DRV_NAME),
 };
@@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct ahci_host_priv *hpriv;
+       const struct ata_port_info *port;
        int rc;

        hpriv = ahci_platform_get_resources(pdev);
@@ -57,7 +65,11 @@ 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;

-       rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
+       port = acpi_device_get_match_data(dev);
+       if (!port)
+               port = &ahci_port_info;
+
+       rc = ahci_platform_init_host(pdev, hpriv, port,
                                     &ahci_platform_sht);
        if (rc)
                goto disable_resources;
@@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
 MODULE_DEVICE_TABLE(of, ahci_of_match);

 static const struct acpi_device_id ahci_acpi_match[] = {
+       { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
        {},
 };
--
2.7.4

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06  4:33 ` Suman Tripathi
@ 2018-09-06  7:31   ` Hans de Goede
  -1 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06  7:31 UTC (permalink / raw)
  To: Suman Tripathi, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: patches, Rameshwar Prasad Sahu

Hi,

On 06-09-18 06:33, Suman Tripathi wrote:
> Due to hardware errata, Ampere Computing eMAG SATA can't support
> AHCI ALPM feature. This patch disables the AHCI ALPM feature for
> eMAG SATA.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> 
> Changes for v3:
> 
> * Fix the indentation and whitespace warnings.
> 
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

Small remark, normally the changelog is put after the Signed-off-by messages like
this:

"""
Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
Changes for v3:
* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.
"""

This will cause git am to remove it, so that the git history just
has your original commit message.

By itself this would not be a reason to request a new version, but it
seems you've copy and pasted the patch from "git format-patch" output
into you mail client. I tried to run checkpatch myself to make
sure you caught all whitespace issues and I got this:

[hans@shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
ERROR: patch seems to be corrupt (line wrapped?)
#177: FILE: drivers/ata/ahci_platform.c:34:


ERROR: DOS line endings
#178: FILE: drivers/ata/ahci_platform.c:35:
+static const struct ata_port_info ahci_port_info_nolpm = {^M$

ERROR: DOS line endings
#179: FILE: drivers/ata/ahci_platform.c:36:
+^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$

ERROR: DOS line endings
#180: FILE: drivers/ata/ahci_platform.c:37:
+^I.pio_mask^I= ATA_PIO4,^M$

ERROR: DOS line endings
#181: FILE: drivers/ata/ahci_platform.c:38:
+^I.udma_mask^I= ATA_UDMA6,^M$

Followed by lots more errors, line 177 of the email is empty,
while it should contain a single space. This stripping
of whitespace typically is the result of copy pasting
or some other processing of the patch.

Please try to re-send v3 using the "git send-email" command,
so that we get a patch which we can actually apply.

Regards,

Hans





> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>   	.port_ops	= &ahci_platform_ops,
>   };
> 
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +	.pio_mask	= ATA_PIO4,
> +	.udma_mask	= ATA_UDMA6,
> +	.port_ops	= &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>   	AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct ahci_host_priv *hpriv;
> +	const struct ata_port_info *port;
>   	int rc;
> 
>   	hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
> 
> -	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +	port = acpi_device_get_match_data(dev);
> +	if (!port)
> +		port = &ahci_port_info;
> +
> +	rc = ahci_platform_init_host(pdev, hpriv, port,
>   				     &ahci_platform_sht);
>   	if (rc)
>   		goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
> 
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>   	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>   	{},
>   };
> --
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06  7:31   ` Hans de Goede
  0 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 06-09-18 06:33, Suman Tripathi wrote:
> Due to hardware errata, Ampere Computing eMAG SATA can't support
> AHCI ALPM feature. This patch disables the AHCI ALPM feature for
> eMAG SATA.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> 
> Changes for v3:
> 
> * Fix the indentation and whitespace warnings.
> 
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

Small remark, normally the changelog is put after the Signed-off-by messages like
this:

"""
Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
Changes for v3:
* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.
"""

This will cause git am to remove it, so that the git history just
has your original commit message.

By itself this would not be a reason to request a new version, but it
seems you've copy and pasted the patch from "git format-patch" output
into you mail client. I tried to run checkpatch myself to make
sure you caught all whitespace issues and I got this:

[hans at shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
ERROR: patch seems to be corrupt (line wrapped?)
#177: FILE: drivers/ata/ahci_platform.c:34:


ERROR: DOS line endings
#178: FILE: drivers/ata/ahci_platform.c:35:
+static const struct ata_port_info ahci_port_info_nolpm = {^M$

ERROR: DOS line endings
#179: FILE: drivers/ata/ahci_platform.c:36:
+^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$

ERROR: DOS line endings
#180: FILE: drivers/ata/ahci_platform.c:37:
+^I.pio_mask^I= ATA_PIO4,^M$

ERROR: DOS line endings
#181: FILE: drivers/ata/ahci_platform.c:38:
+^I.udma_mask^I= ATA_UDMA6,^M$

Followed by lots more errors, line 177 of the email is empty,
while it should contain a single space. This stripping
of whitespace typically is the result of copy pasting
or some other processing of the patch.

Please try to re-send v3 using the "git send-email" command,
so that we get a patch which we can actually apply.

Regards,

Hans





> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>   	.port_ops	= &ahci_platform_ops,
>   };
> 
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +	.pio_mask	= ATA_PIO4,
> +	.udma_mask	= ATA_UDMA6,
> +	.port_ops	= &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>   	AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct ahci_host_priv *hpriv;
> +	const struct ata_port_info *port;
>   	int rc;
> 
>   	hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
> 
> -	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +	port = acpi_device_get_match_data(dev);
> +	if (!port)
> +		port = &ahci_port_info;
> +
> +	rc = ahci_platform_init_host(pdev, hpriv, port,
>   				     &ahci_platform_sht);
>   	if (rc)
>   		goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
> 
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>   	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>   	{},
>   };
> --
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06  7:31   ` Hans de Goede
  (?)
@ 2018-09-06 12:51     ` Suman Tripathi
  -1 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 12:51 UTC (permalink / raw)
  To: Hans de Goede, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Hans,

I ran checkpatch and see no error. I will check my git-send-email

scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked

0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 12:32 AM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 06:33, Suman Tripathi wrote:
> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI 
> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Small remark, normally the changelog is put after the Signed-off-by messages like
this:

"""
Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
Changes for v3:
* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.
"""

This will cause git am to remove it, so that the git history just has your original commit message.

By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:

[hans@shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
ERROR: patch seems to be corrupt (line wrapped?)
#177: FILE: drivers/ata/ahci_platform.c:34:


ERROR: DOS line endings
#178: FILE: drivers/ata/ahci_platform.c:35:
+static const struct ata_port_info ahci_port_info_nolpm = {^M$

ERROR: DOS line endings
#179: FILE: drivers/ata/ahci_platform.c:36:
+^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$

ERROR: DOS line endings
#180: FILE: drivers/ata/ahci_platform.c:37:
+^I.pio_mask^I= ATA_PIO4,^M$

ERROR: DOS line endings
#181: FILE: drivers/ata/ahci_platform.c:38:
+^I.udma_mask^I= ATA_UDMA6,^M$

Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.

Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.

Regards,

Hans





> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 12:51     ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 12:51 UTC (permalink / raw)
  To: Hans de Goede, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Hans,

I ran checkpatch and see no error. I will check my git-send-email

scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked

0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 12:32 AM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 06:33, Suman Tripathi wrote:
> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI 
> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Small remark, normally the changelog is put after the Signed-off-by messages like
this:

"""
Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
Changes for v3:
* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.
"""

This will cause git am to remove it, so that the git history just has your original commit message.

By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:

[hans@shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
ERROR: patch seems to be corrupt (line wrapped?)
#177: FILE: drivers/ata/ahci_platform.c:34:


ERROR: DOS line endings
#178: FILE: drivers/ata/ahci_platform.c:35:
+static const struct ata_port_info ahci_port_info_nolpm = {^M$

ERROR: DOS line endings
#179: FILE: drivers/ata/ahci_platform.c:36:
+^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$

ERROR: DOS line endings
#180: FILE: drivers/ata/ahci_platform.c:37:
+^I.pio_mask^I= ATA_PIO4,^M$

ERROR: DOS line endings
#181: FILE: drivers/ata/ahci_platform.c:38:
+^I.udma_mask^I= ATA_UDMA6,^M$

Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.

Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.

Regards,

Hans





> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 12:51     ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 12:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

I ran checkpatch and see no error. I will check my git-send-email

scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked

0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 12:32 AM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe at kernel.dk; tj at kernel.org; linux-ide at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; joe at perches.com; arnd at arndb.de; gregkh at linuxfoundation.org
Cc: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 06:33, Suman Tripathi wrote:
> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI 
> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Small remark, normally the changelog is put after the Signed-off-by messages like
this:

"""
Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
---
Changes for v3:
* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.
"""

This will cause git am to remove it, so that the git history just has your original commit message.

By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:

[hans at shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
ERROR: patch seems to be corrupt (line wrapped?)
#177: FILE: drivers/ata/ahci_platform.c:34:


ERROR: DOS line endings
#178: FILE: drivers/ata/ahci_platform.c:35:
+static const struct ata_port_info ahci_port_info_nolpm = {^M$

ERROR: DOS line endings
#179: FILE: drivers/ata/ahci_platform.c:36:
+^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$

ERROR: DOS line endings
#180: FILE: drivers/ata/ahci_platform.c:37:
+^I.pio_mask^I= ATA_PIO4,^M$

ERROR: DOS line endings
#181: FILE: drivers/ata/ahci_platform.c:38:
+^I.udma_mask^I= ATA_UDMA6,^M$

Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.

Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.

Regards,

Hans





> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06 12:51     ` Suman Tripathi
  (?)
@ 2018-09-06 12:54       ` Hans de Goede
  -1 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06 12:54 UTC (permalink / raw)
  To: Suman Tripathi, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi,

On 06-09-18 14:51, Suman Tripathi wrote:
> Hi Hans,
> 
> I ran checkpatch and see no error. I will check my git-send-email

Right, the problem is not with the patch, but with your email client
mangling the file.

git send-email will send the patch for you without damaging it.

Regards,

Hans



> 
> scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked
> 
> 0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.
> 
> 
> With regards,
> Suman
> 
> 
> 
> -----Original Message-----
> From: Hans de Goede <hdegoede@redhat.com>
> Sent: Thursday, September 6, 2018 12:32 AM
> To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
> Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
> 
> [NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________
> 
> Hi,
> 
> On 06-09-18 06:33, Suman Tripathi wrote:
>> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI
>> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>>
>> Changes for v2:
>>
>> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
>> * Include this object for eMAG SATA inside the acpi match table.
>> * Retrieve the ata_port_info from the acpi match table.
>>
>> Changes for v3:
>>
>> * Fix the indentation and whitespace warnings.
>>
>> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
>> Signed-off-by: Rameshwar Prasad Sahu
>> <rameshwar.sahu@amperecomputing.com>
> 
> Small remark, normally the changelog is put after the Signed-off-by messages like
> this:
> 
> """
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
> ---
> Changes for v3:
> * Fix the indentation and whitespace warnings.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> """
> 
> This will cause git am to remove it, so that the git history just has your original commit message.
> 
> By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:
> 
> [hans@shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
> ERROR: patch seems to be corrupt (line wrapped?)
> #177: FILE: drivers/ata/ahci_platform.c:34:
> 
> 
> ERROR: DOS line endings
> #178: FILE: drivers/ata/ahci_platform.c:35:
> +static const struct ata_port_info ahci_port_info_nolpm = {^M$
> 
> ERROR: DOS line endings
> #179: FILE: drivers/ata/ahci_platform.c:36:
> +^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$
> 
> ERROR: DOS line endings
> #180: FILE: drivers/ata/ahci_platform.c:37:
> +^I.pio_mask^I= ATA_PIO4,^M$
> 
> ERROR: DOS line endings
> #181: FILE: drivers/ata/ahci_platform.c:38:
> +^I.udma_mask^I= ATA_UDMA6,^M$
> 
> Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.
> 
> Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.
> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>> ---
>>    drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>>    1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
>> index 99f9a89..9ba283f 100644
>> --- a/drivers/ata/ahci_platform.c
>> +++ b/drivers/ata/ahci_platform.c
>> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>>        .port_ops       = &ahci_platform_ops,
>>    };
>>
>> +static const struct ata_port_info ahci_port_info_nolpm = {
>> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
>> +     .pio_mask       = ATA_PIO4,
>> +     .udma_mask      = ATA_UDMA6,
>> +     .port_ops       = &ahci_platform_ops,
>> +};
>> +
>>    static struct scsi_host_template ahci_platform_sht = {
>>        AHCI_SHT(DRV_NAME),
>>    };
>> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>>    {
>>        struct device *dev = &pdev->dev;
>>        struct ahci_host_priv *hpriv;
>> +     const struct ata_port_info *port;
>>        int rc;
>>
>>        hpriv = ahci_platform_get_resources(pdev);
>> @@ -57,7 +65,11 @@ 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;
>>
>> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
>> +     port = acpi_device_get_match_data(dev);
>> +     if (!port)
>> +             port = &ahci_port_info;
>> +
>> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>>                                     &ahci_platform_sht);
>>        if (rc)
>>                goto disable_resources;
>> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>>    MODULE_DEVICE_TABLE(of, ahci_of_match);
>>
>>    static const struct acpi_device_id ahci_acpi_match[] = {
>> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>>        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>>        {},
>>    };
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 12:54       ` Hans de Goede
  0 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06 12:54 UTC (permalink / raw)
  To: Suman Tripathi, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi,

On 06-09-18 14:51, Suman Tripathi wrote:
> Hi Hans,
> 
> I ran checkpatch and see no error. I will check my git-send-email

Right, the problem is not with the patch, but with your email client
mangling the file.

git send-email will send the patch for you without damaging it.

Regards,

Hans



> 
> scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked
> 
> 0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.
> 
> 
> With regards,
> Suman
> 
> 
> 
> -----Original Message-----
> From: Hans de Goede <hdegoede@redhat.com>
> Sent: Thursday, September 6, 2018 12:32 AM
> To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
> Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
> 
> [NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________
> 
> Hi,
> 
> On 06-09-18 06:33, Suman Tripathi wrote:
>> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI
>> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>>
>> Changes for v2:
>>
>> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
>> * Include this object for eMAG SATA inside the acpi match table.
>> * Retrieve the ata_port_info from the acpi match table.
>>
>> Changes for v3:
>>
>> * Fix the indentation and whitespace warnings.
>>
>> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
>> Signed-off-by: Rameshwar Prasad Sahu
>> <rameshwar.sahu@amperecomputing.com>
> 
> Small remark, normally the changelog is put after the Signed-off-by messages like
> this:
> 
> """
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
> ---
> Changes for v3:
> * Fix the indentation and whitespace warnings.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> """
> 
> This will cause git am to remove it, so that the git history just has your original commit message.
> 
> By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:
> 
> [hans@shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
> ERROR: patch seems to be corrupt (line wrapped?)
> #177: FILE: drivers/ata/ahci_platform.c:34:
> 
> 
> ERROR: DOS line endings
> #178: FILE: drivers/ata/ahci_platform.c:35:
> +static const struct ata_port_info ahci_port_info_nolpm = {^M$
> 
> ERROR: DOS line endings
> #179: FILE: drivers/ata/ahci_platform.c:36:
> +^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$
> 
> ERROR: DOS line endings
> #180: FILE: drivers/ata/ahci_platform.c:37:
> +^I.pio_mask^I= ATA_PIO4,^M$
> 
> ERROR: DOS line endings
> #181: FILE: drivers/ata/ahci_platform.c:38:
> +^I.udma_mask^I= ATA_UDMA6,^M$
> 
> Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.
> 
> Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.
> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>> ---
>>    drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>>    1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
>> index 99f9a89..9ba283f 100644
>> --- a/drivers/ata/ahci_platform.c
>> +++ b/drivers/ata/ahci_platform.c
>> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>>        .port_ops       = &ahci_platform_ops,
>>    };
>>
>> +static const struct ata_port_info ahci_port_info_nolpm = {
>> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
>> +     .pio_mask       = ATA_PIO4,
>> +     .udma_mask      = ATA_UDMA6,
>> +     .port_ops       = &ahci_platform_ops,
>> +};
>> +
>>    static struct scsi_host_template ahci_platform_sht = {
>>        AHCI_SHT(DRV_NAME),
>>    };
>> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>>    {
>>        struct device *dev = &pdev->dev;
>>        struct ahci_host_priv *hpriv;
>> +     const struct ata_port_info *port;
>>        int rc;
>>
>>        hpriv = ahci_platform_get_resources(pdev);
>> @@ -57,7 +65,11 @@ 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;
>>
>> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
>> +     port = acpi_device_get_match_data(dev);
>> +     if (!port)
>> +             port = &ahci_port_info;
>> +
>> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>>                                     &ahci_platform_sht);
>>        if (rc)
>>                goto disable_resources;
>> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>>    MODULE_DEVICE_TABLE(of, ahci_of_match);
>>
>>    static const struct acpi_device_id ahci_acpi_match[] = {
>> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>>        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>>        {},
>>    };
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 12:54       ` Hans de Goede
  0 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 06-09-18 14:51, Suman Tripathi wrote:
> Hi Hans,
> 
> I ran checkpatch and see no error. I will check my git-send-email

Right, the problem is not with the patch, but with your email client
mangling the file.

git send-email will send the patch for you without damaging it.

Regards,

Hans



> 
> scripts/checkpatch.pl  0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch total: 0 errors, 0 warnings, 39 lines checked
> 
> 0001-ata-Disable-AHCI-ALPM-feature-for-Ampere-Computing-e.patch has no obvious style problems and is ready for submission.
> 
> 
> With regards,
> Suman
> 
> 
> 
> -----Original Message-----
> From: Hans de Goede <hdegoede@redhat.com>
> Sent: Thursday, September 6, 2018 12:32 AM
> To: Suman Tripathi <stripathi@amperecomputing.com>; axboe at kernel.dk; tj at kernel.org; linux-ide at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; joe at perches.com; arnd at arndb.de; gregkh at linuxfoundation.org
> Cc: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
> Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
> 
> [NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________
> 
> Hi,
> 
> On 06-09-18 06:33, Suman Tripathi wrote:
>> Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI
>> ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA.
>>
>> Changes for v2:
>>
>> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
>> * Include this object for eMAG SATA inside the acpi match table.
>> * Retrieve the ata_port_info from the acpi match table.
>>
>> Changes for v3:
>>
>> * Fix the indentation and whitespace warnings.
>>
>> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
>> Signed-off-by: Rameshwar Prasad Sahu
>> <rameshwar.sahu@amperecomputing.com>
> 
> Small remark, normally the changelog is put after the Signed-off-by messages like
> this:
> 
> """
> Signed-off-by: Suman Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>
> ---
> Changes for v3:
> * Fix the indentation and whitespace warnings.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> """
> 
> This will cause git am to remove it, so that the git history just has your original commit message.
> 
> By itself this would not be a reason to request a new version, but it seems you've copy and pasted the patch from "git format-patch" output into you mail client. I tried to run checkpatch myself to make sure you caught all whitespace issues and I got this:
> 
> [hans at shalem linux]$ scripts/checkpatch.pl ~/\[PATCH\ v3\]\ ata\:\ Disable\ AHCI\ ALPM\ feature\ for\ Ampere\ Computing\ eMAG\ SATA.eml
> ERROR: patch seems to be corrupt (line wrapped?)
> #177: FILE: drivers/ata/ahci_platform.c:34:
> 
> 
> ERROR: DOS line endings
> #178: FILE: drivers/ata/ahci_platform.c:35:
> +static const struct ata_port_info ahci_port_info_nolpm = {^M$
> 
> ERROR: DOS line endings
> #179: FILE: drivers/ata/ahci_platform.c:36:
> +^I.flags^I^I= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,^M$
> 
> ERROR: DOS line endings
> #180: FILE: drivers/ata/ahci_platform.c:37:
> +^I.pio_mask^I= ATA_PIO4,^M$
> 
> ERROR: DOS line endings
> #181: FILE: drivers/ata/ahci_platform.c:38:
> +^I.udma_mask^I= ATA_UDMA6,^M$
> 
> Followed by lots more errors, line 177 of the email is empty, while it should contain a single space. This stripping of whitespace typically is the result of copy pasting or some other processing of the patch.
> 
> Please try to re-send v3 using the "git send-email" command, so that we get a patch which we can actually apply.
> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>> ---
>>    drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>>    1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
>> index 99f9a89..9ba283f 100644
>> --- a/drivers/ata/ahci_platform.c
>> +++ b/drivers/ata/ahci_platform.c
>> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>>        .port_ops       = &ahci_platform_ops,
>>    };
>>
>> +static const struct ata_port_info ahci_port_info_nolpm = {
>> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
>> +     .pio_mask       = ATA_PIO4,
>> +     .udma_mask      = ATA_UDMA6,
>> +     .port_ops       = &ahci_platform_ops,
>> +};
>> +
>>    static struct scsi_host_template ahci_platform_sht = {
>>        AHCI_SHT(DRV_NAME),
>>    };
>> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>>    {
>>        struct device *dev = &pdev->dev;
>>        struct ahci_host_priv *hpriv;
>> +     const struct ata_port_info *port;
>>        int rc;
>>
>>        hpriv = ahci_platform_get_resources(pdev);
>> @@ -57,7 +65,11 @@ 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;
>>
>> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
>> +     port = acpi_device_get_match_data(dev);
>> +     if (!port)
>> +             port = &ahci_port_info;
>> +
>> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>>                                     &ahci_platform_sht);
>>        if (rc)
>>                goto disable_resources;
>> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>>    MODULE_DEVICE_TABLE(of, ahci_of_match);
>>
>>    static const struct acpi_device_id ahci_acpi_match[] = {
>> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>>        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>>        {},
>>    };
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-07 16:35         ` Suman Tripathi
  (?)
@ 2018-09-07 16:36           ` Jens Axboe
  -1 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 16:36 UTC (permalink / raw)
  To: Suman Tripathi, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

On 9/7/18 10:35 AM, Suman Tripathi wrote:
>> I can apply it manually while you work out the kinks in your email
>> setup. It might even be your company MTA mangling it, I've seen all
>> sorts of crazy like that.
>
> Thanks for the support. We are working with IT to fix this issue.

Good luck! If all else fails, there's always gmail...

In any case, queued up:

http://git.kernel.dk/cgit/linux-block/commit/?h=for-4.20/libata&id=20bdc376b427cb420836f39ee8f281ea85dbaeef

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 16:36           ` Jens Axboe
  0 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 16:36 UTC (permalink / raw)
  To: Suman Tripathi, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

On 9/7/18 10:35 AM, Suman Tripathi wrote:
>> I can apply it manually while you work out the kinks in your email
>> setup. It might even be your company MTA mangling it, I've seen all
>> sorts of crazy like that.
>
> Thanks for the support. We are working with IT to fix this issue.

Good luck! If all else fails, there's always gmail...

In any case, queued up:

http://git.kernel.dk/cgit/linux-block/commit/?h=for-4.20/libata&id=20bdc376b427cb420836f39ee8f281ea85dbaeef

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 16:36           ` Jens Axboe
  0 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 16:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/7/18 10:35 AM, Suman Tripathi wrote:
>> I can apply it manually while you work out the kinks in your email
>> setup. It might even be your company MTA mangling it, I've seen all
>> sorts of crazy like that.
>
> Thanks for the support. We are working with IT to fix this issue.

Good luck! If all else fails, there's always gmail...

In any case, queued up:

http://git.kernel.dk/cgit/linux-block/commit/?h=for-4.20/libata&id=20bdc376b427cb420836f39ee8f281ea85dbaeef

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-07 14:25       ` Jens Axboe
  (?)
@ 2018-09-07 16:35         ` Suman Tripathi
  -1 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-07 16:35 UTC (permalink / raw)
  To: Jens Axboe, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Jens

With regards,
Suman



>-----Original Message-----
>From: Jens Axboe <axboe@kernel.dk>
>Sent: Friday, September 7, 2018 7:26 AM
>To: Suman Tripathi <stripathi@amperecomputing.com>; Hans de Goede
><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: Open Source Submission <patches@amperecomputing.com>; Rameshwar
>Sahu <Rameshwar.Sahu@amperecomputing.com>
>Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing
>eMAG SATA
>
>[NOTICE: This email originated from an external sender. Please be mindful of
>safe email handling and proprietary information protection practices.]
>_____________________________________________________________
>___________________________________________________________
>
>On 9/6/18 2:08 PM, Suman Tripathi wrote:
>>> Sorry, but the patch is still coming through mangled. Did you use git
>>> send-email ?
>>
>> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
>> inconvenience. Will figure the issue out
>
>I can apply it manually while you work out the kinks in your email setup. It might
>even be your company MTA mangling it, I've seen all sorts of crazy like that.
Thanks for the support. We are working with IT to fix this issue.
>
>--
>Jens Axboe


^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 16:35         ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-07 16:35 UTC (permalink / raw)
  To: Jens Axboe, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Jens

With regards,
Suman



>-----Original Message-----
>From: Jens Axboe <axboe@kernel.dk>
>Sent: Friday, September 7, 2018 7:26 AM
>To: Suman Tripathi <stripathi@amperecomputing.com>; Hans de Goede
><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: Open Source Submission <patches@amperecomputing.com>; Rameshwar
>Sahu <Rameshwar.Sahu@amperecomputing.com>
>Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing
>eMAG SATA
>
>[NOTICE: This email originated from an external sender. Please be mindful of
>safe email handling and proprietary information protection practices.]
>_____________________________________________________________
>___________________________________________________________
>
>On 9/6/18 2:08 PM, Suman Tripathi wrote:
>>> Sorry, but the patch is still coming through mangled. Did you use git
>>> send-email ?
>>
>> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
>> inconvenience. Will figure the issue out
>
>I can apply it manually while you work out the kinks in your email setup. It might
>even be your company MTA mangling it, I've seen all sorts of crazy like that.
Thanks for the support. We are working with IT to fix this issue.
>
>--
>Jens Axboe


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 16:35         ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-07 16:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jens

With regards,
Suman



>-----Original Message-----
>From: Jens Axboe <axboe@kernel.dk>
>Sent: Friday, September 7, 2018 7:26 AM
>To: Suman Tripathi <stripathi@amperecomputing.com>; Hans de Goede
><hdegoede@redhat.com>; tj at kernel.org; linux-ide at vger.kernel.org; linux-
>arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
>joe at perches.com; arnd at arndb.de; gregkh at linuxfoundation.org
>Cc: Open Source Submission <patches@amperecomputing.com>; Rameshwar
>Sahu <Rameshwar.Sahu@amperecomputing.com>
>Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing
>eMAG SATA
>
>[NOTICE: This email originated from an external sender. Please be mindful of
>safe email handling and proprietary information protection practices.]
>_____________________________________________________________
>___________________________________________________________
>
>On 9/6/18 2:08 PM, Suman Tripathi wrote:
>>> Sorry, but the patch is still coming through mangled. Did you use git
>>> send-email ?
>>
>> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
>> inconvenience. Will figure the issue out
>
>I can apply it manually while you work out the kinks in your email setup. It might
>even be your company MTA mangling it, I've seen all sorts of crazy like that.
Thanks for the support. We are working with IT to fix this issue.
>
>--
>Jens Axboe

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06 20:08     ` Suman Tripathi
  (?)
@ 2018-09-07 14:25       ` Jens Axboe
  -1 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 14:25 UTC (permalink / raw)
  To: Suman Tripathi, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

On 9/6/18 2:08 PM, Suman Tripathi wrote:
>> Sorry, but the patch is still coming through mangled. Did you use git
>> send-email ?
>
> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
> inconvenience. Will figure the issue out

I can apply it manually while you work out the kinks in your email
setup. It might even be your company MTA mangling it, I've seen all
sorts of crazy like that.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 14:25       ` Jens Axboe
  0 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 14:25 UTC (permalink / raw)
  To: Suman Tripathi, Hans de Goede, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

On 9/6/18 2:08 PM, Suman Tripathi wrote:
>> Sorry, but the patch is still coming through mangled. Did you use git
>> send-email ?
>
> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
> inconvenience. Will figure the issue out

I can apply it manually while you work out the kinks in your email
setup. It might even be your company MTA mangling it, I've seen all
sorts of crazy like that.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-07 14:25       ` Jens Axboe
  0 siblings, 0 replies; 26+ messages in thread
From: Jens Axboe @ 2018-09-07 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/6/18 2:08 PM, Suman Tripathi wrote:
>> Sorry, but the patch is still coming through mangled. Did you use git
>> send-email ?
>
> [Suman Tripathi] yes. I rechecked before sending twice. Sorry for the
> inconvenience. Will figure the issue out

I can apply it manually while you work out the kinks in your email
setup. It might even be your company MTA mangling it, I've seen all
sorts of crazy like that.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06 20:06   ` Hans de Goede
  (?)
@ 2018-09-06 20:08     ` Suman Tripathi
  -1 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 20:08 UTC (permalink / raw)
  To: Hans de Goede, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Hans,


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 1:06 PM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 20:05, Suman Tripathi wrote:
> 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 Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Sorry, but the patch is still coming through mangled. Did you use git send-email ?
[Suman Tripathi] yes. I rechecked before sending twice. Sorry for the inconvenience. Will figure the issue out

Regards,

Hans




>
> ---
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 20:08     ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 20:08 UTC (permalink / raw)
  To: Hans de Goede, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: Open Source Submission, Rameshwar Sahu

Hi Hans,


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 1:06 PM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe@kernel.dk; 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: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 20:05, Suman Tripathi wrote:
> 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 Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Sorry, but the patch is still coming through mangled. Did you use git send-email ?
[Suman Tripathi] yes. I rechecked before sending twice. Sorry for the inconvenience. Will figure the issue out

Regards,

Hans




>
> ---
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 20:08     ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 20:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,


With regards,
Suman



-----Original Message-----
From: Hans de Goede <hdegoede@redhat.com> 
Sent: Thursday, September 6, 2018 1:06 PM
To: Suman Tripathi <stripathi@amperecomputing.com>; axboe at kernel.dk; tj at kernel.org; linux-ide at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; joe at perches.com; arnd at arndb.de; gregkh at linuxfoundation.org
Cc: Open Source Submission <patches@amperecomputing.com>; Rameshwar Sahu <Rameshwar.Sahu@amperecomputing.com>
Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

[NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] ________________________________________________________________________________________________________________________

Hi,

On 06-09-18 20:05, Suman Tripathi wrote:
> 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 Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu 
> <rameshwar.sahu@amperecomputing.com>

Sorry, but the patch is still coming through mangled. Did you use git send-email ?
[Suman Tripathi] yes. I rechecked before sending twice. Sorry for the inconvenience. Will figure the issue out

Regards,

Hans




>
> ---
> Changes for v3:
>
> * Fix the indentation and whitespace warnings.
>
> Changes for v2:
>
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
>
> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c 
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>       .port_ops       = &ahci_platform_ops,
>   };
>
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +     .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +     .pio_mask       = ATA_PIO4,
> +     .udma_mask      = ATA_UDMA6,
> +     .port_ops       = &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>       AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>       struct device *dev = &pdev->dev;
>       struct ahci_host_priv *hpriv;
> +     const struct ata_port_info *port;
>       int rc;
>
>       hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
>
> -     rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +     port = acpi_device_get_match_data(dev);
> +     if (!port)
> +             port = &ahci_port_info;
> +
> +     rc = ahci_platform_init_host(pdev, hpriv, port,
>                                    &ahci_platform_sht);
>       if (rc)
>               goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
>
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +     { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>       { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>       {},
>   };
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  2018-09-06 18:05 ` Suman Tripathi
@ 2018-09-06 20:06   ` Hans de Goede
  -1 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06 20:06 UTC (permalink / raw)
  To: Suman Tripathi, axboe, tj, linux-ide, linux-arm-kernel,
	linux-kernel, joe, arnd, gregkh
  Cc: patches, Rameshwar Prasad Sahu

Hi,

On 06-09-18 20:05, Suman Tripathi wrote:
> 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 Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

Sorry, but the patch is still coming through mangled. Did you use
git send-email ?

Regards,

Hans




> 
> ---
> Changes for v3:
> 
> * Fix the indentation and whitespace warnings.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> 
> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>   	.port_ops	= &ahci_platform_ops,
>   };
> 
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +	.pio_mask	= ATA_PIO4,
> +	.udma_mask	= ATA_UDMA6,
> +	.port_ops	= &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>   	AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct ahci_host_priv *hpriv;
> +	const struct ata_port_info *port;
>   	int rc;
> 
>   	hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
> 
> -	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +	port = acpi_device_get_match_data(dev);
> +	if (!port)
> +		port = &ahci_port_info;
> +
> +	rc = ahci_platform_init_host(pdev, hpriv, port,
>   				     &ahci_platform_sht);
>   	if (rc)
>   		goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
> 
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>   	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>   	{},
>   };
> --
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 20:06   ` Hans de Goede
  0 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2018-09-06 20:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 06-09-18 20:05, Suman Tripathi wrote:
> 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 Trpathi <stripathi@amperecomputing.com>
> Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

Sorry, but the patch is still coming through mangled. Did you use
git send-email ?

Regards,

Hans




> 
> ---
> Changes for v3:
> 
> * Fix the indentation and whitespace warnings.
> 
> Changes for v2:
> 
> * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
> * Include this object for eMAG SATA inside the acpi match table.
> * Retrieve the ata_port_info from the acpi match table.
> 
> ---
>   drivers/ata/ahci_platform.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 99f9a89..9ba283f 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
>   	.port_ops	= &ahci_platform_ops,
>   };
> 
> +static const struct ata_port_info ahci_port_info_nolpm = {
> +	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
> +	.pio_mask	= ATA_PIO4,
> +	.udma_mask	= ATA_UDMA6,
> +	.port_ops	= &ahci_platform_ops,
> +};
> +
>   static struct scsi_host_template ahci_platform_sht = {
>   	AHCI_SHT(DRV_NAME),
>   };
> @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct ahci_host_priv *hpriv;
> +	const struct ata_port_info *port;
>   	int rc;
> 
>   	hpriv = ahci_platform_get_resources(pdev);
> @@ -57,7 +65,11 @@ 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;
> 
> -	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> +	port = acpi_device_get_match_data(dev);
> +	if (!port)
> +		port = &ahci_port_info;
> +
> +	rc = ahci_platform_init_host(pdev, hpriv, port,
>   				     &ahci_platform_sht);
>   	if (rc)
>   		goto disable_resources;
> @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
>   MODULE_DEVICE_TABLE(of, ahci_of_match);
> 
>   static const struct acpi_device_id ahci_acpi_match[] = {
> +	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
>   	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>   	{},
>   };
> --
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 18:05 ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 18:05 UTC (permalink / raw)
  To: hdegoede, axboe, tj, linux-ide, linux-arm-kernel, linux-kernel,
	joe, arnd, gregkh
  Cc: patches, Suman Tripathi, Rameshwar Prasad Sahu

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 Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

---
Changes for v3:

* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.

---
 drivers/ata/ahci_platform.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a89..9ba283f 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
 	.port_ops	= &ahci_platform_ops,
 };

+static const struct ata_port_info ahci_port_info_nolpm = {
+	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
+	.pio_mask	= ATA_PIO4,
+	.udma_mask	= ATA_UDMA6,
+	.port_ops	= &ahci_platform_ops,
+};
+
 static struct scsi_host_template ahci_platform_sht = {
 	AHCI_SHT(DRV_NAME),
 };
@@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct ahci_host_priv *hpriv;
+	const struct ata_port_info *port;
 	int rc;

 	hpriv = ahci_platform_get_resources(pdev);
@@ -57,7 +65,11 @@ 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;

-	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
+	port = acpi_device_get_match_data(dev);
+	if (!port)
+		port = &ahci_port_info;
+
+	rc = ahci_platform_init_host(pdev, hpriv, port,
 				     &ahci_platform_sht);
 	if (rc)
 		goto disable_resources;
@@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
 MODULE_DEVICE_TABLE(of, ahci_of_match);

 static const struct acpi_device_id ahci_acpi_match[] = {
+	{ "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
 	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
 	{},
 };
--
2.7.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
@ 2018-09-06 18:05 ` Suman Tripathi
  0 siblings, 0 replies; 26+ messages in thread
From: Suman Tripathi @ 2018-09-06 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

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 Trpathi <stripathi@amperecomputing.com>
Signed-off-by: Rameshwar Prasad Sahu <rameshwar.sahu@amperecomputing.com>

---
Changes for v3:

* Fix the indentation and whitespace warnings.

Changes for v2:

* Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM.
* Include this object for eMAG SATA inside the acpi match table.
* Retrieve the ata_port_info from the acpi match table.

---
 drivers/ata/ahci_platform.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a89..9ba283f 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = {
        .port_ops       = &ahci_platform_ops,
 };

+static const struct ata_port_info ahci_port_info_nolpm = {
+       .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM,
+       .pio_mask       = ATA_PIO4,
+       .udma_mask      = ATA_UDMA6,
+       .port_ops       = &ahci_platform_ops,
+};
+
 static struct scsi_host_template ahci_platform_sht = {
        AHCI_SHT(DRV_NAME),
 };
@@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct ahci_host_priv *hpriv;
+       const struct ata_port_info *port;
        int rc;

        hpriv = ahci_platform_get_resources(pdev);
@@ -57,7 +65,11 @@ 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;

-       rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
+       port = acpi_device_get_match_data(dev);
+       if (!port)
+               port = &ahci_port_info;
+
+       rc = ahci_platform_init_host(pdev, hpriv, port,
                                     &ahci_platform_sht);
        if (rc)
                goto disable_resources;
@@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = {
 MODULE_DEVICE_TABLE(of, ahci_of_match);

 static const struct acpi_device_id ahci_acpi_match[] = {
+       { "APMC0D33", (unsigned long)&ahci_port_info_nolpm },
        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
        {},
 };
--
2.7.4

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-09-07 16:36 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06  4:33 [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA Suman Tripathi
2018-09-06  4:33 ` Suman Tripathi
2018-09-06  7:31 ` Hans de Goede
2018-09-06  7:31   ` Hans de Goede
2018-09-06 12:51   ` Suman Tripathi
2018-09-06 12:51     ` Suman Tripathi
2018-09-06 12:51     ` Suman Tripathi
2018-09-06 12:54     ` Hans de Goede
2018-09-06 12:54       ` Hans de Goede
2018-09-06 12:54       ` Hans de Goede
2018-09-06 18:05 Suman Tripathi
2018-09-06 18:05 ` Suman Tripathi
2018-09-06 20:06 ` Hans de Goede
2018-09-06 20:06   ` Hans de Goede
2018-09-06 20:08   ` Suman Tripathi
2018-09-06 20:08     ` Suman Tripathi
2018-09-06 20:08     ` Suman Tripathi
2018-09-07 14:25     ` Jens Axboe
2018-09-07 14:25       ` Jens Axboe
2018-09-07 14:25       ` Jens Axboe
2018-09-07 16:35       ` Suman Tripathi
2018-09-07 16:35         ` Suman Tripathi
2018-09-07 16:35         ` Suman Tripathi
2018-09-07 16:36         ` Jens Axboe
2018-09-07 16:36           ` Jens Axboe
2018-09-07 16:36           ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.