linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22] Add LED trigger to libata core
@ 2007-03-18 17:06 Tony Vroon
  2007-03-19  4:42 ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Vroon @ 2007-03-18 17:06 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-kernel

This duplicates the IDE core LED trigger in the libata core.
I plan to use this by allowing PMU LED control on G5 towers. My test platform 
is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.

Signed-off-by: Tony Vroon <chainsaw@gentoo.org>

--- linux-2.6/drivers/ata/libata-scsi.c.orig	2007-03-17 22:53:56.000000000 +0000
+++ linux-2.6/drivers/ata/libata-scsi.c	2007-03-17 22:53:15.000000000 +0000
@@ -46,6 +46,7 @@
 #include <linux/libata.h>
 #include <linux/hdreg.h>
 #include <asm/uaccess.h>
+#include <linux/leds.h>
 
 #include "libata.h"
 
@@ -2791,6 +2792,7 @@
 				      struct ata_device *dev)
 {
 	int rc = 0;
+	ledtrig_ide_activity();
 
 	if (unlikely(!scmd->cmd_len)) {
 		ata_dev_printk(dev, KERN_WARNING, "WARNING: zero len CDB\n");

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
@ 2007-03-19 12:11 Mikael Pettersson
  0 siblings, 0 replies; 6+ messages in thread
From: Mikael Pettersson @ 2007-03-19 12:11 UTC (permalink / raw)
  To: alan, htejun; +Cc: chainsaw, jgarzik, linux-ide, linux-kernel

On Mon, 19 Mar 2007 12:46:16 +0000, Alan Cox wrote:
> > > This duplicates the IDE core LED trigger in the libata core.
> > > I plan to use this by allowing PMU LED control on G5 towers. My test platform 
> > > is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
> > 
> > I think this fits better in libata-core.c::ata_qc_issue().  Can you move
> > it to there?
> 
> Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path
> for performance. Our command issu is already too heavy and not all
> controllers have queueing to absorb that. How many controllers actually
> need this hook and can we not have ata_qc_issue_with_led() helpers for
> them ?

Agreed, toggling a led for each request seems excessive.

At least Promise controllers tend to have a HW-driven
activity led header, so wouldn't need SW-triggered
activity leds except maybe if some stupid system failed
to wire up the led header.

/Mikael

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-19 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-18 17:06 [PATCH 2.6.22] Add LED trigger to libata core Tony Vroon
2007-03-19  4:42 ` Tejun Heo
2007-03-19 12:46   ` Alan Cox
2007-03-19 12:12     ` Tony Vroon
2007-03-19 12:14     ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2007-03-19 12:11 Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).