All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function
@ 2019-05-21  6:44 Greg Ungerer
  2019-05-21  8:14 ` Sergio Paracuellos
  0 siblings, 1 reply; 35+ messages in thread
From: Greg Ungerer @ 2019-05-21  6:44 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: NeilBrown, driverdev-devel


Hi Sergio,

I am working on a couple of different MedaiTek MT7621 based platforms
and am having problems with the PCI bus on those.

Big picture is that the PCI bus on my boards worked in linux-4.20
(with the obvious compilation breakage fixed), and it does not work
in linux-5.0 or linux-5.1.

On linux-4.20 the PCI bus probe at kernel boot looks like this:

***** Xtal 40MHz *****
PCIE1 no card, disable it(RST&CLK)
PCIE2 no card, disable it(RST&CLK)
PCIE0 enabled
PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0xffffffff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x601fffff]
pci 0000:00:00.0: BAR 9: assigned [mem 0x60200000-0x602fffff pref]
pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff]
pci 0000:00:00.0: BAR 7: no space for [io  size 0x1000]
pci 0000:00:00.0: BAR 7: failed to assign [io  size 0x1000]
pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x601fffff 64bit]
pci 0000:01:00.0: BAR 6: assigned [mem 0x60200000-0x6020ffff pref]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0:   bridge window [mem 0x60000000-0x601fffff]
pci 0000:00:00.0:   bridge window [mem 0x60200000-0x602fffff pref]

The PCI bus works, and devices on it are found and work as expected.

On linux-5.1 the PCI initialization and probe fails, with the kernel
locking up:

...
mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 0
mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
mt7621-pci 1e140000.pcie: Initiating port 0 failed
mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 1
mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
mt7621-pci 1e140000.pcie: Initiating port 1 failed
mt7621-pci 1e140000.pcie: Port 454043648 N_FTS = 2
mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)

The lockup is in mt7621_pci_phy_power_off(), at the phy_read() call.
If I modify that code and return immediately in that mt7621_pci_phy_power_off()
the systemboots - but obviously from the above you can see that the PCI bus
and no devices were detected.

Copying in the working linux-4.20 pci-mt7621.c into place on
linux-5.1 results in a working PCI bus also. I have 2 very different
MT7621 based boards, and they both exhibit this same problem.

I tried bisecting that back to find the problem commit.
It was not at all easy with quite a few of the mt7621 PCI related
patches not building in isolation while bisecting. But ultimately
I got to commit 745eeeac68d7 ("staging: mt7621-pci: factor out
'mt7621_pcie_enable_port' function").

Any idea what might be going wrong here?

Regards
Greg


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2019-06-19  5:28 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21  6:44 staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function Greg Ungerer
2019-05-21  8:14 ` Sergio Paracuellos
2019-05-22  0:20   ` Greg Ungerer
2019-05-22  6:27     ` Sergio Paracuellos
2019-05-23  2:11       ` Greg Ungerer
2019-05-23  5:26         ` Sergio Paracuellos
2019-05-24  0:35           ` Greg Ungerer
2019-05-24  5:35             ` Sergio Paracuellos
2019-05-27  4:36               ` Greg Ungerer
2019-05-27  6:35                 ` Sergio Paracuellos
2019-05-27  7:29                   ` Greg Ungerer
2019-05-27  8:02                     ` Sergio Paracuellos
2019-05-29  7:11                       ` Greg Ungerer
2019-05-29  8:08                         ` Sergio Paracuellos
2019-05-30  0:44                           ` Greg Ungerer
2019-05-30  1:46                             ` Greg Ungerer
2019-05-31 12:37                               ` Sergio Paracuellos
2019-05-31 12:47                                 ` Greg Ungerer
2019-06-03  1:25                                 ` Greg Ungerer
2019-06-03  5:34                                   ` Sergio Paracuellos
2019-06-03 12:31                                     ` Greg Ungerer
2019-06-03 19:59                                       ` Sergio Paracuellos
2019-06-04  1:31                                         ` Greg Ungerer
2019-06-04  5:06                                           ` Sergio Paracuellos
2019-06-04  7:14                                             ` Greg Ungerer
2019-06-04  9:36                                               ` Sergio Paracuellos
2019-06-05  4:01                                                 ` Greg Ungerer
2019-06-05  5:47                                                   ` Sergio Paracuellos
2019-06-05 12:28                                                     ` Sergio Paracuellos
2019-06-06  3:06                                                       ` Greg Ungerer
2019-06-06  5:07                                                         ` Sergio Paracuellos
2019-06-06  6:47                                                           ` Greg Ungerer
     [not found]                                                           ` <CAGSetNsFiGZ_xCJFzYDhmZhPZPu90nTH7EDUHOQt1g-ZzxLw5A@mail.gmail.com>
2019-06-17  3:57                                                             ` Greg Ungerer
2019-06-19  5:28                                                               ` Sergio Paracuellos
     [not found]                           ` <CAGSetNvkNQpqo+F7BRbbh4tdr7FpAU28iyydV5eBCXztNPoFyQ@mail.gmail.com>
2019-05-30  0:47                             ` Greg Ungerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.