[RFC][PATCH] sata-mv: add module parameter msq_blink_led to enable quirk for SOC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>
---

This patch applies on top of my previous patch:
     sata_mv: enable HDD led blinking when NCQ is active for SOC
(see: http://marc.info/?l=linux-ide&m=123546443414518&w=2)

I hope this will make that patch more acceptable: it makes the use of the
quirk more flexible, allowing users who see the issue to activate it while
allowing others to ignore it and also allowing easy testing whether the
issue is (still) present.

I've chosen to keep the quirk disabled by default so that we'll continue
to get reports when someone's led is not working. Hopefully that will
help find out whether or not the issue is hard disk related or not.

Use of the parameter could be documented on websites such as
Martin Michlmayr's pages for the QNAP NAS devices on Debian
(http://www.cyrius.com/debian/orion/qnap/ts-109/).

Cheers,
FJP

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 59355d9..4382d2c 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -723,6 +723,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 msq_blink_led;	/* Use blink mode for HDD activity led when
+				 * NCQ is enabled (SOC);
+				 * either zero (off, default) or non-zero */
+
+/*
  * Functions
  */
 
@@ -885,6 +894,9 @@ static int mv_has_port_using_ncq(struct ata_host *host)
 static void mv_quirk_blink_led_when_ncq(struct ata_port *ap,
 					int enable)
 {
+	if (!msq_blink_led)
+		return;
+
 	struct mv_host_priv *hpriv = ap->host->private_data;
 	void __iomem *mmio = hpriv->base;
 
@@ -3359,12 +3371,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)
 {
@@ -3550,6 +3556,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
+/* msq_blink_led only has effect for SOC */
+module_param(msq_blink_led, int, 0444);
+MODULE_PARM_DESC(msq_blink_led,
+	"Use blink mode quirk for HDD led when MSQ 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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux