#2067 closed defect (fixed)

Algorithm to determine max. PCI bus number is incorrect

Reported by: strauman Owned by: Joel Sherrill
Priority: highest Milestone: 4.9.5
Component: bsps Version: 4.9
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Gedare Bloom)

The algorithm scans all PCI busses (0..ff)
and all devices (0..31) on each bus for bridges
and determines the maximum of all subordinate
busses encountered.

However, the algorithm does not scan all functions
present in multi-function devices -- I have a PCI express
root complex (82801H) where multiple (non-zero index)
functions are 'PCI bridges' whose subordinate bus number is
missed by the original algorithm.

The attached patch makes sure that the scan
is extended to all functions of multi-function
devices.

Attachments (1)

rtems-i386-pcibios-buscnt-fix.diff (2.0 KB) - added by strauman on 05/31/12 at 03:01:17.
fix for the reported bug

Download all attachments as: .zip

Change History (8)

Changed on 05/31/12 at 03:01:17 by strauman

fix for the reported bug

comment:1 Changed on 05/31/12 at 03:01:17 by strauman

The algorithm scans all PCI busses (0..ff)
and all devices (0..31) on each bus for bridges
and determines the maximum of all subordinate
busses encountered.

However, the algorithm does not scan all functions
present in multi-function devices -- I have a PCI express
root complex (82801H) where multiple (non-zero index)
functions are 'PCI bridges' whose subordinate bus number is
missed by the original algorithm.

The attached patch makes sure that the scan
is extended to all functions of multi-function
devices.

comment:2 Changed on 12/19/14 at 05:06:18 by Gedare Bloom

Priority: normalhighest

Bump priority to highest for tickets with a fix attached or seemingly simple fix proposed in the description or comments.

comment:3 Changed on 12/24/14 at 03:29:57 by Till Strauman <strauman@…>

In e446d32687ee21037859d31f43a4a5d29db42793/rtems:

pc386: scan all functions of multi-function PCI devices

The current algorithm scans all PCI busses (0..ff)
and all devices (0..31) on each bus for bridges
and determines the maximum of all subordinate
busses encountered.

However, the algorithm does not scan all functions
present in multi-function devices -- I have a PCI express
root complex (82801H) where multiple (non-zero index)
functions are 'PCI bridges' whose subordinate bus number is
missed by the original algorithm.

This commit makes sure that the scan
is extended to all functions of multi-function
devices.

See #2067

comment:4 Changed on 12/24/14 at 03:30:10 by Till Strauman <strauman@…>

In 0863e8e3903d1d4fa04df3bdf847931240570bfa/rtems:

pc386: scan all functions of multi-function PCI devices

The current algorithm scans all PCI busses (0..ff)
and all devices (0..31) on each bus for bridges
and determines the maximum of all subordinate
busses encountered.

However, the algorithm does not scan all functions
present in multi-function devices -- I have a PCI express
root complex (82801H) where multiple (non-zero index)
functions are 'PCI bridges' whose subordinate bus number is
missed by the original algorithm.

This commit makes sure that the scan
is extended to all functions of multi-function
devices.

See #2067

comment:5 Changed on 12/24/14 at 03:30:27 by Till Strauman <strauman@…>

In 2573e698d1a5f2e481b5b0520a949c4f590bacbd/rtems:

pc386: scan all functions of multi-function PCI devices

The current algorithm scans all PCI busses (0..ff)
and all devices (0..31) on each bus for bridges
and determines the maximum of all subordinate
busses encountered.

However, the algorithm does not scan all functions
present in multi-function devices -- I have a PCI express
root complex (82801H) where multiple (non-zero index)
functions are 'PCI bridges' whose subordinate bus number is
missed by the original algorithm.

This commit makes sure that the scan
is extended to all functions of multi-function
devices.

See #2067

comment:6 Changed on 12/24/14 at 03:31:56 by Gedare Bloom

Description: modified (diff)
Resolution: fixed
Status: newclosed

Patch reformatted to fix whitespace and applied to master and release branches 4.10 and 4.9

comment:7 Changed on 12/24/14 at 03:44:45 by Gedare Bloom

Milestone: 4.114.9.5
Version: 4.104.9
Note: See TracTickets for help on using tickets.