Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-07 Thread Jim Quinlan
On Sun, Dec 6, 2020 at 10:25 PM Florian Fainelli wrote: > > +JimQ, > > On 12/6/2020 12:16 PM, Krzysztof Wilczyński wrote: > > Hello Nicolas, Florian and Florian, > > > > [...] > >> -/* Configuration space read/write support */ > >> -static inline int brcm_pcie_cfg_index(int busnr, int devfn, int

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-06 Thread Florian Fainelli
+JimQ, On 12/6/2020 12:16 PM, Krzysztof Wilczyński wrote: > Hello Nicolas, Florian and Florian, > > [...] >> -/* Configuration space read/write support */ >> -static inline int brcm_pcie_cfg_index(int busnr, int devfn, int reg) >> -{ >> -return ((PCI_SLOT(devfn) & 0x1f) <<

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-06 Thread Krzysztof Wilczyński
Hello Nicolas, Florian and Florian, [...] > -/* Configuration space read/write support */ > -static inline int brcm_pcie_cfg_index(int busnr, int devfn, int reg) > -{ > - return ((PCI_SLOT(devfn) & 0x1f) << PCIE_EXT_SLOT_SHIFT) > - | ((PCI_FUNC(devfn) & 0x07) <<

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-11-30 Thread Derrick, Jonathan
On Sun, 2020-11-29 at 23:07 +, Krzysztof Wilczyński wrote: > Add ECAM-related constants to provide a set of standard constants > defining memory address shift values to the byte-level address that can > be used to access the PCI Express Configuration Space, and then move > native PCI Express

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-11-30 Thread Krzysztof Wilczyński
Hi Lorenzo! On 20-11-30 11:08:58, Lorenzo Pieralisi wrote: [...] > > Refactor pci_ecam_map_bus() function to use newly added constants so > > that limits to the bus, device function and offset (now limited to 4K as > > per the specification) are in place to prevent the defective or > > malicious

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-11-30 Thread Lorenzo Pieralisi
On Sun, Nov 29, 2020 at 11:07:39PM +, Krzysztof Wilczyński wrote: > Add ECAM-related constants to provide a set of standard constants > defining memory address shift values to the byte-level address that can > be used to access the PCI Express Configuration Space, and then move > native PCI

[PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-11-29 Thread Krzysztof Wilczyński
Add ECAM-related constants to provide a set of standard constants defining memory address shift values to the byte-level address that can be used to access the PCI Express Configuration Space, and then move native PCI Express controller drivers to use the newly introduced definitions retiring