lkml.org 
[lkml]   [2010]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/11] pci: reject mmio range start from 0 on pci_bridge read
Please change title of patch to:

pci: pci_read_bridge_bases rejects MMIO ranges starting at 0

* Yinghai Lu <yinghai@kernel.org>:
> that is wrong.
>
> exposed by that patch that doesn's shrink pci bridge res.

Ok, I don't understand how this patch interacts with patch 4/11.
Am I correct in understanding that something in 4/11 exposes a
problem that 3/11 fixes?

I'm just looking for a better explanation of *why* we need this
patch here.

> -v2: change to "bar reading" to "reg reading"
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> ---
> drivers/pci/probe.c | 18 +++++++++++++++---
> 1 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 11824d7..70b1f74 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -316,13 +316,17 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
> limit |= (io_limit_hi << 16);
> }
>
> - if (base <= limit) {
> + if (base <= limit && base) {

This construct (and the similar one below) is a little
non-idiomatic.

if (base && base <= limit)

reads a lot more naturally to me.

thanks,
/ac


\
 
 \ /
  Last update: 2010-01-16 05:23    [W:0.235 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site