All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
@ 2011-06-27 17:39 Jon Mason
  2011-06-30 20:40 ` James Smart
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Jon Mason @ 2011-06-27 17:39 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
---
 drivers/scsi/lpfc/lpfc_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 148b98d..9000ad0 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
 	pci_save_state(pdev);
 
 	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
-	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
+	if (pci_is_pcie(pdev))
 		pdev->needs_freset = 1;
 
 	return 0;
-- 
1.7.5.4


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

* Re: [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
  2011-06-27 17:39 [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
@ 2011-06-30 20:40 ` James Smart
  2011-06-30 20:41 ` James Smart
  2011-07-06 14:39 ` [PATCH 03/19] lpfc: remove unnecessary read " James Smart
  2 siblings, 0 replies; 22+ messages in thread
From: James Smart @ 2011-06-30 20:40 UTC (permalink / raw)
  To: Jon Mason; +Cc: linux-scsi

Jon,

I must NACK this patch to the lpfc driver and recommend that all other patches 
which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with 
"pci_is_pcie(pdev)" are NACK'd as well.

The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie" 
and pci_is_pcie() will erroneously fail under some conditions, but explicit 
search for the capability struct via pci_find_capability() is always 
successful.   I expect this to be due a shadowing of pci config space in the 
hal/platform that isn't sufficiently built up.  We detected this issue while 
testing AER/EEH, and are functional only if the pci_find_capability() option 
is used.

-- james s



On 6/27/2011 1:39 PM, Jon Mason wrote:
> The PCIE capability offset is saved during PCI bus walking.  It will
> remove an unnecessary search in the PCI configuration space if this
> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
> better way of determining if the device is PCIE or not (as it uses the
> same saved PCIE capability offset).
>
> Signed-off-by: Jon Mason<jdmason@kudzu.us>
> ---
>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 148b98d..9000ad0 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>   	pci_save_state(pdev);
>
>   	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
> +	if (pci_is_pcie(pdev))
>   		pdev->needs_freset = 1;
>
>   	return 0;

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

* Re: [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
  2011-06-27 17:39 [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
  2011-06-30 20:40 ` James Smart
@ 2011-06-30 20:41 ` James Smart
  2011-07-01 14:48   ` Warning: qla4xxx/qla2xxx/lpfc : removal " James Smart
                     ` (7 more replies)
  2011-07-06 14:39 ` [PATCH 03/19] lpfc: remove unnecessary read " James Smart
  2 siblings, 8 replies; 22+ messages in thread
From: James Smart @ 2011-06-30 20:41 UTC (permalink / raw)
  To: Jon Mason; +Cc: linux-scsi, Richard Lary

Jon,

I must NACK this patch to the lpfc driver and recommend that all other patches 
which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with 
"pci_is_pcie(pdev)" are NACK'd as well.

The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie" 
and pci_is_pcie() will erroneously fail under some conditions, but explicit 
search for the capability struct via pci_find_capability() is always 
successful.   I expect this to be due a shadowing of pci config space in the 
hal/platform that isn't sufficiently built up.  We detected this issue while 
testing AER/EEH, and are functional only if the pci_find_capability() option 
is used.

-- james s



On 6/27/2011 1:39 PM, Jon Mason wrote:
> The PCIE capability offset is saved during PCI bus walking.  It will
> remove an unnecessary search in the PCI configuration space if this
> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
> better way of determining if the device is PCIE or not (as it uses the
> same saved PCIE capability offset).
>
> Signed-off-by: Jon Mason<jdmason@kudzu.us>
> ---
>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 148b98d..9000ad0 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>   	pci_save_state(pdev);
>
>   	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
> +	if (pci_is_pcie(pdev))
>   		pdev->needs_freset = 1;
>
>   	return 0;

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

* Warning: qla4xxx/qla2xxx/lpfc   : removal of PCI_CAP_ID_EXP
  2011-06-30 20:41 ` James Smart
@ 2011-07-01 14:48   ` James Smart
  2011-07-01 15:10     ` Jon Mason
  2011-07-01 14:49   ` Warning: iwlegacy/iwlwifi/rtlwifi " James Smart
                     ` (6 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: James Smart @ 2011-07-01 14:48 UTC (permalink / raw)
  To: linux-scsi
  Cc: James Smart, Jon Mason, Richard Lary, Ravi Anand,
	vikas.chaudhary, iscsi-driver, Andrew Vasquez

All,

I wanted to communicate a potential warning to those drivers that had a patch 
submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand 
options such as is_pcie and pci_is_pcie().

Testing with the lpfc driver and AER/EEH identified cases where the short-hand 
search options would fail on PPC platforms.  The only successful option in all 
cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend 
that this change not be accepted until the platform level issue can be 
identified and corrected.

-- james s



On 6/30/2011 4:41 PM, James Smart wrote:
> Jon,
>
> I must NACK this patch to the lpfc driver and recommend that all other patches
> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> "pci_is_pcie(pdev)" are NACK'd as well.
>
> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
> and pci_is_pcie() will erroneously fail under some conditions, but explicit
> search for the capability struct via pci_find_capability() is always
> successful.   I expect this to be due a shadowing of pci config space in the
> hal/platform that isn't sufficiently built up.  We detected this issue while
> testing AER/EEH, and are functional only if the pci_find_capability() option
> is used.
>
> -- james s
>
>
>
> On 6/27/2011 1:39 PM, Jon Mason wrote:
>> The PCIE capability offset is saved during PCI bus walking.  It will
>> remove an unnecessary search in the PCI configuration space if this
>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>> better way of determining if the device is PCIE or not (as it uses the
>> same saved PCIE capability offset).
>>
>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>> ---
>>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>> index 148b98d..9000ad0 100644
>> --- a/drivers/scsi/lpfc/lpfc_init.c
>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>    	pci_save_state(pdev);
>>
>>    	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>> +	if (pci_is_pcie(pdev))
>>    		pdev->needs_freset = 1;
>>
>>    	return 0;


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

* Warning: iwlegacy/iwlwifi/rtlwifi  : removal of PCI_CAP_ID_EXP
  2011-06-30 20:41 ` James Smart
  2011-07-01 14:48   ` Warning: qla4xxx/qla2xxx/lpfc : removal " James Smart
@ 2011-07-01 14:49   ` James Smart
  2011-07-01 15:08     ` Jon Mason
       [not found]   ` <4E0CDF8B.3020505-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
                     ` (5 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: James Smart @ 2011-07-01 14:49 UTC (permalink / raw)
  To: linux-wireless
  Cc: James Smart, Jon Mason, Richard Lary, wey-yi.w.guy,
	Stanislaw Gruszka, Larry.Finger, chaoming_li

All,

I wanted to communicate a potential warning to those drivers that had a patch 
submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand 
options such as is_pcie and pci_is_pcie().

Testing with the lpfc driver and AER/EEH identified cases where the short-hand 
search options would fail on PPC platforms.  The only successful option in all 
cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend 
that this change not be accepted until the platform level issue can be 
identified and corrected.

-- james s



On 6/30/2011 4:41 PM, James Smart wrote:
> Jon,
>
> I must NACK this patch to the lpfc driver and recommend that all other patches
> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> "pci_is_pcie(pdev)" are NACK'd as well.
>
> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
> and pci_is_pcie() will erroneously fail under some conditions, but explicit
> search for the capability struct via pci_find_capability() is always
> successful.   I expect this to be due a shadowing of pci config space in the
> hal/platform that isn't sufficiently built up.  We detected this issue while
> testing AER/EEH, and are functional only if the pci_find_capability() option
> is used.
>
> -- james s
>
>
>
> On 6/27/2011 1:39 PM, Jon Mason wrote:
>> The PCIE capability offset is saved during PCI bus walking.  It will
>> remove an unnecessary search in the PCI configuration space if this
>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>> better way of determining if the device is PCIE or not (as it uses the
>> same saved PCIE capability offset).
>>
>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>> ---
>>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>> index 148b98d..9000ad0 100644
>> --- a/drivers/scsi/lpfc/lpfc_init.c
>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>    	pci_save_state(pdev);
>>
>>    	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>> +	if (pci_is_pcie(pdev))
>>    		pdev->needs_freset = 1;
>>
>>    	return 0;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Warning: mthca/qib  : removal of PCI_CAP_ID_EXP
       [not found]   ` <4E0CDF8B.3020505-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
@ 2011-07-01 14:49     ` James Smart
       [not found]       ` <6dbdff99-df75-4456-ac0e-b35ac475f079-nbYkmrCdWxmgMrCBcu8zE0EOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: James Smart @ 2011-07-01 14:49 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: James Smart, Jon Mason, Richard Lary,
	mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA,
	eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	jlburr-vna1KIf7WgpBDgjK7y7TUQ

All,

I wanted to communicate a potential warning to those drivers that had a patch 
submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand 
options such as is_pcie and pci_is_pcie().

Testing with the lpfc driver and AER/EEH identified cases where the short-hand 
search options would fail on PPC platforms.  The only successful option in all 
cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend 
that this change not be accepted until the platform level issue can be 
identified and corrected.

-- james s



On 6/30/2011 4:41 PM, James Smart wrote:
> Jon,
>
> I must NACK this patch to the lpfc driver and recommend that all other patches
> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> "pci_is_pcie(pdev)" are NACK'd as well.
>
> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
> and pci_is_pcie() will erroneously fail under some conditions, but explicit
> search for the capability struct via pci_find_capability() is always
> successful.   I expect this to be due a shadowing of pci config space in the
> hal/platform that isn't sufficiently built up.  We detected this issue while
> testing AER/EEH, and are functional only if the pci_find_capability() option
> is used.
>
> -- james s
>
>
>
> On 6/27/2011 1:39 PM, Jon Mason wrote:
>> The PCIE capability offset is saved during PCI bus walking.  It will
>> remove an unnecessary search in the PCI configuration space if this
>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>> better way of determining if the device is PCIE or not (as it uses the
>> same saved PCIE capability offset).
>>
>> Signed-off-by: Jon Mason<jdmason-zqedIHPRSYI@public.gmane.org>
>> ---
>>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>> index 148b98d..9000ad0 100644
>> --- a/drivers/scsi/lpfc/lpfc_init.c
>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>    	pci_save_state(pdev);
>>
>>    	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>> +	if (pci_is_pcie(pdev))
>>    		pdev->needs_freset = 1;
>>
>>    	return 0;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: Warning: mthca/qib  : removal of PCI_CAP_ID_EXP
       [not found]       ` <6dbdff99-df75-4456-ac0e-b35ac475f079-nbYkmrCdWxmgMrCBcu8zE0EOCMrvLtNR@public.gmane.org>
@ 2011-07-01 15:01         ` Mike Marciniszyn
       [not found]           ` <35AAF1E4A771E142979F27B51793A4888838F2367E-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Mike Marciniszyn @ 2011-07-01 15:01 UTC (permalink / raw)
  To: James Smart, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Jon Mason, Richard Lary, eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	jlburr-vna1KIf7WgpBDgjK7y7TUQ

The patch was ok here, but we only support x86_64.

Mike

> -----Original Message-----
> From: James Smart [mailto:james.smart-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org]
> Sent: Friday, July 01, 2011 10:49 AM
> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: James Smart; Jon Mason; Richard Lary; Mike Marciniszyn;
> eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org; jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org
> Subject: Warning: mthca/qib : removal of PCI_CAP_ID_EXP
>
> All,
>
> I wanted to communicate a potential warning to those drivers that had a
> patch
> submitted to replace config space searches of PCI_CAP_ID_EXP with
> shorthand
> options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the
> short-hand
> search options would fail on PPC platforms.  The only successful option
> in all
> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I
> recommend
> that this change not be accepted until the platform level issue can be
> identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
> > Jon,
> >
> > I must NACK this patch to the lpfc driver and recommend that all
> other patches
> > which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> > "pci_is_pcie(pdev)" are NACK'd as well.
> >
> > The reason is due to an issue on PPC platforms whereby use of "pdev-
> >is_pcie"
> > and pci_is_pcie() will erroneously fail under some conditions, but
> explicit
> > search for the capability struct via pci_find_capability() is always
> > successful.   I expect this to be due a shadowing of pci config space
> in the
> > hal/platform that isn't sufficiently built up.  We detected this
> issue while
> > testing AER/EEH, and are functional only if the pci_find_capability()
> option
> > is used.
> >
> > -- james s
> >
> >
> >
> > On 6/27/2011 1:39 PM, Jon Mason wrote:
> >> The PCIE capability offset is saved during PCI bus walking.  It will
> >> remove an unnecessary search in the PCI configuration space if this
> >> value is referenced instead of reacquiring it.  Also, pci_is_pcie is
> a
> >> better way of determining if the device is PCIE or not (as it uses
> the
> >> same saved PCIE capability offset).
> >>
> >> Signed-off-by: Jon Mason<jdmason-zqedIHPRSYI@public.gmane.org>
> >> ---
> >>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
> >>    1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/scsi/lpfc/lpfc_init.c
> b/drivers/scsi/lpfc/lpfc_init.c
> >> index 148b98d..9000ad0 100644
> >> --- a/drivers/scsi/lpfc/lpfc_init.c
> >> +++ b/drivers/scsi/lpfc/lpfc_init.c
> >> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
> >>            pci_save_state(pdev);
> >>
> >>            /* PCIe EEH recovery on powerpc platforms needs fundamental
> reset */
> >> -  if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
> >> +  if (pci_is_pcie(pdev))
> >>                    pdev->needs_freset = 1;
> >>
> >>            return 0;
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi"
> in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >


This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
  2011-06-30 20:41 ` James Smart
                     ` (2 preceding siblings ...)
       [not found]   ` <4E0CDF8B.3020505-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
@ 2011-07-01 15:05   ` Jon Mason
       [not found]   ` <9c96a4a4-c1e3-4af2-a129-db1ce80a2973@exht1.ad.emulex.com>
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-01 15:05 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi, Richard Lary

On Thu, Jun 30, 2011 at 3:41 PM, James Smart <james.smart@emulex.com> wrote:
> Jon,
>
> I must NACK this patch to the lpfc driver and recommend that all other
> patches which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> "pci_is_pcie(pdev)" are NACK'd as well.
>
> The reason is due to an issue on PPC platforms whereby use of
> "pdev->is_pcie" and pci_is_pcie() will erroneously fail under some
> conditions, but explicit search for the capability struct via
> pci_find_capability() is always successful.   I expect this to be due a
> shadowing of pci config space in the hal/platform that isn't sufficiently
> built up.  We detected this issue while testing AER/EEH, and are functional
> only if the pci_find_capability() option is used.

pci_is_pcie checks for a PCI-E capability offset that was determined
by calling pci_find_capability during the PCI bus walking.  Based on
your description above this should be functionally equivalent.  If
this is not safe, then the PCI bus walking code is most likely busted
on EEH enabled PPC systems (and that is a BIG problem).

Thanks,
Jon

>
> -- james s
>
>
>
> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>
>> The PCIE capability offset is saved during PCI bus walking.  It will
>> remove an unnecessary search in the PCI configuration space if this
>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>> better way of determining if the device is PCIE or not (as it uses the
>> same saved PCIE capability offset).
>>
>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>> ---
>>  drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>> index 148b98d..9000ad0 100644
>> --- a/drivers/scsi/lpfc/lpfc_init.c
>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>        pci_save_state(pdev);
>>
>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>> */
>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>> +       if (pci_is_pcie(pdev))
>>                pdev->needs_freset = 1;
>>
>>        return 0;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Warning: mthca/qib : removal of PCI_CAP_ID_EXP
       [not found]           ` <35AAF1E4A771E142979F27B51793A4888838F2367E-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
@ 2011-07-01 15:07             ` Jon Mason
       [not found]               ` <BANLkTimT5SaRupWoC+60sgdgsvW2a_T3_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Jon Mason @ 2011-07-01 15:07 UTC (permalink / raw)
  To: Mike Marciniszyn
  Cc: James Smart, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Richard Lary,
	eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	jlburr-vna1KIf7WgpBDgjK7y7TUQ

pci_is_pcie checks for a PCI-E capability offset that was determined
by calling pci_find_capability during the PCI bus walking.  Based on
the description below this should be functionally equivalent.  If
this is not safe, then the PCI bus walking code is most likely busted
on EEH enabled PPC systems (and that is a BIG problem).  I'll e-mail
the PPC mailing list to verify the issue.

Thanks,
Jon

On Fri, Jul 1, 2011 at 10:01 AM, Mike Marciniszyn
<mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote:
> The patch was ok here, but we only support x86_64.
>
> Mike
>
>> -----Original Message-----
>> From: James Smart [mailto:james.smart-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org]
>> Sent: Friday, July 01, 2011 10:49 AM
>> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: James Smart; Jon Mason; Richard Lary; Mike Marciniszyn;
>> eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org; jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org
>> Subject: Warning: mthca/qib : removal of PCI_CAP_ID_EXP
>>
>> All,
>>
>> I wanted to communicate a potential warning to those drivers that had a
>> patch
>> submitted to replace config space searches of PCI_CAP_ID_EXP with
>> shorthand
>> options such as is_pcie and pci_is_pcie().
>>
>> Testing with the lpfc driver and AER/EEH identified cases where the
>> short-hand
>> search options would fail on PPC platforms.  The only successful option
>> in all
>> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I
>> recommend
>> that this change not be accepted until the platform level issue can be
>> identified and corrected.
>>
>> -- james s
>>
>>
>>
>> On 6/30/2011 4:41 PM, James Smart wrote:
>> > Jon,
>> >
>> > I must NACK this patch to the lpfc driver and recommend that all
>> other patches
>> > which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> > "pci_is_pcie(pdev)" are NACK'd as well.
>> >
>> > The reason is due to an issue on PPC platforms whereby use of "pdev-
>> >is_pcie"
>> > and pci_is_pcie() will erroneously fail under some conditions, but
>> explicit
>> > search for the capability struct via pci_find_capability() is always
>> > successful.   I expect this to be due a shadowing of pci config space
>> in the
>> > hal/platform that isn't sufficiently built up.  We detected this
>> issue while
>> > testing AER/EEH, and are functional only if the pci_find_capability()
>> option
>> > is used.
>> >
>> > -- james s
>> >
>> >
>> >
>> > On 6/27/2011 1:39 PM, Jon Mason wrote:
>> >> The PCIE capability offset is saved during PCI bus walking.  It will
>> >> remove an unnecessary search in the PCI configuration space if this
>> >> value is referenced instead of reacquiring it.  Also, pci_is_pcie is
>> a
>> >> better way of determining if the device is PCIE or not (as it uses
>> the
>> >> same saved PCIE capability offset).
>> >>
>> >> Signed-off-by: Jon Mason<jdmason-zqedIHPRSYI@public.gmane.org>
>> >> ---
>> >>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
>> >>    1 files changed, 1 insertions(+), 1 deletions(-)
>> >>
>> >> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>> b/drivers/scsi/lpfc/lpfc_init.c
>> >> index 148b98d..9000ad0 100644
>> >> --- a/drivers/scsi/lpfc/lpfc_init.c
>> >> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> >> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>> >>            pci_save_state(pdev);
>> >>
>> >>            /* PCIe EEH recovery on powerpc platforms needs fundamental
>> reset */
>> >> -  if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>> >> +  if (pci_is_pcie(pdev))
>> >>                    pdev->needs_freset = 1;
>> >>
>> >>            return 0;
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-scsi"
>> in
>> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>
>
> This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP
  2011-07-01 14:49   ` Warning: iwlegacy/iwlwifi/rtlwifi " James Smart
@ 2011-07-01 15:08     ` Jon Mason
  2011-07-02 16:49       ` Larry Finger
  2011-07-06  3:15       ` Jon Mason
  0 siblings, 2 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-01 15:08 UTC (permalink / raw)
  To: James Smart
  Cc: linux-wireless, Richard Lary, wey-yi.w.guy, Stanislaw Gruszka,
	Larry.Finger, chaoming_li

pci_is_pcie checks for a PCI-E capability offset that was determined
by calling pci_find_capability during the PCI bus walking.  Based on
your description above this should be functionally equivalent.  If
this is not safe, then the PCI bus walking code is most likely busted
on EEH enabled PPC systems (and that is a BIG problem).

Thanks,
Jon

On Fri, Jul 1, 2011 at 9:49 AM, James Smart <james.smart@emulex.com> wrote:
> All,
>
> I wanted to communicate a potential warning to those drivers that had a
> patch submitted to replace config space searches of PCI_CAP_ID_EXP with
> shorthand options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the
> short-hand search options would fail on PPC platforms.  The only successful
> option in all cases was the explicit search via PCI_CAP_ID_EXP.   Therefore,
> I recommend that this change not be accepted until the platform level issue
> can be identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
>>
>> Jon,
>>
>> I must NACK this patch to the lpfc driver and recommend that all other
>> patches
>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> "pci_is_pcie(pdev)" are NACK'd as well.
>>
>> The reason is due to an issue on PPC platforms whereby use of
>> "pdev->is_pcie"
>> and pci_is_pcie() will erroneously fail under some conditions, but
>> explicit
>> search for the capability struct via pci_find_capability() is always
>> successful.   I expect this to be due a shadowing of pci config space in
>> the
>> hal/platform that isn't sufficiently built up.  We detected this issue
>> while
>> testing AER/EEH, and are functional only if the pci_find_capability()
>> option
>> is used.
>>
>> -- james s
>>
>>
>>
>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>>
>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>> remove an unnecessary search in the PCI configuration space if this
>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>> better way of determining if the device is PCIE or not (as it uses the
>>> same saved PCIE capability offset).
>>>
>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>> ---
>>>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>> b/drivers/scsi/lpfc/lpfc_init.c
>>> index 148b98d..9000ad0 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>        pci_save_state(pdev);
>>>
>>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>>> */
>>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> +       if (pci_is_pcie(pdev))
>>>                pdev->needs_freset = 1;
>>>
>>>        return 0;
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

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

* Re: Warning: qla4xxx/qla2xxx/lpfc : removal of PCI_CAP_ID_EXP
  2011-07-01 14:48   ` Warning: qla4xxx/qla2xxx/lpfc : removal " James Smart
@ 2011-07-01 15:10     ` Jon Mason
  2011-07-06  3:15       ` Jon Mason
  0 siblings, 1 reply; 22+ messages in thread
From: Jon Mason @ 2011-07-01 15:10 UTC (permalink / raw)
  To: James Smart
  Cc: linux-scsi, Richard Lary, Ravi Anand, vikas.chaudhary,
	iscsi-driver, Andrew Vasquez

pci_is_pcie checks for a PCI-E capability offset that was determined
by calling pci_find_capability during the PCI bus walking.  Based on
the description below this should be functionally equivalent.  If
this is not safe, then the PCI bus walking code is most likely busted
on EEH enabled PPC systems (and that is a BIG problem).  I'll e-mail
the PPC mailing list to verify the issue.

Thanks,
Jon

On Fri, Jul 1, 2011 at 9:48 AM, James Smart <james.smart@emulex.com> wrote:
> All,
>
> I wanted to communicate a potential warning to those drivers that had a
> patch submitted to replace config space searches of PCI_CAP_ID_EXP with
> shorthand options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the
> short-hand search options would fail on PPC platforms.  The only successful
> option in all cases was the explicit search via PCI_CAP_ID_EXP.   Therefore,
> I recommend that this change not be accepted until the platform level issue
> can be identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
>>
>> Jon,
>>
>> I must NACK this patch to the lpfc driver and recommend that all other
>> patches
>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> "pci_is_pcie(pdev)" are NACK'd as well.
>>
>> The reason is due to an issue on PPC platforms whereby use of
>> "pdev->is_pcie"
>> and pci_is_pcie() will erroneously fail under some conditions, but
>> explicit
>> search for the capability struct via pci_find_capability() is always
>> successful.   I expect this to be due a shadowing of pci config space in
>> the
>> hal/platform that isn't sufficiently built up.  We detected this issue
>> while
>> testing AER/EEH, and are functional only if the pci_find_capability()
>> option
>> is used.
>>
>> -- james s
>>
>>
>>
>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>>
>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>> remove an unnecessary search in the PCI configuration space if this
>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>> better way of determining if the device is PCIE or not (as it uses the
>>> same saved PCIE capability offset).
>>>
>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>> ---
>>>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>> b/drivers/scsi/lpfc/lpfc_init.c
>>> index 148b98d..9000ad0 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>        pci_save_state(pdev);
>>>
>>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>>> */
>>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> +       if (pci_is_pcie(pdev))
>>>                pdev->needs_freset = 1;
>>>
>>>        return 0;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP
  2011-07-01 15:08     ` Jon Mason
@ 2011-07-02 16:49       ` Larry Finger
  2011-07-02 17:04         ` Jon Mason
  2011-07-04  1:47         ` Adrian Chadd
  2011-07-06  3:15       ` Jon Mason
  1 sibling, 2 replies; 22+ messages in thread
From: Larry Finger @ 2011-07-02 16:49 UTC (permalink / raw)
  To: Jon Mason
  Cc: James Smart, linux-wireless, Richard Lary, wey-yi.w.guy,
	Stanislaw Gruszka, chaoming_li

On 07/01/2011 10:08 AM, Jon Mason wrote:
> pci_is_pcie checks for a PCI-E capability offset that was determined
> by calling pci_find_capability during the PCI bus walking.  Based on
> your description above this should be functionally equivalent.  If
> this is not safe, then the PCI bus walking code is most likely busted
> on EEH enabled PPC systems (and that is a BIG problem).

Are there PPC systems that support PCI-E cards? I looked for one earlier and did 
not find any. In particular, I wanted a machine to test the Realtek drivers for 
correct big-endian operation. I settled on a Powerbook G4 so that I could test 
the USB drivers.

Larry


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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP
  2011-07-02 16:49       ` Larry Finger
@ 2011-07-02 17:04         ` Jon Mason
  2011-07-04  1:47         ` Adrian Chadd
  1 sibling, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-02 17:04 UTC (permalink / raw)
  To: Larry Finger
  Cc: James Smart, linux-wireless, Richard Lary, wey-yi.w.guy,
	Stanislaw Gruszka, chaoming_li

On Sat, Jul 2, 2011 at 11:49 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 07/01/2011 10:08 AM, Jon Mason wrote:
>>
>> pci_is_pcie checks for a PCI-E capability offset that was determined
>> by calling pci_find_capability during the PCI bus walking.  Based on
>> your description above this should be functionally equivalent.  If
>> this is not safe, then the PCI bus walking code is most likely busted
>> on EEH enabled PPC systems (and that is a BIG problem).
>
> Are there PPC systems that support PCI-E cards? I looked for one earlier and
> did not find any. In particular, I wanted a machine to test the Realtek
> drivers for correct big-endian operation. I settled on a Powerbook G4 so
> that I could test the USB drivers.

High-end IBM PPC systems have PCI-E, but are most likely too expensive
for an individual user.  If you are okay with 32bit PPC, you can use
qemu to emulate PPC (see qemu-system-ppc).  I believe you can do USB
pass-though on the emulated system.

Thanks,
Jon

> Larry
>
>

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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP
  2011-07-02 16:49       ` Larry Finger
  2011-07-02 17:04         ` Jon Mason
@ 2011-07-04  1:47         ` Adrian Chadd
  1 sibling, 0 replies; 22+ messages in thread
From: Adrian Chadd @ 2011-07-04  1:47 UTC (permalink / raw)
  To: Larry Finger
  Cc: Jon Mason, James Smart, linux-wireless, Richard Lary,
	wey-yi.w.guy, Stanislaw Gruszka, chaoming_li

I've been made aware of PPC + PCI-E embedded systems boards.



Adrian

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

* Re: Warning: myri10ge/sky2/vxge/r8169/niu/bnx2/bnx2x/igb/e100e/cxgb3/mlx4/tg3/vxge : removal of PCI_CAP_ID_EXP
       [not found]     ` <BANLkTi=BCC3PO_LecW77ht+kBAAVD6=Kgw@mail.gmail.com>
@ 2011-07-06  3:14       ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-06  3:14 UTC (permalink / raw)
  To: James Smart
  Cc: nic_swsd, divy, e1000-devel, netdev, romieu, mcarlson, eilong,
	yevgenyp, Richard Lary, gallatin, shemminger, davem, mchan

On Fri, Jul 1, 2011 at 10:28 AM, Jon Mason <jdmason@kudzu.us> wrote:
> On Fri, Jul 1, 2011 at 9:49 AM, James Smart <james.smart@emulex.com> wrote:
>> All,
>>
>> I wanted to communicate a potential warning to those drivers that had a
>> patch submitted to replace config space searches of PCI_CAP_ID_EXP with
>> shorthand options such as is_pcie and pci_is_pcie().
>>
>> Testing with the lpfc driver and AER/EEH identified cases where the
>> short-hand search options would fail on PPC platforms.  The only successful
>> option in all cases was the explicit search via PCI_CAP_ID_EXP.   Therefore,
>> I recommend that this change not be accepted until the platform level issue
>> can be identified and corrected.
>
> pci_is_pcie checks for a PCI-E capability offset that was determined
> by calling pci_find_capability during the PCI bus walking.  Based on
> your description above this should be functionally equivalent.  If
> this is not safe, then the PCI bus walking code is most likely busted
> on EEH enabled PPC systems (and that is a BIG problem).
>
> I have e-mailed the PPC and PCI mailing lists to verify the issue.

Per Richard Lary's testing, this is not an issue with the latest kernel.
http://www.spinics.net/lists/linux-pci/msg11350.html

Thanks,
Jon


>
> Thanks,
> Jon
>
>
>>
>> -- james s
>>
>>
>>
>> On 6/30/2011 4:41 PM, James Smart wrote:
>>>
>>> Jon,
>>>
>>> I must NACK this patch to the lpfc driver and recommend that all other
>>> patches
>>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>>> "pci_is_pcie(pdev)" are NACK'd as well.
>>>
>>> The reason is due to an issue on PPC platforms whereby use of
>>> "pdev->is_pcie"
>>> and pci_is_pcie() will erroneously fail under some conditions, but
>>> explicit
>>> search for the capability struct via pci_find_capability() is always
>>> successful.   I expect this to be due a shadowing of pci config space in
>>> the
>>> hal/platform that isn't sufficiently built up.  We detected this issue
>>> while
>>> testing AER/EEH, and are functional only if the pci_find_capability()
>>> option
>>> is used.
>>>
>>> -- james s
>>>
>>>
>>>
>>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>>>
>>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>>> remove an unnecessary search in the PCI configuration space if this
>>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>>> better way of determining if the device is PCIE or not (as it uses the
>>>> same saved PCIE capability offset).
>>>>
>>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>>> ---
>>>>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>>> b/drivers/scsi/lpfc/lpfc_init.c
>>>> index 148b98d..9000ad0 100644
>>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>>        pci_save_state(pdev);
>>>>
>>>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>>>> */
>>>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>>> +       if (pci_is_pcie(pdev))
>>>>                pdev->needs_freset = 1;
>>>>
>>>>        return 0;
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

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

* Re: Warning: qla4xxx/qla2xxx/lpfc : removal of PCI_CAP_ID_EXP
  2011-07-01 15:10     ` Jon Mason
@ 2011-07-06  3:15       ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-06  3:15 UTC (permalink / raw)
  To: James Smart
  Cc: linux-scsi, Richard Lary, Ravi Anand, vikas.chaudhary,
	iscsi-driver, Andrew Vasquez

Per Richard Lary's testing, this is not an issue with the latest kernel.
http://www.spinics.net/lists/linux-pci/msg11350.html

Thanks,
Jon

On Fri, Jul 1, 2011 at 10:10 AM, Jon Mason <jdmason@kudzu.us> wrote:
> pci_is_pcie checks for a PCI-E capability offset that was determined
> by calling pci_find_capability during the PCI bus walking.  Based on
> the description below this should be functionally equivalent.  If
> this is not safe, then the PCI bus walking code is most likely busted
> on EEH enabled PPC systems (and that is a BIG problem).  I'll e-mail
> the PPC mailing list to verify the issue.
>
> Thanks,
> Jon
>
> On Fri, Jul 1, 2011 at 9:48 AM, James Smart <james.smart@emulex.com> wrote:
>> All,
>>
>> I wanted to communicate a potential warning to those drivers that had a
>> patch submitted to replace config space searches of PCI_CAP_ID_EXP with
>> shorthand options such as is_pcie and pci_is_pcie().
>>
>> Testing with the lpfc driver and AER/EEH identified cases where the
>> short-hand search options would fail on PPC platforms.  The only successful
>> option in all cases was the explicit search via PCI_CAP_ID_EXP.   Therefore,
>> I recommend that this change not be accepted until the platform level issue
>> can be identified and corrected.
>>
>> -- james s
>>
>>
>>
>> On 6/30/2011 4:41 PM, James Smart wrote:
>>>
>>> Jon,
>>>
>>> I must NACK this patch to the lpfc driver and recommend that all other
>>> patches
>>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>>> "pci_is_pcie(pdev)" are NACK'd as well.
>>>
>>> The reason is due to an issue on PPC platforms whereby use of
>>> "pdev->is_pcie"
>>> and pci_is_pcie() will erroneously fail under some conditions, but
>>> explicit
>>> search for the capability struct via pci_find_capability() is always
>>> successful.   I expect this to be due a shadowing of pci config space in
>>> the
>>> hal/platform that isn't sufficiently built up.  We detected this issue
>>> while
>>> testing AER/EEH, and are functional only if the pci_find_capability()
>>> option
>>> is used.
>>>
>>> -- james s
>>>
>>>
>>>
>>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>>>
>>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>>> remove an unnecessary search in the PCI configuration space if this
>>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>>> better way of determining if the device is PCIE or not (as it uses the
>>>> same saved PCIE capability offset).
>>>>
>>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>>> ---
>>>>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>>> b/drivers/scsi/lpfc/lpfc_init.c
>>>> index 148b98d..9000ad0 100644
>>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>>        pci_save_state(pdev);
>>>>
>>>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>>>> */
>>>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>>> +       if (pci_is_pcie(pdev))
>>>>                pdev->needs_freset = 1;
>>>>
>>>>        return 0;
>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP
  2011-07-01 15:08     ` Jon Mason
  2011-07-02 16:49       ` Larry Finger
@ 2011-07-06  3:15       ` Jon Mason
  1 sibling, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-06  3:15 UTC (permalink / raw)
  To: James Smart
  Cc: linux-wireless, Richard Lary, wey-yi.w.guy, Stanislaw Gruszka,
	Larry.Finger, chaoming_li

Per Richard Lary's testing, this is not an issue with the latest kernel.
http://www.spinics.net/lists/linux-pci/msg11350.html

Thanks,
Jon

On Fri, Jul 1, 2011 at 10:08 AM, Jon Mason <jdmason@kudzu.us> wrote:
> pci_is_pcie checks for a PCI-E capability offset that was determined
> by calling pci_find_capability during the PCI bus walking.  Based on
> your description above this should be functionally equivalent.  If
> this is not safe, then the PCI bus walking code is most likely busted
> on EEH enabled PPC systems (and that is a BIG problem).
>
> Thanks,
> Jon
>
> On Fri, Jul 1, 2011 at 9:49 AM, James Smart <james.smart@emulex.com> wrote:
>> All,
>>
>> I wanted to communicate a potential warning to those drivers that had a
>> patch submitted to replace config space searches of PCI_CAP_ID_EXP with
>> shorthand options such as is_pcie and pci_is_pcie().
>>
>> Testing with the lpfc driver and AER/EEH identified cases where the
>> short-hand search options would fail on PPC platforms.  The only successful
>> option in all cases was the explicit search via PCI_CAP_ID_EXP.   Therefore,
>> I recommend that this change not be accepted until the platform level issue
>> can be identified and corrected.
>>
>> -- james s
>>
>>
>>
>> On 6/30/2011 4:41 PM, James Smart wrote:
>>>
>>> Jon,
>>>
>>> I must NACK this patch to the lpfc driver and recommend that all other
>>> patches
>>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>>> "pci_is_pcie(pdev)" are NACK'd as well.
>>>
>>> The reason is due to an issue on PPC platforms whereby use of
>>> "pdev->is_pcie"
>>> and pci_is_pcie() will erroneously fail under some conditions, but
>>> explicit
>>> search for the capability struct via pci_find_capability() is always
>>> successful.   I expect this to be due a shadowing of pci config space in
>>> the
>>> hal/platform that isn't sufficiently built up.  We detected this issue
>>> while
>>> testing AER/EEH, and are functional only if the pci_find_capability()
>>> option
>>> is used.
>>>
>>> -- james s
>>>
>>>
>>>
>>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>>>
>>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>>> remove an unnecessary search in the PCI configuration space if this
>>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>>> better way of determining if the device is PCIE or not (as it uses the
>>>> same saved PCIE capability offset).
>>>>
>>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>>> ---
>>>>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>>> b/drivers/scsi/lpfc/lpfc_init.c
>>>> index 148b98d..9000ad0 100644
>>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>>        pci_save_state(pdev);
>>>>
>>>>        /* PCIe EEH recovery on powerpc platforms needs fundamental reset
>>>> */
>>>> -       if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>>> +       if (pci_is_pcie(pdev))
>>>>                pdev->needs_freset = 1;
>>>>
>>>>        return 0;
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>

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

* Re: Warning: mthca/qib : removal of PCI_CAP_ID_EXP
       [not found]               ` <BANLkTimT5SaRupWoC+60sgdgsvW2a_T3_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-07-06  3:16                 ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2011-07-06  3:16 UTC (permalink / raw)
  To: Mike Marciniszyn
  Cc: James Smart, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Richard Lary,
	eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	jlburr-vna1KIf7WgpBDgjK7y7TUQ

Per Richard Lary's testing, this is not an issue with the latest kernel.
http://www.spinics.net/lists/linux-pci/msg11350.html

Thanks,
Jon

On Fri, Jul 1, 2011 at 10:07 AM, Jon Mason <jdmason-zqedIHPRSYI@public.gmane.org> wrote:
> pci_is_pcie checks for a PCI-E capability offset that was determined
> by calling pci_find_capability during the PCI bus walking.  Based on
> the description below this should be functionally equivalent.  If
> this is not safe, then the PCI bus walking code is most likely busted
> on EEH enabled PPC systems (and that is a BIG problem).  I'll e-mail
> the PPC mailing list to verify the issue.
>
> Thanks,
> Jon
>
> On Fri, Jul 1, 2011 at 10:01 AM, Mike Marciniszyn
> <mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote:
>> The patch was ok here, but we only support x86_64.
>>
>> Mike
>>
>>> -----Original Message-----
>>> From: James Smart [mailto:james.smart-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org]
>>> Sent: Friday, July 01, 2011 10:49 AM
>>> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> Cc: James Smart; Jon Mason; Richard Lary; Mike Marciniszyn;
>>> eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org; jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org
>>> Subject: Warning: mthca/qib : removal of PCI_CAP_ID_EXP
>>>
>>> All,
>>>
>>> I wanted to communicate a potential warning to those drivers that had a
>>> patch
>>> submitted to replace config space searches of PCI_CAP_ID_EXP with
>>> shorthand
>>> options such as is_pcie and pci_is_pcie().
>>>
>>> Testing with the lpfc driver and AER/EEH identified cases where the
>>> short-hand
>>> search options would fail on PPC platforms.  The only successful option
>>> in all
>>> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I
>>> recommend
>>> that this change not be accepted until the platform level issue can be
>>> identified and corrected.
>>>
>>> -- james s
>>>
>>>
>>>
>>> On 6/30/2011 4:41 PM, James Smart wrote:
>>> > Jon,
>>> >
>>> > I must NACK this patch to the lpfc driver and recommend that all
>>> other patches
>>> > which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>>> > "pci_is_pcie(pdev)" are NACK'd as well.
>>> >
>>> > The reason is due to an issue on PPC platforms whereby use of "pdev-
>>> >is_pcie"
>>> > and pci_is_pcie() will erroneously fail under some conditions, but
>>> explicit
>>> > search for the capability struct via pci_find_capability() is always
>>> > successful.   I expect this to be due a shadowing of pci config space
>>> in the
>>> > hal/platform that isn't sufficiently built up.  We detected this
>>> issue while
>>> > testing AER/EEH, and are functional only if the pci_find_capability()
>>> option
>>> > is used.
>>> >
>>> > -- james s
>>> >
>>> >
>>> >
>>> > On 6/27/2011 1:39 PM, Jon Mason wrote:
>>> >> The PCIE capability offset is saved during PCI bus walking.  It will
>>> >> remove an unnecessary search in the PCI configuration space if this
>>> >> value is referenced instead of reacquiring it.  Also, pci_is_pcie is
>>> a
>>> >> better way of determining if the device is PCIE or not (as it uses
>>> the
>>> >> same saved PCIE capability offset).
>>> >>
>>> >> Signed-off-by: Jon Mason<jdmason-zqedIHPRSYI@public.gmane.org>
>>> >> ---
>>> >>    drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>> >>    1 files changed, 1 insertions(+), 1 deletions(-)
>>> >>
>>> >> diff --git a/drivers/scsi/lpfc/lpfc_init.c
>>> b/drivers/scsi/lpfc/lpfc_init.c
>>> >> index 148b98d..9000ad0 100644
>>> >> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> >> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> >> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>> >>            pci_save_state(pdev);
>>> >>
>>> >>            /* PCIe EEH recovery on powerpc platforms needs fundamental
>>> reset */
>>> >> -  if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> >> +  if (pci_is_pcie(pdev))
>>> >>                    pdev->needs_freset = 1;
>>> >>
>>> >>            return 0;
>>> > --
>>> > To unsubscribe from this list: send the line "unsubscribe linux-scsi"
>>> in
>>> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> >
>>
>>
>> This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Warning: qla4xxx/qla2xxx/lpfc   : removal of PCI_CAP_ID_EXP
       [not found]   ` <4E0DDE55.30006@emulex.com>
@ 2011-07-06 14:38     ` James Smart
  0 siblings, 0 replies; 22+ messages in thread
From: James Smart @ 2011-07-06 14:38 UTC (permalink / raw)
  To: linux-scsi
  Cc: Jon Mason, Richard Lary, Ravi Anand, vikas.chaudhary,
	iscsi-driver, Andrew Vasquez

FYI:   after discussion of this error on linux-pci and linuxppc-dev, the error 
was corrected in a patch checked into 2.6.33-rc6/3.0-rc6 
(http://marc.info/?l=linux-pci&m=130992047232053&w=2)

-- james s



On 7/1/2011 10:48 AM, James Smart wrote:
> All,
>
> I wanted to communicate a potential warning to those drivers that had a patch
> submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand
> options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the short-hand
> search options would fail on PPC platforms.  The only successful option in all
> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend
> that this change not be accepted until the platform level issue can be
> identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
>> Jon,
>>
>> I must NACK this patch to the lpfc driver and recommend that all other patches
>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> "pci_is_pcie(pdev)" are NACK'd as well.
>>
>> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
>> and pci_is_pcie() will erroneously fail under some conditions, but explicit
>> search for the capability struct via pci_find_capability() is always
>> successful.   I expect this to be due a shadowing of pci config space in the
>> hal/platform that isn't sufficiently built up.  We detected this issue while
>> testing AER/EEH, and are functional only if the pci_find_capability() option
>> is used.
>>
>> -- james s
>>
>>
>>
>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>> remove an unnecessary search in the PCI configuration space if this
>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>> better way of determining if the device is PCIE or not (as it uses the
>>> same saved PCIE capability offset).
>>>
>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>> ---
>>>     drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>     1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>>> index 148b98d..9000ad0 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>     	pci_save_state(pdev);
>>>
>>>     	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> +	if (pci_is_pcie(pdev))
>>>     		pdev->needs_freset = 1;
>>>
>>>     	return 0;
>
>

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

* Re: Warning: iwlegacy/iwlwifi/rtlwifi  : removal of PCI_CAP_ID_EXP
       [not found]   ` <4E0DDE5D.8040904@emulex.com>
@ 2011-07-06 14:38     ` James Smart
  0 siblings, 0 replies; 22+ messages in thread
From: James Smart @ 2011-07-06 14:38 UTC (permalink / raw)
  To: linux-wireless
  Cc: Jon Mason, Richard Lary, wey-yi.w.guy, Stanislaw Gruszka,
	Larry.Finger, chaoming_li

FYI:   after discussion of this error on linux-pci and linuxppc-dev, the error 
was corrected in a patch checked into 2.6.33-rc6/3.0-rc6 
(http://marc.info/?l=linux-pci&m=130992047232053&w=2)

-- james s




On 7/1/2011 10:49 AM, James Smart wrote:
> All,
>
> I wanted to communicate a potential warning to those drivers that had a patch
> submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand
> options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the short-hand
> search options would fail on PPC platforms.  The only successful option in all
> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend
> that this change not be accepted until the platform level issue can be
> identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
>> Jon,
>>
>> I must NACK this patch to the lpfc driver and recommend that all other patches
>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> "pci_is_pcie(pdev)" are NACK'd as well.
>>
>> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
>> and pci_is_pcie() will erroneously fail under some conditions, but explicit
>> search for the capability struct via pci_find_capability() is always
>> successful.   I expect this to be due a shadowing of pci config space in the
>> hal/platform that isn't sufficiently built up.  We detected this issue while
>> testing AER/EEH, and are functional only if the pci_find_capability() option
>> is used.
>>
>> -- james s
>>
>>
>>
>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>> remove an unnecessary search in the PCI configuration space if this
>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>> better way of determining if the device is PCIE or not (as it uses the
>>> same saved PCIE capability offset).
>>>
>>> Signed-off-by: Jon Mason<jdmason@kudzu.us>
>>> ---
>>>     drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>     1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>>> index 148b98d..9000ad0 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>     	pci_save_state(pdev);
>>>
>>>     	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> +	if (pci_is_pcie(pdev))
>>>     		pdev->needs_freset = 1;
>>>
>>>     	return 0;
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

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

* Re: Warning: mthca/qib  : removal of PCI_CAP_ID_EXP
       [not found]     ` <4E0DDE68.5040904-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
@ 2011-07-06 14:38       ` James Smart
  0 siblings, 0 replies; 22+ messages in thread
From: James Smart @ 2011-07-06 14:38 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Jon Mason, Richard Lary, mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA,
	eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	jlburr-vna1KIf7WgpBDgjK7y7TUQ

FYI:   after discussion of this error on linux-pci and linuxppc-dev, the error 
was corrected in a patch checked into 2.6.33-rc6/3.0-rc6 
(http://marc.info/?l=linux-pci&m=130992047232053&w=2)

-- james s


On 7/1/2011 10:49 AM, James Smart wrote:
> All,
>
> I wanted to communicate a potential warning to those drivers that had a patch
> submitted to replace config space searches of PCI_CAP_ID_EXP with shorthand
> options such as is_pcie and pci_is_pcie().
>
> Testing with the lpfc driver and AER/EEH identified cases where the short-hand
> search options would fail on PPC platforms.  The only successful option in all
> cases was the explicit search via PCI_CAP_ID_EXP.   Therefore, I recommend
> that this change not be accepted until the platform level issue can be
> identified and corrected.
>
> -- james s
>
>
>
> On 6/30/2011 4:41 PM, James Smart wrote:
>> Jon,
>>
>> I must NACK this patch to the lpfc driver and recommend that all other patches
>> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
>> "pci_is_pcie(pdev)" are NACK'd as well.
>>
>> The reason is due to an issue on PPC platforms whereby use of "pdev->is_pcie"
>> and pci_is_pcie() will erroneously fail under some conditions, but explicit
>> search for the capability struct via pci_find_capability() is always
>> successful.   I expect this to be due a shadowing of pci config space in the
>> hal/platform that isn't sufficiently built up.  We detected this issue while
>> testing AER/EEH, and are functional only if the pci_find_capability() option
>> is used.
>>
>> -- james s
>>
>>
>>
>> On 6/27/2011 1:39 PM, Jon Mason wrote:
>>> The PCIE capability offset is saved during PCI bus walking.  It will
>>> remove an unnecessary search in the PCI configuration space if this
>>> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
>>> better way of determining if the device is PCIE or not (as it uses the
>>> same saved PCIE capability offset).
>>>
>>> Signed-off-by: Jon Mason<jdmason-zqedIHPRSYI@public.gmane.org>
>>> ---
>>>     drivers/scsi/lpfc/lpfc_init.c |    2 +-
>>>     1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>>> index 148b98d..9000ad0 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>>>     	pci_save_state(pdev);
>>>
>>>     	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
>>> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
>>> +	if (pci_is_pcie(pdev))
>>>     		pdev->needs_freset = 1;
>>>
>>>     	return 0;
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP
  2011-06-27 17:39 [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
  2011-06-30 20:40 ` James Smart
  2011-06-30 20:41 ` James Smart
@ 2011-07-06 14:39 ` James Smart
  2 siblings, 0 replies; 22+ messages in thread
From: James Smart @ 2011-07-06 14:39 UTC (permalink / raw)
  To: Jon Mason; +Cc: linux-scsi

Acked-by: James Smart <james.smart@emulex.com>


On 6/27/2011 1:39 PM, Jon Mason wrote:
> The PCIE capability offset is saved during PCI bus walking.  It will
> remove an unnecessary search in the PCI configuration space if this
> value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
> better way of determining if the device is PCIE or not (as it uses the
> same saved PCIE capability offset).
>
> Signed-off-by: Jon Mason<jdmason@kudzu.us>
> ---
>   drivers/scsi/lpfc/lpfc_init.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 148b98d..9000ad0 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -3970,7 +3970,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba)
>   	pci_save_state(pdev);
>
>   	/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
> -	if (pci_find_capability(pdev, PCI_CAP_ID_EXP))
> +	if (pci_is_pcie(pdev))
>   		pdev->needs_freset = 1;
>
>   	return 0;

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

end of thread, other threads:[~2011-07-06 14:40 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27 17:39 [PATCH 03/19] lpfc: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
2011-06-30 20:40 ` James Smart
2011-06-30 20:41 ` James Smart
2011-07-01 14:48   ` Warning: qla4xxx/qla2xxx/lpfc : removal " James Smart
2011-07-01 15:10     ` Jon Mason
2011-07-06  3:15       ` Jon Mason
2011-07-01 14:49   ` Warning: iwlegacy/iwlwifi/rtlwifi " James Smart
2011-07-01 15:08     ` Jon Mason
2011-07-02 16:49       ` Larry Finger
2011-07-02 17:04         ` Jon Mason
2011-07-04  1:47         ` Adrian Chadd
2011-07-06  3:15       ` Jon Mason
     [not found]   ` <4E0CDF8B.3020505-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2011-07-01 14:49     ` Warning: mthca/qib " James Smart
     [not found]       ` <6dbdff99-df75-4456-ac0e-b35ac475f079-nbYkmrCdWxmgMrCBcu8zE0EOCMrvLtNR@public.gmane.org>
2011-07-01 15:01         ` Mike Marciniszyn
     [not found]           ` <35AAF1E4A771E142979F27B51793A4888838F2367E-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2011-07-01 15:07             ` Jon Mason
     [not found]               ` <BANLkTimT5SaRupWoC+60sgdgsvW2a_T3_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-06  3:16                 ` Jon Mason
2011-07-01 15:05   ` [PATCH 03/19] lpfc: remove unnecessary read " Jon Mason
     [not found]   ` <9c96a4a4-c1e3-4af2-a129-db1ce80a2973@exht1.ad.emulex.com>
     [not found]     ` <BANLkTi=BCC3PO_LecW77ht+kBAAVD6=Kgw@mail.gmail.com>
2011-07-06  3:14       ` Warning: myri10ge/sky2/vxge/r8169/niu/bnx2/bnx2x/igb/e100e/cxgb3/mlx4/tg3/vxge : removal " Jon Mason
     [not found]   ` <4E0DDE55.30006@emulex.com>
2011-07-06 14:38     ` Warning: qla4xxx/qla2xxx/lpfc " James Smart
     [not found]   ` <4E0DDE5D.8040904@emulex.com>
2011-07-06 14:38     ` Warning: iwlegacy/iwlwifi/rtlwifi " James Smart
     [not found]   ` <4E0DDE68.5040904@emulex.com>
     [not found]     ` <4E0DDE68.5040904-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2011-07-06 14:38       ` Warning: mthca/qib " James Smart
2011-07-06 14:39 ` [PATCH 03/19] lpfc: remove unnecessary read " James Smart

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.