Bug 14877 - MSI/MSI-X support in 2.6.31.xx and 2.6.32.xx seems broken
Summary: MSI/MSI-X support in 2.6.31.xx and 2.6.32.xx seems broken
Status: CLOSED DOCUMENTED
Alias: None
Product: SCSI Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: scsi_drivers-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-25 18:28 UTC by Oleg Gawriloff
Modified: 2012-05-14 15:40 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.31.xx
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
fix (726 bytes, patch)
2010-01-14 08:38 UTC, Oleg Gawriloff
Details | Diff

Description Oleg Gawriloff 2009-12-25 18:28:15 UTC
After upgrading from 2.6.30.xx branch to any version of 2.6.31 and 2.6.32 branches it seems that all devices that was using MSI/MSI-X on 2.6.30 is using IOAPIC on 2.6.31 and 2.6.32.

Here's example:
2.6.32.xx:
10:00.0 Fibre Channel: Emulex Corporation Zephyr LightPulse Fibre Channel Host Adapter (rev 02)
        Subsystem: Emulex Corporation Zephyr LightPulse Fibre Channel Host Adapter
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at dfb01000 (64-bit, non-prefetchable) [size=4K]
        Memory at dfb00000 (64-bit, non-prefetchable) [size=256]
        I/O ports at 2000 [size=256]
        [virtual] Expansion ROM at c0000000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 2
        Capabilities: [60] MSI: Enable- Count=1/16 Maskable- 64bit+
        Capabilities: [44] Express Endpoint, MSI 00
        Kernel driver in use: lpfc
        Kernel modules: lpfc
2.6.30.xx:
10:00.0 Fibre Channel: Emulex Corporation Zephyr LightPulse Fibre Channel Host Adapter (rev 02)
        Subsystem: Emulex Corporation Zephyr LightPulse Fibre Channel Host Adapter
        Flags: bus master, fast devsel, latency 0, IRQ 57
        Memory at dfb01000 (64-bit, non-prefetchable) [size=4K]
        Memory at dfb00000 (64-bit, non-prefetchable) [size=256]
        I/O ports at 2000 [size=256]
        [virtual] Expansion ROM at c2000000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 2
        Capabilities: [60] MSI: Enable+ Count=1/16 Maskable- 64bit+
        Capabilities: [44] Express Endpoint, MSI 00
        Kernel driver in use: lpfc
        Kernel modules: lpfc
Comment 1 Oleg Gawriloff 2010-01-14 08:38:31 UTC
Created attachment 24552 [details]
fix

Was fixed by George Kadianakis, see http://bugs.gentoo.org/show_bug.cgi?id=296319
Comment 2 Andrew Morton 2010-01-14 22:27:15 UTC
Thanks.  I'll mark this as a regression, shall reassign to scsi and shall ask you to email a signed-off version of that patch.
Comment 3 Andrew Morton 2010-01-14 23:02:19 UTC
(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Thu, 14 Jan 2010 22:27:18 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=14877
> 
> 
> Andrew Morton <akpm@linux-foundation.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |akpm@linux-foundation.org,
>                    |                            |james.smart@emulex.com
>           Component|PCI                         |Other
>          AssignedTo|drivers_pci@kernel-bugs.osd |scsi_drivers-other@kernel-b
>                    |l.org                       |ugs.osdl.org
>             Product|Drivers                     |SCSI Drivers
>          Regression|No                          |Yes
> 
> 
> 
> 
> --- Comment #2 from Andrew Morton <akpm@linux-foundation.org>  2010-01-14
> 22:27:15 ---
> Thanks.  I'll mark this as a regression, shall reassign to scsi and shall ask
> you to email a signed-off version of that patch.
> 

Oleg, please send that lpfc patch via emailed reply-to-all to this email. 
Include a brief description for the changelog and a Signed-off-by: as
per Documentation/SubmittingPatches, thanks.
Comment 4 Oleg Gawriloff 2010-01-15 07:22:42 UTC
Sorry, I'm not kernel developer. Signed-off-by version is available at http://marc.info/?l=linux-scsi&m=126342842601776&w=2
Comment 5 Oleg Gawriloff 2010-01-15 07:24:05 UTC
15.01.2010 1:01, Andrew Morton пишет:

> Oleg, please send that lpfc patch via emailed reply-to-all to this email.
> Include a brief description for the changelog and a Signed-off-by: as
> per Documentation/SubmittingPatches, thanks.
Signed-off-by version available at
http://marc.info/?l=linux-scsi&m=126342842601776&w=2

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


diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index e1a30a1..936ecaf 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -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");

  /*

-- 
Signed, Oleg Gawriloff.
Comment 6 Andrew Morton 2010-01-22 23:18:19 UTC
On Fri, 15 Jan 2010 09:23:50 +0200
Oleg Gawriloff <barzog@telecom.by> wrote:

> 15.01.2010 1:01, Andrew Morton __________:
> 
> > Oleg, please send that lpfc patch via emailed reply-to-all to this email.
> > Include a brief description for the changelog and a Signed-off-by: as
> > per Documentation/SubmittingPatches, thanks.
> Signed-off-by version available at
> http://marc.info/?l=linux-scsi&m=126342842601776&w=2
> 
> 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(-)
> 
> 
> diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
> index e1a30a1..936ecaf 100644
> --- a/drivers/scsi/lpfc/lpfc_attr.c
> +++ b/drivers/scsi/lpfc/lpfc_attr.c
> @@ -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");
> 

This is committed to the scsi tree without a cc:stable, so it won't get
backported into 2.6.32.x and might not make it into 2.6.33 either.

Was that all intentional?
Comment 7 Anonymous Emailer 2010-01-23 14:25:26 UTC
Reply-To: James.Bottomley@suse.de

On Fri, 2010-01-22 at 15:18 -0800, Andrew Morton wrote:
> On Fri, 15 Jan 2010 09:23:50 +0200
> Oleg Gawriloff <barzog@telecom.by> wrote:
> 
> > 15.01.2010 1:01, Andrew Morton __________:
> > 
> > > Oleg, please send that lpfc patch via emailed reply-to-all to this email.
> > > Include a brief description for the changelog and a Signed-off-by: as
> > > per Documentation/SubmittingPatches, thanks.
> > Signed-off-by version available at
> > http://marc.info/?l=linux-scsi&m=126342842601776&w=2
> > 
> > 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(-)
> > 
> > 
> > diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
> > index e1a30a1..936ecaf 100644
> > --- a/drivers/scsi/lpfc/lpfc_attr.c
> > +++ b/drivers/scsi/lpfc/lpfc_attr.c
> > @@ -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");
> > 
> 
> This is committed to the scsi tree without a cc:stable, so it won't get
> backported into 2.6.32.x and might not make it into 2.6.33 either.
> 
> Was that all intentional?

Yes.

The commit contains an essay from James Smart as a sidebar explaining
the logic, but the gist is that there were instabilities in the previous
kernel that caused MSI failures with the lpfc cards so disabling MSI was
deliberate.

James
Comment 8 Oleg Gawriloff 2010-01-23 14:29:11 UTC
Hmm, I've running my system without any problems more then year. I've understand the point that if someone see MSI instability on lpfc it should be turned off by default, but is there any way to activate MSI by hand?
Comment 9 Anonymous Emailer 2010-01-23 14:57:20 UTC
Reply-To: James.Bottomley@suse.de

On Sat, 2010-01-23 at 14:29 +0000, bugzilla-daemon@bugzilla.kernel.org
wrote:
> --- Comment #8 from Oleg Gawriloff <barzog@telecom.by>  2010-01-23 14:29:11
> ---
> Hmm, I've running my system without any problems more then year. I've
> understand the point that if someone see MSI instability on lpfc it should be
> turned off by default, but is there any way to activate MSI by hand?

Yes, with the module parameter.  Just set it to 2 again and it will do
MSI.

James
Comment 10 Oleg Gawriloff 2010-01-23 15:36:40 UTC
Tried (I'm on Gentoo) on 2.6.32.4 kernel:
/etc/modules.autoload.d/kernel-2.6:
lpfc lpfc_use_msi=2

nothing changes (still on IO-APIC-fasteoi).
Comment 11 James Smart 2010-01-23 22:34:26 UTC
Note: this isn't a problem with lpfc - it was a problem with a couple of specific hardware platforms that didn't properly support MSI.
Comment 12 James Smart 2010-01-24 01:22:30 UTC
BTW: for your test - it depends on what adapter you have as to whether it supports MSI-X, MSI, or only INTx.

Note You need to log in before you can comment on or make changes to this bug.