linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: ahci enclosure save new led state
@ 2009-03-20 19:14 David Milburn
  2009-03-25  2:43 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: David Milburn @ 2009-03-20 19:14 UTC (permalink / raw)
  To: jeff; +Cc: linux-ide, kristen.c.accardi

ahci_transmit_led_message saves off the led_state
with a value that includes the port number OR'd
in, this incorrect value maybe reported back
in ahci_led_store.

For instance, if you turn off all the leds for
port 1 and cat the value back it will report 1
instead of 0.

# echo 0 > /sys/class/scsi_host/host1/em_message
# cat /sys/class/scsi_host/host1/em_message
1

Signed-off-by: David Milburn <dmilburn@redhat.com>
---
 drivers/ata/ahci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 66e012c..288f12f 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1348,7 +1348,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
 	writel(message[1], mmio + hpriv->em_loc+4);
 
 	/* save off new led state for port/slot */
-	emp->led_state = message[1];
+	emp->led_state = state;
 
 	/*
 	 * tell hardware to transmit the message

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

* Re: [PATCH] libata: ahci enclosure save new led state
  2009-03-20 19:14 [PATCH] libata: ahci enclosure save new led state David Milburn
@ 2009-03-25  2:43 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-03-25  2:43 UTC (permalink / raw)
  To: David Milburn; +Cc: linux-ide, kristen.c.accardi

David Milburn wrote:
> ahci_transmit_led_message saves off the led_state
> with a value that includes the port number OR'd
> in, this incorrect value maybe reported back
> in ahci_led_store.
> 
> For instance, if you turn off all the leds for
> port 1 and cat the value back it will report 1
> instead of 0.
> 
> # echo 0 > /sys/class/scsi_host/host1/em_message
> # cat /sys/class/scsi_host/host1/em_message
> 1
> 
> Signed-off-by: David Milburn <dmilburn@redhat.com>
> ---
>  drivers/ata/ahci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

applied



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

end of thread, other threads:[~2009-03-25  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20 19:14 [PATCH] libata: ahci enclosure save new led state David Milburn
2009-03-25  2:43 ` Jeff Garzik

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).