linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frans Pop <elendil@planet.nl>
To: Mark Lord <liml@rtr.ca>
Cc: linux-arm@vger.kernel.org, linux-ide@vger.kernel.org,
	Saeed Bishara <saeed@marvell.com>, Nicolas Pitre <nico@cam.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	Martin Michlmayr <tbm@cyrius.com>
Subject: [RFC][PATCH] sata-mv: add module parameter msq_blink_led to enable quirk for SOC
Date: Tue, 10 Mar 2009 12:36:27 +0100	[thread overview]
Message-ID: <200903101236.30216.elendil@planet.nl> (raw)
In-Reply-To: <200902240933.45874.elendil@planet.nl>

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@planet.nl>
Cc: Mark Lord <liml@rtr.ca>
Cc: Saeed Bishara <saeed.bishara@gmail.com>
---

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

  parent reply	other threads:[~2009-03-10 11:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26  9:24 [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Frans Pop
2008-08-26 10:25 ` Frans Pop
2009-01-24 14:57   ` Mark Lord
2009-02-24  8:33     ` [RFC][PATCH] " Frans Pop
2009-02-24  9:33       ` saeed bishara
2009-03-01  7:59         ` Martin Michlmayr
2009-03-01 12:44           ` Frans Pop
2009-03-10 11:36       ` Frans Pop [this message]
2009-03-10 15:06         ` [RFC][PATCH] sata-mv: add module parameter msq_blink_led to enable quirk for SOC Mark Lord
2009-03-10 16:28           ` Martin Michlmayr
2009-03-10 16:40             ` Mark Lord
2009-03-10 16:47             ` Frans Pop
2009-03-10 17:09           ` Frans Pop
2008-08-26 14:03 ` [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Mark Lord
2008-08-27 14:56   ` Martin Michlmayr
2008-08-27 17:06     ` saeed bishara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200903101236.30216.elendil@planet.nl \
    --to=elendil@planet.nl \
    --cc=buytenh@wantstofly.org \
    --cc=liml@rtr.ca \
    --cc=linux-arm@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=saeed@marvell.com \
    --cc=tbm@cyrius.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).