diff mbox

[VIVID,SRU] UBUNTU: SAUCE: dma: dw_dmac: Workaround for stop probing on HP X360 laptop v2

Message ID 1444983532-4252-2-git-send-email-phidias.chiang@canonical.com
State New
Headers show

Commit Message

Phidias Chiang Oct. 16, 2015, 8:18 a.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1501580

On HP X360, dw_dmac causes random hang when booting, and fail to
power off when shuting down. The fix from upstream hasn't hit mainline
yet, but there are already users had the issue. To avoid this problem,
this workaround return -ENODEV directly when probing if DMI string match
the product name.

Signed-off-by: Phidias Chiang <phidias.chiang@canonical.com>
Reviewed-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>

---
 drivers/dma/dw/platform.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Stefan Bader Oct. 16, 2015, 8:37 a.m. UTC | #1
On 16.10.2015 10:18, Phidias Chiang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1501580
> 
> On HP X360, dw_dmac causes random hang when booting, and fail to
> power off when shuting down. The fix from upstream hasn't hit mainline
> yet, but there are already users had the issue. To avoid this problem,
> this workaround return -ENODEV directly when probing if DMI string match
> the product name.
> 
> Signed-off-by: Phidias Chiang <phidias.chiang@canonical.com>
> Reviewed-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> 
> ---
>  drivers/dma/dw/platform.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
> index 272f01f..599df58 100644
> --- a/drivers/dma/dw/platform.c
> +++ b/drivers/dma/dw/platform.c
> @@ -23,6 +23,7 @@
>  #include <linux/of_dma.h>
>  #include <linux/acpi.h>
>  #include <linux/acpi_dma.h>
> +#include <linux/dmi.h>
>  
>  #include "internal.h"
>  
> @@ -158,6 +159,19 @@ static int dw_probe(struct platform_device *pdev)
>  	struct dw_dma_platform_data *pdata;
>  	int err;
>  
> +	/*
> +	* On a certain platform, loading dw_dmac causes issues
> +	* when booting and shuting down. To avoid this problem,
> +	* we temporarily skip the probing process, and will revert
> +	* this workaround when the fix is ready from upstream.
> +	*
> +	* Ref: https://bugzilla.kernel.org/show_bug.cgi?id=101271
> +	*/
> +	if (dmi_match(DMI_PRODUCT_NAME, "HP x360 310 G2 PC")) {
> +		pr_info("HP X360 detected, skip probing dw_dmac\n");
> +		return -ENODEV;
> +	}
> +
>  	chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
>  	if (!chip)
>  		return -ENOMEM;
> 

Sounds acceptable with the explanation given. Just wondering whether Vivid is
the only Release affected. What about Wily and Trusty for example...

-Stefan
Phidias Chiang Oct. 16, 2015, 10:03 a.m. UTC | #2
On Fri, Oct 16, 2015 at 4:37 PM, Stefan Bader <stefan.bader@canonical.com>
wrote:
>
> Sounds acceptable with the explanation given. Just wondering whether Vivid
> is
> the only Release affected. What about Wily and Trusty for example...
>
>
Trusty (3.13.0) will be fine, because the Braswell support was added in
3.17.0,
which then the dw_dmac will be loaded and cause the issue.

And we were focusing on 3.19 for OEM project and didn't test on Wily at the
time.
We may need to do more test on Wily to see how it goes.
diff mbox

Patch

diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index 272f01f..599df58 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -23,6 +23,7 @@ 
 #include <linux/of_dma.h>
 #include <linux/acpi.h>
 #include <linux/acpi_dma.h>
+#include <linux/dmi.h>
 
 #include "internal.h"
 
@@ -158,6 +159,19 @@  static int dw_probe(struct platform_device *pdev)
 	struct dw_dma_platform_data *pdata;
 	int err;
 
+	/*
+	* On a certain platform, loading dw_dmac causes issues
+	* when booting and shuting down. To avoid this problem,
+	* we temporarily skip the probing process, and will revert
+	* this workaround when the fix is ready from upstream.
+	*
+	* Ref: https://bugzilla.kernel.org/show_bug.cgi?id=101271
+	*/
+	if (dmi_match(DMI_PRODUCT_NAME, "HP x360 310 G2 PC")) {
+		pr_info("HP X360 detected, skip probing dw_dmac\n");
+		return -ENODEV;
+	}
+
 	chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
 	if (!chip)
 		return -ENOMEM;