[PATCH 0/5] staging: mt7621-pci: minor cleanups

Sergio Paracuellos sergio.paracuellos at gmail.com
Fri Feb 15 11:51:43 UTC 2019


Hi Neil,

Looking at this trace I have one concern. Please, see below.

On Fri, Feb 15, 2019 at 10:31 AM NeilBrown <neil at brown.name> wrote:
>
> On Tue, Feb 12 2019, Sergio Paracuellos wrote:
>
> > This patch series make some minor cleanups of this driver in order
> > to prepare it to be promoted from staging. Changes are:
> > * use general pcie reset line in device tree and use reset_control
> > to handle it,
> > * some minor space-tabs issue.
> > * Some minor removes of not needed stuff.
> >
> > After this changes, only properly handling the clocks with a new
> > driver is remaining.
> >
> > All changes are only compile-tested.
> >
> > Hope this helps.
> >
> > Best regards,
> >     Sergio Paracuellos
> >
> > Sergio Paracuellos (5):
> >   staging: mt7621-pci: add reset control for general pcie reset
> >   staging: mt7621-dts: add general pcie reset line to pcie bindings
> >   staging: mt7621-pci: remove not used definitions
> >   staging: mt7621-pci: replace spaces with tabs in comment
> >   staging: mt7621-pci: remove two register writes
> >
> >  drivers/staging/mt7621-dts/mt7621.dtsi  |  4 +--
> >  drivers/staging/mt7621-pci/pci-mt7621.c | 39 ++++++++++++-------------
> >  2 files changed, 21 insertions(+), 22 deletions(-)
> >
>
> I've now tested these after fixing the two issues with the previous
> series and it all appears to work.
>
> Reviewed-by: NeilBrown <neil at brown.name>
>
> There seem to be more PCI related messages than before.
> See below.
>
> The "no space for ..." messages have always been there and don't seem to
> cause problems.  It would be nice to know what is causing them.
>
> Other messages seem more noisy than really necessary.
>
> Any thoughts?
>
> Thanks,
> NeilBrown
>
>
> [   10.320000] mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 0
> [   10.330000] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
> [   10.460000] mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 1
> [   10.470000] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
> [   10.600000] mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 2
> [   10.610000] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz


> [   10.690000] mt7621-pci 1e140000.pcie: de-assert port 0 PERST_N
> [   10.700000] mt7621-pci 1e140000.pcie: de-assert port 1 PERST_N
> [   10.710000] mt7621-pci 1e140000.pcie: de-assert port 2 PERST_N

This three traces should not be here. This is in
'mt7621_pcie_enable_ports'. The following
code is wrong:

list_for_each_entry(port, &pcie->ports, list) {
     if (port->enabled) {
             if (!mt7621_pcie_enable_port(port)) {
                    dev_err(dev, "de-assert port %d PERST_N\n", port->slot);
                    continue;
             }
             dev_info(dev, "PCIE%d enabled\n", slot);
             num_slots_enabled++;
      }
}

The condition for success in mt7621_pcie_enable_port is returning zero
so the check is reversed. Should be:

if (mt7621_pcie_enable_port(port)) {
   ...
}

If this is being done as it is nothing in the next for is being
initialized... but it seems to be working... So nothing of the
stuff in the next for is necessary?

Anyway, I'll send a fix for this if statement.

Best regards,
    Sergio Paracuellos

> [   10.720000] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
> [   10.740000] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
> [   10.750000] pci_bus 0000:00: root bus resource [io  0xffffffff]
> [   10.760000] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
> [   10.780000] pci_bus 0000:00: root bus resource [bus 00-ff]
> [   10.790000] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
> [   10.790000] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
> [   10.790000] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
> [   10.790000] pci 0000:00:00.0: supports D1
> [   10.790000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
> [   10.790000] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
> [   10.790000] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
> [   10.790000] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
> [   10.790000] pci 0000:00:01.0: supports D1
> [   10.790000] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
> [   10.790000] pci 0000:00:02.0: [0e8d:0801] type 01 class 0x060400
> [   10.790000] pci 0000:00:02.0: reg 0x10: [mem 0x00000000-0x7fffffff]
> [   10.790000] pci 0000:00:02.0: reg 0x14: [mem 0x00000000-0x0000ffff]
> [   10.790000] pci 0000:00:02.0: supports D1
> [   10.790000] pci 0000:00:02.0: PME# supported from D0 D1 D3hot
> [   10.790000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
> [   10.810000] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
> [   10.820000] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
> [   10.840000] pci 0000:01:00.0: [1b21:0611] type 00 class 0x010185
> [   10.840000] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x0007]
> [   10.840000] pci 0000:01:00.0: reg 0x14: [io  0x0000-0x0003]
> [   10.840000] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x0007]
> [   10.840000] pci 0000:01:00.0: reg 0x1c: [io  0x0000-0x0003]
> [   10.840000] pci 0000:01:00.0: reg 0x20: [io  0x0000-0x000f]
> [   10.840000] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x000001ff]
> [   10.840000] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
> [   10.870000] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
> [   10.880000] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
> [   10.880000] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
> [   10.880000] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff pref]
> [   10.880000] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
> [   10.880000] pci 0000:02:00.0: [1b21:0611] type 00 class 0x010185
> [   10.880000] pci 0000:02:00.0: reg 0x10: [io  0x0000-0x0007]
> [   10.880000] pci 0000:02:00.0: reg 0x14: [io  0x0000-0x0003]
> [   10.880000] pci 0000:02:00.0: reg 0x18: [io  0x0000-0x0007]
> [   10.880000] pci 0000:02:00.0: reg 0x1c: [io  0x0000-0x0003]
> [   10.880000] pci 0000:02:00.0: reg 0x20: [io  0x0000-0x000f]
> [   10.880000] pci 0000:02:00.0: reg 0x24: [mem 0x00000000-0x000001ff]
> [   10.880000] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
> [   10.910000] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
> [   10.920000] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
> [   10.920000] pci 0000:00:01.0:   bridge window [mem 0x00000000-0x000fffff]
> [   10.920000] pci 0000:00:01.0:   bridge window [mem 0x00000000-0x000fffff pref]
> [   10.920000] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
> [   10.920000] pci 0000:03:00.0: [1b21:0611] type 00 class 0x010185
> [   10.920000] pci 0000:03:00.0: reg 0x10: [io  0x0000-0x0007]
> [   10.920000] pci 0000:03:00.0: reg 0x14: [io  0x0000-0x0003]
> [   10.920000] pci 0000:03:00.0: reg 0x18: [io  0x0000-0x0007]
> [   10.920000] pci 0000:03:00.0: reg 0x1c: [io  0x0000-0x0003]
> [   10.920000] pci 0000:03:00.0: reg 0x20: [io  0x0000-0x000f]
> [   10.920000] pci 0000:03:00.0: reg 0x24: [mem 0x00000000-0x000001ff]
> [   10.920000] pci 0000:03:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:02.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
> [   10.950000] pci 0000:00:02.0: PCI bridge to [bus 03-ff]
> [   10.960000] pci 0000:00:02.0:   bridge window [io  0x0000-0x0fff]
> [   10.960000] pci 0000:00:02.0:   bridge window [mem 0x00000000-0x000fffff]
> [   10.960000] pci 0000:00:02.0:   bridge window [mem 0x00000000-0x000fffff pref]
> [   10.960000] pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03
> [   10.960000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
> [   10.970000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
> [   10.980000] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
> [   11.000000] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
> [   11.010000] pci 0000:00:02.0: BAR 0: no space for [mem size 0x80000000]
> [   11.020000] pci 0000:00:02.0: BAR 0: failed to assign [mem size 0x80000000]
> [   11.040000] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
> [   11.050000] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
> [   11.070000] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
> [   11.080000] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref]
> [   11.090000] pci 0000:00:02.0: BAR 8: assigned [mem 0x60400000-0x604fffff]
> [   11.110000] pci 0000:00:02.0: BAR 9: assigned [mem 0x60500000-0x605fffff pref]
> [   11.120000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
> [   11.130000] pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
> [   11.150000] pci 0000:00:02.0: BAR 1: assigned [mem 0x60620000-0x6062ffff]
> [   11.160000] pci 0000:00:00.0: BAR 7: no space for [io  size 0x1000]
> [   11.170000] pci 0000:00:00.0: BAR 7: failed to assign [io  size 0x1000]
> [   11.190000] pci 0000:00:01.0: BAR 7: no space for [io  size 0x1000]
> [   11.200000] pci 0000:00:01.0: BAR 7: failed to assign [io  size 0x1000]
> [   11.210000] pci 0000:00:02.0: BAR 7: no space for [io  size 0x1000]
> [   11.230000] pci 0000:00:02.0: BAR 7: failed to assign [io  size 0x1000]
> [   11.240000] pci 0000:01:00.0: BAR 5: assigned [mem 0x60000000-0x600001ff]
> [   11.250000] pci 0000:01:00.0: BAR 4: no space for [io  size 0x0010]
> [   11.260000] pci 0000:01:00.0: BAR 4: failed to assign [io  size 0x0010]
> [   11.280000] pci 0000:01:00.0: BAR 0: no space for [io  size 0x0008]
> [   11.290000] pci 0000:01:00.0: BAR 0: failed to assign [io  size 0x0008]
> [   11.300000] pci 0000:01:00.0: BAR 2: no space for [io  size 0x0008]
> [   11.320000] pci 0000:01:00.0: BAR 2: failed to assign [io  size 0x0008]
> [   11.330000] pci 0000:01:00.0: BAR 1: no space for [io  size 0x0004]
> [   11.340000] pci 0000:01:00.0: BAR 1: failed to assign [io  size 0x0004]
> [   11.350000] pci 0000:01:00.0: BAR 3: no space for [io  size 0x0004]
> [   11.370000] pci 0000:01:00.0: BAR 3: failed to assign [io  size 0x0004]
> [   11.380000] pci 0000:00:00.0: PCI bridge to [bus 01]
> [   11.390000] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
> [   11.400000] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
> [   11.420000] pci 0000:02:00.0: BAR 5: assigned [mem 0x60200000-0x602001ff]
> [   11.430000] pci 0000:02:00.0: BAR 4: no space for [io  size 0x0010]
> [   11.440000] pci 0000:02:00.0: BAR 4: failed to assign [io  size 0x0010]
> [   11.460000] pci 0000:02:00.0: BAR 0: no space for [io  size 0x0008]
> [   11.470000] pci 0000:02:00.0: BAR 0: failed to assign [io  size 0x0008]
> [   11.480000] pci 0000:02:00.0: BAR 2: no space for [io  size 0x0008]
> [   11.500000] pci 0000:02:00.0: BAR 2: failed to assign [io  size 0x0008]
> [   11.510000] pci 0000:02:00.0: BAR 1: no space for [io  size 0x0004]
> [   11.520000] pci 0000:02:00.0: BAR 1: failed to assign [io  size 0x0004]
> [   11.530000] pci 0000:02:00.0: BAR 3: no space for [io  size 0x0004]
> [   11.550000] pci 0000:02:00.0: BAR 3: failed to assign [io  size 0x0004]
> [   11.560000] pci 0000:00:01.0: PCI bridge to [bus 02]
> [   11.570000] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
> [   11.580000] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
> [   11.600000] pci 0000:03:00.0: BAR 5: assigned [mem 0x60400000-0x604001ff]
> [   11.610000] pci 0000:03:00.0: BAR 4: no space for [io  size 0x0010]
> [   11.620000] pci 0000:03:00.0: BAR 4: failed to assign [io  size 0x0010]
> [   11.640000] pci 0000:03:00.0: BAR 0: no space for [io  size 0x0008]
> [   11.650000] pci 0000:03:00.0: BAR 0: failed to assign [io  size 0x0008]
> [   11.660000] pci 0000:03:00.0: BAR 2: no space for [io  size 0x0008]
> [   11.680000] pci 0000:03:00.0: BAR 2: failed to assign [io  size 0x0008]
> [   11.690000] pci 0000:03:00.0: BAR 1: no space for [io  size 0x0004]
> [   11.700000] pci 0000:03:00.0: BAR 1: failed to assign [io  size 0x0004]
> [   11.710000] pci 0000:03:00.0: BAR 3: no space for [io  size 0x0004]
> [   11.730000] pci 0000:03:00.0: BAR 3: failed to assign [io  size 0x0004]
> [   11.740000] pci 0000:00:02.0: PCI bridge to [bus 03]
> [   11.750000] pci 0000:00:02.0:   bridge window [mem 0x60400000-0x604fffff]
> [   11.760000] pci 0000:00:02.0:   bridge window [mem 0x60500000-0x605fffff pref]


More information about the devel mailing list