27 October 2005 - 22:53Fixing the AHCI HDD LED in Linux
The libata driver in Linux 2.6.12.5 for Intel AHCI chipsets contains a bug. The bug manifests itself as a hard drive light which turns on at the first activity in Linux and does not turn off. The fix is easy.
The SActive bit is set by the driver during each transaction, and the bit causes the HDD LED to light. The device is supposed to reset the bit, but since the bit is only used for NCQ commands, most devices won’t touch the flag unless they are running in NCQ mode. Currently, the production libata driver doesn’t support NCQ, but the driver still assumes the device will unset the SActive bit. The fix is simply to comment out the lines which set the bit in the first place. See more info from LKML. A fix for this is likely to be in 2.6.13, but it should be safe to apply now.
Here are the lines to remove, in function ahci_qc_issue in file drivers/scsi/ahci.c:
writel(1, port_mmio + PORT_SCR_ACT);
readl(port_mmio + PORT_SCR_ACT); /* flush */
UPDATE: This fix is integrated in the recently released 2.6.14 kernel, along with some other AHCI driver fixes.
No Comments | Tags: computers
