Commit 208f2a88 authored by David Milburn's avatar David Milburn Committed by Jeff Garzik

[libata] ahci: correct enclosure LED state save

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: default avatarDavid Milburn <dmilburn@redhat.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent e18086d6
...@@ -1348,7 +1348,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state, ...@@ -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); writel(message[1], mmio + hpriv->em_loc+4);
/* save off new led state for port/slot */ /* save off new led state for port/slot */
emp->led_state = message[1]; emp->led_state = state;
/* /*
* tell hardware to transmit the message * tell hardware to transmit the message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment