linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Zhou Wang <wangzhou1@hisilicon.com>
Cc: Dongdong Liu <liudongdong3@huawei.com>,
	linux-pci@vger.kernel.org, bhelgaas@google.com,
	gabriele.paoloni@huawei.com, qiujiang@huawei.com,
	zhangjukuo@huawei.com, haifeng.wei@huawei.com,
	yisen.zhuang@huawei.com, "xuwei (O)" <xuwei5@hisilicon.com>
Subject: Re: [PATCH] PCI: hisi: fix the hisi_pcie_cfg_read bug when size=4
Date: Thu, 17 Dec 2015 12:43:31 -0600	[thread overview]
Message-ID: <20151217184331.GB29500@localhost> (raw)
In-Reply-To: <567293F3.6020004@hisilicon.com>

On Thu, Dec 17, 2015 at 06:52:35PM +0800, Zhou Wang wrote:
> On 2015/12/10 4:36, Zhou Wang wrote:
> > On 2015/12/10 0:16, Bjorn Helgaas wrote:
> >> On Fri, Dec 04, 2015 at 04:43:34PM -0600, Bjorn Helgaas wrote:
> >>> On Fri, Nov 27, 2015 at 12:58:00PM +0800, Dongdong Liu wrote:
> >>>> Current hisi_pcie_cfg_read code read the RC configuration space,
> >>>> this has a problem that the output parameter "*val" have not been
> >>>> assigned when size=4, so we fix the bug by "*val = reg_val" when size=4.
> >>>>
> >>>> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> >>>
> >>> Wow, that's a pretty egregious bug.  Was the hisi driver ever tested
> >>> at all?  We use dword reads in pci_bus_read_dev_vendor_id() to
> >>> enumerate devices, so if those didn't return valid data, nothing at
> >>> all should have worked.
> >>>
> >>> I tentatively put this on my for-linus branch for v4.4, but I wonder
> >>> whether it might be smarter to revert the driver completely until I
> >>> have more confidence in it.
> >>>
> >>> What sort of testing have you done on this driver?
> >>
> >> Since I haven't heard anything about whether this driver was ever
> >> tested, I dropped this patch from my for-linus branch and I reverted
> >> the entire hisi driver.
> >>
> >> Let me know when you have some testing results, and I'll take another
> >> look at it.
> >>
> >> Bjorn
> >>
> > 
> > Hi Bjorn,
> > 
> > Very sorry for late, I am on business trip at the moment so I have restricted
> > access to emails and my replies can be late.
> > 
> > The driver has been tested extensively based on internal version, but I did this
> > mistake when upstreaming :(. I will send a test log ASAP.
> >
> 
> Hi Bjorn,
> 
> I made a test based on Intel 82599 networking card, this is the bootup log which
> contains PCIe host and Intel 82599 networking card parts.

Thanks!  I updated my for-linus branch to remove the revert and add
the 32-bit config read fix.  I'll ask Linus to pull this before v4.4.

Bjorn

      reply	other threads:[~2015-12-17 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  4:58 [PATCH] PCI: hisi: fix the hisi_pcie_cfg_read bug when size=4 Dongdong Liu
2015-11-30  5:25 ` Zhou Wang
2015-12-04 22:43 ` Bjorn Helgaas
2015-12-09 16:16   ` Bjorn Helgaas
2015-12-09 20:36     ` Zhou Wang
2015-12-17 10:52       ` Zhou Wang
2015-12-17 18:43         ` Bjorn Helgaas [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=20151217184331.GB29500@localhost \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=gabriele.paoloni@huawei.com \
    --cc=haifeng.wei@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=qiujiang@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuwei5@hisilicon.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhangjukuo@huawei.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).