From: Zhou Wang <wangzhou1@hisilicon.com>
To: Jingoo Han <jingoohan1@gmail.com>
Cc: Gabriele Paoloni <gabriele.paoloni@huawei.com>,
"<bhelgaas@google.com>" <bhelgaas@google.com>,
"<linux-pci@vger.kernel.org>" <linux-pci@vger.kernel.org>,
"<pratyush.anand@gmail.com>" <pratyush.anand@gmail.com>,
"<yuanzhichang@hisilicon.com>" <yuanzhichang@hisilicon.com>,
"<zhudacai@hisilicon.com>" <zhudacai@hisilicon.com>,
"<zhangjukuo@huawei.com>" <zhangjukuo@huawei.com>,
"<qiuzhenfa@hisilicon.com>" <qiuzhenfa@hisilicon.com>,
"<liguozhu@hisilicon.com>" <liguozhu@hisilicon.com>
Subject: Re: [PATCH] PCI: designware: fix dw_pcie_cfg_write
Date: Fri, 21 Aug 2015 13:16:27 +0800 [thread overview]
Message-ID: <55D6B42B.5010803@hisilicon.com> (raw)
In-Reply-To: <90DF1C90-A030-416D-9F86-364DBA1AABB6@gmail.com>
On 2015/8/21 12:48, Jingoo Han wrote:
> On 2015. 8. 21., at AM 10:51, Zhou Wang <wangzhou1@hisilicon.com> wrote:
>>
>>> On 2015/8/20 21:58, Gabriele Paoloni wrote:
>>> From: gabriele paoloni <gabriele.paoloni@huawei.com>
>>>
>>> Currently in dw_pcie_cfg_write() if the input size is 2 bytes
>>> the address offset is wrongly calculated as we mask also bit0
>>> of "where" input parameter. Instead we should mask all bits of
>>> "where" except bit0 and bit1.
>>>
>>> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
>>> ---
>>> drivers/pci/host/pcie-designware.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>>> index 69486be..a27f536 100644
>>> --- a/drivers/pci/host/pcie-designware.c
>>> +++ b/drivers/pci/host/pcie-designware.c
>>> @@ -99,7 +99,7 @@ int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val)
>>> if (size == 4)
>>> writel(val, addr);
>>> else if (size == 2)
>>> - writew(val, addr + (where & 2));
>>> + writew(val, addr + (where & 3));
>>> else if (size == 1)
>>> writeb(val, addr + (where & 3));
>>> else
>>
>> Hi Jingoo,
>>
>> Is there some special consideration? If we miss something, please let us know.
>
> This patch is unnecessary.
>
> In the case of 'size == 2', the writew() in dw_pcie_cfg_write() should handle the following values of 'where'.
>
> h00 b0000
> h02 b0010
>
> Thus, there is no need to keep 0th bit.
>
> One more thing, is there any reason to urge me to review this patch within a few hours?
> Please wait for reviews for enough hours.
Honestly speaking, I didn't mean to push you to review it :)
I thought maybe there was some hardware issues involved in above patch,
just asking a question about it. Anyway, maybe I should have waited for your reply.
Many thanks,
Zhou
>
> Maybe, your company looks to support you and other engineers for mainline kernel.
> However, I am not supported at all, so it is not easy to review the patches quickly.
>
> Best regards,
> Jingoo Han
>
>> Thanks,
>> Zhou
>>
>
> .
>
next prev parent reply other threads:[~2015-08-21 5:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 13:58 [PATCH] PCI: designware: fix dw_pcie_cfg_write Gabriele Paoloni
2015-08-21 1:51 ` Zhou Wang
2015-08-21 4:48 ` Jingoo Han
2015-08-21 5:16 ` Zhou Wang [this message]
2015-08-21 8:58 ` Gabriele Paoloni
2015-08-21 9:25 ` Jingoo Han
2015-08-21 10:29 ` Gabriele Paoloni
2015-08-21 11:07 ` Jingoo Han
2015-08-21 12:40 ` Gabriele Paoloni
2015-09-03 20:59 ` Bjorn Helgaas
2015-09-04 6:06 ` Pratyush Anand
2015-09-08 16:19 ` Gabriele Paoloni
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=55D6B42B.5010803@hisilicon.com \
--to=wangzhou1@hisilicon.com \
--cc=bhelgaas@google.com \
--cc=gabriele.paoloni@huawei.com \
--cc=jingoohan1@gmail.com \
--cc=liguozhu@hisilicon.com \
--cc=linux-pci@vger.kernel.org \
--cc=pratyush.anand@gmail.com \
--cc=qiuzhenfa@hisilicon.com \
--cc=yuanzhichang@hisilicon.com \
--cc=zhangjukuo@huawei.com \
--cc=zhudacai@hisilicon.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 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.