kernel/libata-forbid-port-runtime-pm-by-default.patch

25 lines
807 B
Diff

From: Lin Ming <ming.m.lin@xxxxxxxxx>
Date: Wed, 18 Apr 2012 09:13:41 +0800
Subject: [PATCH] libata: forbid port runtime pm by default
Forbid port runtime pm by default because it has known hotplug issue.
User can allow it by, for example
echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata2/power/control
Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
---
drivers/ata/libata-transport.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
--- linux-3.3.noarch.orig/drivers/ata/libata-transport.c
+++ linux-3.3.noarch/drivers/ata/libata-transport.c
@@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
device_enable_async_suspend(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
+ pm_runtime_forbid(dev);
transport_add_device(dev);
transport_configure_device(dev);