public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Carsten Schlote <c.schlote@konzeptpark.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH][ATA] Add ide-disk led-trigger to ATA subsystem
Date: Sat, 10 Jan 2009 16:08:27 +0100	[thread overview]
Message-ID: <1231600107.10065.4.camel@kplaws107lx> (raw)

- Adds a call to ide-disk LED trigger to libata-sff.c
- Changed Kconfig to allow for ide-disk LED trigger when ATA drivers
  are enabled.

Open Issue:
- There might be more suitable place to call the trigger function.
  Only devices using libata-sff.c trigger LEDs right now.

Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
---
 drivers/ata/libata-sff.c |    3 +++
 drivers/leds/Kconfig     |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Index: .kernel/drivers/leds/Kconfig
===================================================================
--- .kernel.orig/drivers/leds/Kconfig	2009-01-07 22:13:40.000000000
+0100
+++ .kernel/drivers/leds/Kconfig	2009-01-07 22:14:46.000000000 +0100
@@ -185,7 +185,7 @@
 
 config LEDS_TRIGGER_IDE_DISK
 	bool "LED IDE Disk Trigger"
-	depends on LEDS_TRIGGERS && BLK_DEV_IDEDISK
+	depends on LEDS_TRIGGERS && BLK_DEV_IDEDISK || ATA
 	help
 	  This allows LEDs to be controlled by IDE disk activity.
 	  If unsure, say Y.
Index: .kernel/drivers/ata/libata-sff.c
===================================================================
--- .kernel.orig/drivers/ata/libata-sff.c	2009-01-07 22:14:09.000000000
+0100
+++ .kernel/drivers/ata/libata-sff.c	2009-01-07 22:14:46.000000000 +0100
@@ -36,6 +36,7 @@
 #include <linux/pci.h>
 #include <linux/libata.h>
 #include <linux/highmem.h>
+#include <linux/leds.h>
 
 #include "libata.h"
 
@@ -647,6 +648,8 @@
  */
 void ata_sff_exec_command(struct ata_port *ap, const struct
ata_taskfile *tf)
 {
+	ledtrig_ide_activity();
+
 	DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
 
 	iowrite8(tf->command, ap->ioaddr.command_addr);


             reply	other threads:[~2009-01-10 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-10 15:08 Carsten Schlote [this message]
2009-01-14  8:25 ` [PATCH][ATA] Add ide-disk led-trigger to ATA subsystem Andrew Morton
2009-01-18  8:11 ` Pavel Machek
2009-01-18 15:50   ` Jeff Garzik
2009-01-18 18:29     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1231600107.10065.4.camel@kplaws107lx \
    --to=c.schlote@konzeptpark.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox