For some Marvell chips the HDD led does not blink when there is disk I/O if NCQ is enabled. Only enable the quirk that works around this (by enabling blink mode for the led) if parameter msq_blink_led is set as it is not clear whether this is a general erratum or related to the type of hard disk connected to the controller. Signed-off-by: Frans Pop <elendil@xxxxxxxxx> Cc: Mark Lord <liml@xxxxxx> Cc: Saeed Bishara <saeed.bishara@xxxxxxxxx> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 4057647..86f8047 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -738,6 +738,15 @@ static const struct mv_hw_ops mv_soc_ops = { }; /* + * module options + */ +static int msi; /* Use PCI msi; either zero (off, default) + * or non-zero */ +static int ncq_blink_led; /* Use blink mode for HDD activity led when + * NCQ is enabled (GenIIe quirk); + * either zero (off, default) or non-zero */ + +/* * Functions */ @@ -903,7 +912,7 @@ static void mv_quirk_blink_led_when_ncq(struct ata_port *ap, struct mv_host_priv *hpriv = ap->host->private_data; void __iomem *mmio = hpriv->base; - if (!hpriv->ops->enable_led_blink) + if (!ncq_blink_led || !hpriv->ops->enable_led_blink) return; if (enable) { @@ -3379,12 +3388,6 @@ static struct pci_driver mv_pci_driver = { .remove = ata_pci_remove_one, }; -/* - * module options - */ -static int msi; /* Use PCI msi; either zero (off, default) or non-zero */ - - /* move to PCI layer or libata core? */ static int pci_go_64(struct pci_dev *pdev) { @@ -3570,6 +3573,10 @@ MODULE_ALIAS("platform:" DRV_NAME); module_param(msi, int, 0444); MODULE_PARM_DESC(msi, "Enable use of PCI MSI (0=off, 1=on)"); #endif +/* ncq_blink_led only has effect for GenIIe chip variants */ +module_param(ncq_blink_led, int, 0444); +MODULE_PARM_DESC(ncq_blink_led, + "Use blink mode quirk for HDD led when NCQ is enabled (0=off, 1=on)"); module_init(mv_init); module_exit(mv_exit); -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html