Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

David Milburn and committed by
Jeff Garzik
208f2a88 e18086d6

+1 -1
+1 -1
drivers/ata/ahci.c
··· 1348 1348 writel(message[1], mmio + hpriv->em_loc+4); 1349 1349 1350 1350 /* save off new led state for port/slot */ 1351 - emp->led_state = message[1]; 1351 + emp->led_state = state; 1352 1352 1353 1353 /* 1354 1354 * tell hardware to transmit the message