Skip to content

Commit

Permalink
[libata] ahci: correct enclosure LED state save
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Milburn authored and Jeff Garzik committed Mar 25, 2009
1 parent e18086d commit 208f2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 208f2a8

Please sign in to comment.