linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <james.smart@emulex.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Jon Mason <jdmason@kudzu.us>, Richard Lary <rlary@us.ibm.com>,
	"wey-yi.w.guy@intel.com" <wey-yi.w.guy@intel.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	"Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
	"chaoming_li@realsil.com.cn" <chaoming_li@realsil.com.cn>
Subject: Re: Warning: iwlegacy/iwlwifi/rtlwifi  : removal of PCI_CAP_ID_EXP
Date: Wed, 6 Jul 2011 10:38:27 -0400	[thread overview]
Message-ID: <4E147363.1060001@emulex.com> (raw)
In-Reply-To: <4E0DDE5D.8040904@emulex.com>

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

      parent reply	other threads:[~2011-07-06 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1309196346-15749-1-git-send-email-jdmason@kudzu.us>
     [not found] ` <4E0CDF8B.3020505@emulex.com>
2011-07-01 14:49   ` Warning: iwlegacy/iwlwifi/rtlwifi : removal of PCI_CAP_ID_EXP 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]   ` <4E0DDE5D.8040904@emulex.com>
2011-07-06 14:38     ` James Smart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E147363.1060001@emulex.com \
    --to=james.smart@emulex.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=jdmason@kudzu.us \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rlary@us.ibm.com \
    --cc=sgruszka@redhat.com \
    --cc=wey-yi.w.guy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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).