Skip to content

Commit 208f2a8

Browse files
David MilburnJeff Garzik
authored andcommitted
[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>
1 parent e18086d commit 208f2a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/ahci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
13481348
writel(message[1], mmio + hpriv->em_loc+4);
13491349

13501350
/* save off new led state for port/slot */
1351-
emp->led_state = message[1];
1351+
emp->led_state = state;
13521352

13531353
/*
13541354
* tell hardware to transmit the message

0 commit comments

Comments
 (0)