linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
@ 2021-03-03 22:42 Arun Easi
  2021-03-03 22:42 ` [PATCH 1/1] " Arun Easi
  2021-03-24 20:04 ` [PATCH 0/1] " Arun Easi
  0 siblings, 2 replies; 8+ messages in thread
From: Arun Easi @ 2021-03-03 22:42 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Girish Basrur, Quinn Tran

Hi Bjorn,

As discussed, re-sending the patch with updated commit message.
You can disregard the earlier patch titled:

	"[PATCH] PCI/VPD: Remove VPD quirk for QLogic 1077:2261"

Regards,
-Arun

Arun Easi (1):
  PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261

 drivers/pci/vpd.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.9.5

base-commit: e18fb64b79860cf5f381208834b8fbc493ef7cbc

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-03-03 22:42 [PATCH 0/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261 Arun Easi
@ 2021-03-03 22:42 ` Arun Easi
  2021-03-06 23:57   ` Krzysztof Wilczyński
  2021-04-07 22:13   ` Bjorn Helgaas
  2021-03-24 20:04 ` [PATCH 0/1] " Arun Easi
  1 sibling, 2 replies; 8+ messages in thread
From: Arun Easi @ 2021-03-03 22:42 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Girish Basrur, Quinn Tran

"lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
"Vital Product Data" as "Not readable" today and thus preventing
customers from getting relevant HBA information. Fix it by removing
the blacklist quirk.

The VPD quirk was added by [0] to avoid a system NMI; this issue has
been long fixed in the HBA firmware. In addition, PCI also has changes
to check the VPD size [1], so this quirk can be reverted now regardless
of a firmware update.

Some more details can be found in the following thread:
    "VPD blacklist of Marvell QLogic 1077/2261" [2].

[0] 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722")
[1] 104daa71b396 ("PCI: Determine actual VPD size on first access")
[2] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/

Signed-off-by: Arun Easi <aeasi@marvell.com>
CC: stable@vger.kernel.org      # v4.6+
---
 drivers/pci/vpd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
index 7915d10..bd54907 100644
--- a/drivers/pci/vpd.c
+++ b/drivers/pci/vpd.c
@@ -570,7 +570,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005d, quirk_blacklist_vpd);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005f, quirk_blacklist_vpd);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, PCI_ANY_ID,
 		quirk_blacklist_vpd);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_QLOGIC, 0x2261, quirk_blacklist_vpd);
 /*
  * The Amazon Annapurna Labs 0x0031 device id is reused for other non Root Port
  * device types, so the quirk is registered for the PCI_CLASS_BRIDGE_PCI class.
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-03-03 22:42 ` [PATCH 1/1] " Arun Easi
@ 2021-03-06 23:57   ` Krzysztof Wilczyński
  2021-04-07 22:13   ` Bjorn Helgaas
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Wilczyński @ 2021-03-06 23:57 UTC (permalink / raw)
  To: Arun Easi; +Cc: Bjorn Helgaas, linux-pci, Girish Basrur, Quinn Tran

Hi Arun,

> "lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
> "Vital Product Data" as "Not readable" today and thus preventing
> customers from getting relevant HBA information. Fix it by removing
> the blacklist quirk.
> 
> The VPD quirk was added by [0] to avoid a system NMI; this issue has
> been long fixed in the HBA firmware. In addition, PCI also has changes
> to check the VPD size [1], so this quirk can be reverted now regardless
> of a firmware update.
> 
> Some more details can be found in the following thread:
>     "VPD blacklist of Marvell QLogic 1077/2261" [2].
> 
> [0] 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722")
> [1] 104daa71b396 ("PCI: Determine actual VPD size on first access")
> [2] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/
[...]

Looks good!  Assuming that this won't break QLogic ISP2722 with older
firmware, like you say, it's a nice fix.

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-03-03 22:42 [PATCH 0/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261 Arun Easi
  2021-03-03 22:42 ` [PATCH 1/1] " Arun Easi
@ 2021-03-24 20:04 ` Arun Easi
  1 sibling, 0 replies; 8+ messages in thread
From: Arun Easi @ 2021-03-24 20:04 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Girish Basrur, Quinn Tran

Hi Bjorn,

A gentle reminder.

Regards,
-Arun

On Wed, 3 Mar 2021, 2:42pm, Arun Easi wrote:

> Hi Bjorn,
> 
> As discussed, re-sending the patch with updated commit message.
> You can disregard the earlier patch titled:
> 
> 	"[PATCH] PCI/VPD: Remove VPD quirk for QLogic 1077:2261"
> 
> Regards,
> -Arun
> 
> Arun Easi (1):
>   PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
> 
>  drivers/pci/vpd.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-03-03 22:42 ` [PATCH 1/1] " Arun Easi
  2021-03-06 23:57   ` Krzysztof Wilczyński
@ 2021-04-07 22:13   ` Bjorn Helgaas
  2021-04-07 22:57     ` Arun Easi
  1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2021-04-07 22:13 UTC (permalink / raw)
  To: Arun Easi; +Cc: Bjorn Helgaas, linux-pci, Girish Basrur, Quinn Tran

On Wed, Mar 03, 2021 at 02:42:50PM -0800, Arun Easi wrote:
> "lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
> "Vital Product Data" as "Not readable" today and thus preventing
> customers from getting relevant HBA information. Fix it by removing
> the blacklist quirk.
> 
> The VPD quirk was added by [0] to avoid a system NMI; this issue has
> been long fixed in the HBA firmware. In addition, PCI also has changes
> to check the VPD size [1], so this quirk can be reverted now regardless
> of a firmware update.

This is not a very convincing argument yet since 104daa71b396 ("PCI:
Determine actual VPD size on first access") appeared in v4.6 and
0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") appeared
in v4.11.

If 104daa71b396 really fixed the problem, why did we need
0d5370d1d852?

> Some more details can be found in the following thread:
>     "VPD blacklist of Marvell QLogic 1077/2261" [2].
> 
> [0] 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722")
> [1] 104daa71b396 ("PCI: Determine actual VPD size on first access")
> [2] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/
> 
> Signed-off-by: Arun Easi <aeasi@marvell.com>
> CC: stable@vger.kernel.org      # v4.6+
> ---
>  drivers/pci/vpd.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> index 7915d10..bd54907 100644
> --- a/drivers/pci/vpd.c
> +++ b/drivers/pci/vpd.c
> @@ -570,7 +570,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005d, quirk_blacklist_vpd);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005f, quirk_blacklist_vpd);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, PCI_ANY_ID,
>  		quirk_blacklist_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_QLOGIC, 0x2261, quirk_blacklist_vpd);
>  /*
>   * The Amazon Annapurna Labs 0x0031 device id is reused for other non Root Port
>   * device types, so the quirk is registered for the PCI_CLASS_BRIDGE_PCI class.
> -- 
> 2.9.5
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-04-07 22:13   ` Bjorn Helgaas
@ 2021-04-07 22:57     ` Arun Easi
  2021-04-08 17:27       ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Arun Easi @ 2021-04-07 22:57 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, Girish Basrur, Quinn Tran

On Wed, 7 Apr 2021, 3:13pm, Bjorn Helgaas wrote:

> On Wed, Mar 03, 2021 at 02:42:50PM -0800, Arun Easi wrote:
> > "lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
> > "Vital Product Data" as "Not readable" today and thus preventing
> > customers from getting relevant HBA information. Fix it by removing
> > the blacklist quirk.
> > 
> > The VPD quirk was added by [0] to avoid a system NMI; this issue has
> > been long fixed in the HBA firmware. In addition, PCI also has changes
> > to check the VPD size [1], so this quirk can be reverted now regardless
> > of a firmware update.
> 
> This is not a very convincing argument yet since 104daa71b396 ("PCI:
> Determine actual VPD size on first access") appeared in v4.6 and
> 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") appeared
> in v4.11.
> 
> If 104daa71b396 really fixed the problem, why did we need
> 0d5370d1d852?

True, 0d5370d1d852 was not really neeeded for 104daa71b396 and newer 
kernels; my theory is that when Ethan Z. ran the tests, he was using an 
older (older than 104daa71b396) kernel, but by the time the blacklisting 
was put in place, the kernel already had the fix that made the 
blacklisting unnecessary.

More of my investigation details explained here:
	https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/

A quick summary of which is that, when Ethan reported the crash stack, it 
had pci_vpd_pci22* calls which is seen only in older kernels. Though 
104daa71b396 too had those calls, it was very close to the commit that 
renamed those calls (f1cd93f9aabe) -- and I theorized Ethan probably was 
not running a kernel between 104daa71b396 and f1cd93f9aabe (only 3 
commits (drivers/pci/) away).

Unfortunately, Ethan's blacklisting patch did not have the kernel commit 
SHA he had used.

Regards,
-Arun

> 
> > Some more details can be found in the following thread:
> >     "VPD blacklist of Marvell QLogic 1077/2261" [2].
> > 
> > [0] 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722")
> > [1] 104daa71b396 ("PCI: Determine actual VPD size on first access")
> > [2] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_linux-2Dpci_alpine.LRH.2.21.9999.2012161641230.28924-40irv1user01.caveonetworks.com_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=P-q_Qkt75qFy33SvdD2nAxAyN87eO1d-mFO-lqNOomw&m=lPsRSUHeHa9BMJpm_qohlCkGzpRmhdPSNythG7ljHAU&s=Orsa4H3WN7tR8DOfCIof1toWvMUQZ2Mq0HzHPIFzEhQ&e= 
> > 
> > Signed-off-by: Arun Easi <aeasi@marvell.com>
> > CC: stable@vger.kernel.org      # v4.6+
> > ---
> >  drivers/pci/vpd.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> > index 7915d10..bd54907 100644
> > --- a/drivers/pci/vpd.c
> > +++ b/drivers/pci/vpd.c
> > @@ -570,7 +570,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005d, quirk_blacklist_vpd);
> >  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x005f, quirk_blacklist_vpd);
> >  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, PCI_ANY_ID,
> >  		quirk_blacklist_vpd);
> > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_QLOGIC, 0x2261, quirk_blacklist_vpd);
> >  /*
> >   * The Amazon Annapurna Labs 0x0031 device id is reused for other non Root Port
> >   * device types, so the quirk is registered for the PCI_CLASS_BRIDGE_PCI class.
> > -- 
> > 2.9.5
> > 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-04-07 22:57     ` Arun Easi
@ 2021-04-08 17:27       ` Bjorn Helgaas
  2021-04-09 19:58         ` [EXT] " Arun Easi
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2021-04-08 17:27 UTC (permalink / raw)
  To: Arun Easi; +Cc: Bjorn Helgaas, linux-pci, Girish Basrur, Quinn Tran

On Wed, Apr 07, 2021 at 03:57:32PM -0700, Arun Easi wrote:
> On Wed, 7 Apr 2021, 3:13pm, Bjorn Helgaas wrote:
> 
> > On Wed, Mar 03, 2021 at 02:42:50PM -0800, Arun Easi wrote:
> > > "lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
> > > "Vital Product Data" as "Not readable" today and thus preventing
> > > customers from getting relevant HBA information. Fix it by removing
> > > the blacklist quirk.
> > > 
> > > The VPD quirk was added by [0] to avoid a system NMI; this issue has
> > > been long fixed in the HBA firmware. In addition, PCI also has changes
> > > to check the VPD size [1], so this quirk can be reverted now regardless
> > > of a firmware update.
> > 
> > This is not a very convincing argument yet since 104daa71b396 ("PCI:
> > Determine actual VPD size on first access") appeared in v4.6 and
> > 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") appeared
> > in v4.11.
> > 
> > If 104daa71b396 really fixed the problem, why did we need
> > 0d5370d1d852?
> 
> True, 0d5370d1d852 was not really neeeded for 104daa71b396 and newer 
> kernels; my theory is that when Ethan Z. ran the tests, he was using an 
> older (older than 104daa71b396) kernel, but by the time the blacklisting 
> was put in place, the kernel already had the fix that made the 
> blacklisting unnecessary.
> 
> More of my investigation details explained here:
> 	https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/
> 
> A quick summary of which is that, when Ethan reported the crash stack, it 
> had pci_vpd_pci22* calls which is seen only in older kernels. Though 
> 104daa71b396 too had those calls, it was very close to the commit that 
> renamed those calls (f1cd93f9aabe) -- and I theorized Ethan probably was 
> not running a kernel between 104daa71b396 and f1cd93f9aabe (only 3 
> commits (drivers/pci/) away).

We should put the outline of this theory in the commit log for the
benefit of future readers who have the same question I did.

Bjorn

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [EXT] Re: [PATCH 1/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261
  2021-04-08 17:27       ` Bjorn Helgaas
@ 2021-04-09 19:58         ` Arun Easi
  0 siblings, 0 replies; 8+ messages in thread
From: Arun Easi @ 2021-04-09 19:58 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, Girish Basrur, Quinn Tran

On Thu, 8 Apr 2021, 10:27am, Bjorn Helgaas wrote:

> External Email
> 
> ----------------------------------------------------------------------
> On Wed, Apr 07, 2021 at 03:57:32PM -0700, Arun Easi wrote:
> > On Wed, 7 Apr 2021, 3:13pm, Bjorn Helgaas wrote:
> > 
> > > On Wed, Mar 03, 2021 at 02:42:50PM -0800, Arun Easi wrote:
> > > > "lspci -vvv" for Qlogic Fibre Channel HBA 1077:2261 displays
> > > > "Vital Product Data" as "Not readable" today and thus preventing
> > > > customers from getting relevant HBA information. Fix it by removing
> > > > the blacklist quirk.
> > > > 
> > > > The VPD quirk was added by [0] to avoid a system NMI; this issue has
> > > > been long fixed in the HBA firmware. In addition, PCI also has changes
> > > > to check the VPD size [1], so this quirk can be reverted now regardless
> > > > of a firmware update.
> > > 
> > > This is not a very convincing argument yet since 104daa71b396 ("PCI:
> > > Determine actual VPD size on first access") appeared in v4.6 and
> > > 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") appeared
> > > in v4.11.
> > > 
> > > If 104daa71b396 really fixed the problem, why did we need
> > > 0d5370d1d852?
> > 
> > True, 0d5370d1d852 was not really neeeded for 104daa71b396 and newer 
> > kernels; my theory is that when Ethan Z. ran the tests, he was using an 
> > older (older than 104daa71b396) kernel, but by the time the blacklisting 
> > was put in place, the kernel already had the fix that made the 
> > blacklisting unnecessary.
> > 
> > More of my investigation details explained here:
> > 	https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_linux-2Dpci_alpine.LRH.2.21.9999.2012161641230.28924-40irv1user01.caveonetworks.com_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=P-q_Qkt75qFy33SvdD2nAxAyN87eO1d-mFO-lqNOomw&m=6AxpinjPP1ODX7dE-syNBDgke94moUP_K_jm_ZTu6pI&s=YxWnXn7ZfcD1PJlUkl82l8TK5sNX7uBwkCJxKgpAgEM&e= 
> > 
> > A quick summary of which is that, when Ethan reported the crash stack, it 
> > had pci_vpd_pci22* calls which is seen only in older kernels. Though 
> > 104daa71b396 too had those calls, it was very close to the commit that 
> > renamed those calls (f1cd93f9aabe) -- and I theorized Ethan probably was 
> > not running a kernel between 104daa71b396 and f1cd93f9aabe (only 3 
> > commits (drivers/pci/) away).
> 
> We should put the outline of this theory in the commit log for the
> benefit of future readers who have the same question I did.
> 

Sure, will post a V2. BTW, the details were mentioned as a link "[2]" in 
the commit, I will pull the contents to the commit message.

Thanks Bjorn.

Regards,
-Arun

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-09 19:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 22:42 [PATCH 0/1] PCI/VPD: Fix blocking of VPD data in lspci for QLogic 1077:2261 Arun Easi
2021-03-03 22:42 ` [PATCH 1/1] " Arun Easi
2021-03-06 23:57   ` Krzysztof Wilczyński
2021-04-07 22:13   ` Bjorn Helgaas
2021-04-07 22:57     ` Arun Easi
2021-04-08 17:27       ` Bjorn Helgaas
2021-04-09 19:58         ` [EXT] " Arun Easi
2021-03-24 20:04 ` [PATCH 0/1] " Arun Easi

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