All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frans Pop <elendil@planet.nl>
To: linux-arm@vger.kernel.org
Cc: Mark Lord <liml@rtr.ca>,
	linux-ide@vger.kernel.org, Saeed Bishara <saeed@marvell.com>,
	Nicolas Pitre <nico@cam.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>
Subject: [PATCH,v2][2/2] sata-mv: add module parameter msq_blink_led to enable quirk for GenIIe
Date: Wed, 11 Mar 2009 08:17:19 +0100	[thread overview]
Message-ID: <200903110817.20835.elendil@planet.nl> (raw)
In-Reply-To: <200903110813.25650.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>

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

  parent reply	other threads:[~2009-03-11  7:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11  7:13 [PATCH,v2][0/2] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Frans Pop
2009-03-11  7:15 ` [PATCH,v2][1/2] sata-mv: enable HDD led blinking when NCQ is active for GenIIe Frans Pop
2009-03-11 12:47   ` Mark Lord
2009-03-11 13:08     ` Frans Pop
2009-03-11 14:15       ` Mark Lord
2009-03-12 11:40         ` Frans Pop
2009-03-12 14:14           ` Mark Lord
2009-03-12 14:15             ` Mark Lord
2009-03-12 14:26               ` Mark Lord
2009-03-13  8:07                 ` Frans Pop
2009-03-13 13:04                   ` Mark Lord
2009-03-13 18:19                     ` Frans Pop
2009-03-13 19:09                       ` Mark Lord
2009-03-14 11:57                       ` Frans Pop
2009-03-14 14:53                         ` Mark Lord
2009-03-15 10:18                           ` Frans Pop
2009-03-12 14:27             ` Frans Pop
2009-03-12 14:31               ` Mark Lord
2009-03-11  7:17 ` Frans Pop [this message]
2009-03-11 12:33 ` [PATCH,v2][0/2] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Mark Lord
2009-03-11 12:58   ` Mark Lord
2009-03-11 13:01   ` Frans Pop

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=200903110817.20835.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.