summaryrefslogtreecommitdiffstats
path: root/sys-kernel/boest-v4.4.196/0006-pool-2.6.27-blink-ata-leds.diff.patch
blob: a7915d77a7d2859b40c74b46fb33307713d614b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From a2d38fa5379207f832187014d88d4dca1462a98a Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Sun, 15 Feb 2009 14:51:33 +0100
Subject: [PATCH 06/20] pool/2.6.27-blink-ata-leds.diff

From http://linux.1wt.eu/alix/kernel-src/2.6.27-wt11/patches-2.6.27-wt11.tar.bz2

Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh>
---
 drivers/ata/libata-sff.c     | 4 ++++
 drivers/leds/trigger/Kconfig | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 1d8901fc0bfa..ba23b8832c79 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/libata.h>
 #include <linux/highmem.h>
+#include <linux/leds.h>
 
 #include "libata.h"
 
@@ -1427,6 +1428,9 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
 	/* select the device */
 	ata_dev_select(ap, qc->dev->devno, 1, 0);
 
+	/* blink leds if needed */
+	ledtrig_ide_activity();
+
 	/* start the command */
 	switch (qc->tf.protocol) {
 	case ATA_PROT_NODATA:
diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
index 5bda6a9b56bb..466ef576d732 100644
--- a/drivers/leds/trigger/Kconfig
+++ b/drivers/leds/trigger/Kconfig
@@ -36,9 +36,9 @@ config LEDS_TRIGGER_ONESHOT
 config LEDS_TRIGGER_IDE_DISK
 	bool "LED IDE Disk Trigger"
 	depends on IDE_GD_ATA
-	depends on LEDS_TRIGGERS
+	depends on LEDS_TRIGGERS && (BLK_DEV_IDEDISK || ATA)
 	help
-	  This allows LEDs to be controlled by IDE disk activity.
+	  This allows LEDs to be controlled by IDE/ATA disk activity.
 	  If unsure, say Y.
 
 config LEDS_TRIGGER_HEARTBEAT