Skip to contentSkip to conversation

SCSI: lpfc, restore MSI-X/MSI support

PATCH In review George Kadianakis 5 participants 8 messages Jan 14, 2010 – Jan 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCSI: lpfc, restore MSI-X/MSI support

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

Signed-off-by George Kadianakis <desnacked {cat} gmail {dog} com>
---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +3 -3
index e1a30a1..936ecaf 100644
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 # 				 support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
 #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
 # Value range is [0,2]. Default value is 0.
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 					      "MSI-X (2), if possible");
 
 /*
Acked-by on v1 1/1
#1 lore raw

The short response:

Background:
Nothing Broke. This was intended.

We had originally enabled MSI-X by default, but in qualification within the last 12 months, we encountered a major catch-22:

There were at least 4 platforms, from 2 major OEMs, that :
- Say they support MSI-X - platform routines work and act as if they do.
- We enable it, generate a test interrupt to check they really do deliver it, and it works.
- But shortly after attachment, the system hangs or loses interrupts, resulting in a bad system behavior.

Given the distro's picking up the 2.6.32 kernel, we had to stick with a default of MSI-X off, with user-enabled MSI-X as these platforms couldn't get fixed.

However, we're also now encountering platforms that require MSI-X and never INTx, so we must change. It's desired also for also for performance reasons.

So - now (2.6.33) is the right time to re-enable MSI-X by default.

-- james s

Quoted 36 lines · George Kadianakis

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts.
This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke. It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

Signed-off-by George Kadianakis <desnacked {cat} gmail {dog} com>
---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +3 -3
index e1a30a1..936ecaf 100644
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 # 				 support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
 #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
 # Value range is [0,2]. Default value is 0.
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 					      "MSI-X (2), if possible");
 
 /*
#2 lore raw
Quoted 21 lines · James Smart

The short response:

Background:
Nothing Broke. This was intended.

We had originally enabled MSI-X by default, but in qualification within the last 12 months, we encountered a major catch-22:

There were at least 4 platforms, from 2 major OEMs, that :
- Say they support MSI-X - platform routines work and act as if they do.
- We enable it, generate a test interrupt to check they really do deliver it, and it works.
- But shortly after attachment, the system hangs or loses interrupts, resulting in a bad system behavior.

Given the distro's picking up the 2.6.32 kernel, we had to stick with a default of MSI-X off, with user-enabled MSI-X as these platforms couldn't get fixed.

Quoted 9 lines

However, we're also now encountering platforms that require MSI-X and never INTx, so we must change. It's desired also for also for performance reasons.

So - now (2.6.33) is the right time to re-enable MSI-X by default.

-- james s

So I see! Thanks for the clarification.
It was just that your commit's description didn't mention the interrupt method change at all (and I also couldn't find any information on the internet), and I thought it was accidental.

Anyway, all in all, I think that the correct course of action here is to have MSI-X as the default (for the reasons you described) and users with defective systems can enable INTx manually.

#3 lore raw
In reply to George Kadianakis
Quoted 22 lines · George Kadianakis

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

Signed-off-by George Kadianakis <desnacked {cat} gmail {dog} com>

---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +0 -0
index e1a30a1..936ecaf 100644

drivers/scsi/lpfc/lpfc_attr.c LPFC_ATTR_RW(poll_tmo, 10, 1, 255, · line 2896

Quoted 9 lines
drivers/scsi/lpfc/lpfc_attr.c +2 -2
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
  /*
  # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
  #                               support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
  #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
  # Value range is [0,2]. Default value is 0.

0 ?

Quoted 11 lines
drivers/scsi/lpfc/lpfc_attr.c +1 -2
  */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
                                              "MSI-X (2), if possible");
 
  /*
--

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to George Kadianakis
Quoted 10 lines · George Kadianakis

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

So now I have an ack for this, I need an applyable patch.

Quoted 1 line
Signed-off-by George Kadianakis <desnacked {cat} gmail {dog} com>

This needs to be a proper email

Quoted 14 lines
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +1 -1
index e1a30a1..936ecaf 100644
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 # 				 support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled

drivers/scsi/lpfc/lpfc_attr.c LPFC_ATTR_RW(poll_tmo, 10, 1, 255, · line 2901

Quoted 10 lines
drivers/scsi/lpfc/lpfc_attr.c +2 -2
 #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
 # Value range is [0,2]. Default value is 0.
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 					      "MSI-X (2), if possible");
 
 /*

And for some reason there are extra tabs in the above lines which cause patch to reject.

James

#5 lore raw

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +3 -3
index e1a30a1..936ecaf 100644
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 #		support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
 #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
 # Value range is [0,2]. Default value is 0.
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 	    "MSI-X (2), if possible");
 
 /*
#6 lore raw
Quoted 22 lines · George Kadianakis

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +0 -0
index e1a30a1..936ecaf 100644

drivers/scsi/lpfc/lpfc_attr.c LPFC_ATTR_RW(poll_tmo, 10, 1, 255, · line 2896

Quoted 9 lines
drivers/scsi/lpfc/lpfc_attr.c +2 -2
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 #		support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
 #       1  = MSI enabled
-#       2  = MSI-X enabled
+#       2  = MSI-X enabled (default)
 # Value range is [0,2]. Default value is 0.
                                            ^

This is still wrong.

drivers/scsi/lpfc/lpfc_attr.c LPFC_ATTR_RW(poll_tmo, 10, 1, 255, · line 2901

Quoted 6 lines
drivers/scsi/lpfc/lpfc_attr.c +1 -1
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 	    "MSI-X (2), if possible");
 
 /*

Eike

#7 lore raw

From: George Kadianakis <desnacked {bomb} gmail {point} com>

A Gentoo bug report [1] showed that as of 2.6.31 lpfc only uses INTx interrupts. This patch restores lpfc's ability to support MSI-X/MSI interrupts that the "Addition of SLI4 Interface - Base Support" patch [2] broke.
It reestablishes MSI-X as the default interrupt method and in case MSI-X is not supported lpfc_sli{4,}_enable_intr fallbacks to MSI and then to INTx.

[1]: http://bugs.gentoo.org/show_bug.cgi?id=296319
[2]: commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d

---
 drivers/scsi/lpfc/lpfc_attr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +4 -4
index e1a30a1..61c7f4b 100644
@@ -2890,12 +2890,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
 /*
 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
 #		support this feature
-#       0  = MSI disabled (default)
+#       0  = MSI disabled
 #       1  = MSI enabled
-#       2  = MSI-X enabled
-# Value range is [0,2]. Default value is 0.
+#       2  = MSI-X enabled (default)
+# Value range is [0,2]. Default value is 2.
 */
-LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
+LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
 	    "MSI-X (2), if possible");
 
 /*