On 09/16/2015 10:29 AM, Will Deacon wrote:
Hi Lorenzo,
On Wed, Sep 16, 2015 at 12:28:52PM +0100, Lorenzo Pieralisi wrote:
On Wed, Sep 16, 2015 at 11:41:53AM +0100, Will Deacon wrote:
Here is the current code:
bus_range = pci->cfg.bus_range;
for (busn = bus_range->start; busn
Hi Lorenzo,
On Wed, Sep 16, 2015 at 12:28:52PM +0100, Lorenzo Pieralisi wrote:
> On Wed, Sep 16, 2015 at 11:41:53AM +0100, Will Deacon wrote:
> > > Here is the current code:
> > >
> > > >>bus_range = pci->cfg.bus_range;
> > > >>for (busn = bus_range->start; busn <= bus_range->end;
On Wed, Sep 16, 2015 at 11:41:53AM +0100, Will Deacon wrote:
[...]
> > Here is the current code:
> >
> > >> bus_range = pci->cfg.bus_range;
> > >> for (busn = bus_range->start; busn <= bus_range->end; ++busn) {
> > >> u32 idx = busn - bus_range->start;
> >
> > The index is offset by
On Tue, Sep 15, 2015 at 07:45:56PM +0100, David Daney wrote:
> On 09/15/2015 11:35 AM, Will Deacon wrote:
> > On Tue, Sep 15, 2015 at 07:02:54PM +0100, David Daney wrote:
> >> On 09/15/2015 10:49 AM, Will Deacon wrote:
> >>> On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote:
>
On 09/15/2015 11:35 AM, Will Deacon wrote:
On Tue, Sep 15, 2015 at 07:02:54PM +0100, David Daney wrote:
On 09/15/2015 10:49 AM, Will Deacon wrote:
On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote:
/* Limit the bus-range to fit within reg */
- bus_max = pci->cfg.bus_ran
On Tue, Sep 15, 2015 at 07:02:54PM +0100, David Daney wrote:
> On 09/15/2015 10:49 AM, Will Deacon wrote:
> > On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote:
> >>/* Limit the bus-range to fit within reg */
> >> - bus_max = pci->cfg.bus_range->start +
> >> -(resource_si
On 09/15/2015 10:49 AM, Will Deacon wrote:
On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote:
From: David Daney
There are two problems with the bus_max calculation:
1) The u8 data type can overflow for large config space windows.
2) The calculation is incorrect for a bus range that
On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote:
> From: David Daney
>
> There are two problems with the bus_max calculation:
>
> 1) The u8 data type can overflow for large config space windows.
>
> 2) The calculation is incorrect for a bus range that doesn't start at
>zero.
>
From: David Daney
There are two problems with the bus_max calculation:
1) The u8 data type can overflow for large config space windows.
2) The calculation is incorrect for a bus range that doesn't start at
zero.
Since the configuration space is relative to bus zero, make bus_max
just be the