[VIVID][SRU][PATCH] UBUNTU: SAUCE: dma: dw_dmac: Workaround for stop probing on HP X360 laptop v2
Phidias Chiang
phidias.chiang at canonical.com
Fri Oct 16 08:18:52 UTC 2015
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 at canonical.com>
Reviewed-by: Wen-chien Jesse Sung <jesse.sung at 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;
--
1.7.9.5
More information about the kernel-team
mailing list