<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/mips/pci, branch linux-5.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-04-21T11:44:05Z</updated>
<entry>
<title>MIPS: pci-legacy: revert "use generic pci_enable_resources"</title>
<updated>2021-04-21T11:44:05Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-20T06:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=987b42074b66cc5ca31e70cec89d3d0d14ad0ff3'/>
<id>urn:sha1:987b42074b66cc5ca31e70cec89d3d0d14ad0ff3</id>
<content type='text'>
This mostly reverts commit 99bca615d895 ("MIPS: pci-legacy: use generic
pci_enable_resources"). Fixes regressions such as:
  ata_piix 0000:00:0a.1: can't enable device: BAR 0 [io  0x01f0-0x01f7] not
	claimed
  ata_piix: probe of 0000:00:0a.1 failed with error -22

The only changes from the strict revert are to fix checkpatch errors:
  ERROR: spaces required around that '=' (ctx:VxV)
  #33: FILE: arch/mips/pci/pci-legacy.c:252:
  +	for (idx=0; idx &lt; PCI_NUM_RESOURCES; idx++) {
 	        ^

  ERROR: do not use assignment in if condition
  #67: FILE: arch/mips/pci/pci-legacy.c:284:
  +	if ((err = pcibios_enable_resources(dev, mask)) &lt; 0)

Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-legacy: use generic pci_enable_resources</title>
<updated>2021-04-16T07:15:41Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99bca615d89510917864fac6b26fd343eff2aba2'/>
<id>urn:sha1:99bca615d89510917864fac6b26fd343eff2aba2</id>
<content type='text'>
Follow the reasoning from commit 842de40d93e0 ("PCI: add generic
pci_enable_resources()"):

  The only functional difference from the MIPS version is that the
  generic one uses "!r-&gt;parent" to check for resource collisions
  instead of "!r-&gt;start &amp;&amp; r-&gt;end".

That should have no effect on any pci-legacy driver.

Suggested-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-legacy: remove busn_resource field</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0af83d2e447af3e5098583cb6320bb1b1fb0976b'/>
<id>urn:sha1:0af83d2e447af3e5098583cb6320bb1b1fb0976b</id>
<content type='text'>
No drivers set the busn_resource field in the pci_controller struct.
Commit 7ee214b540d9 ("MIPS: PCI: Remove unused busn_offset") almost
removed it over 3 years ago. Remove it for good to free up memory and
eliminate messages like:
  pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]

Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-legacy: remove redundant info messages</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=317f553bb677e324c9c865ff7f14597bc5ceeb9c'/>
<id>urn:sha1:317f553bb677e324c9c865ff7f14597bc5ceeb9c</id>
<content type='text'>
Remove the following pci-legacy message:
  PCI host bridge /pci@440000/host-bridge ranges:
   MEM 0x0000000020000000..0x000000002fffffff
    IO 0x0000000000460000..0x000000000046ffff

It is followed shortly by the same data from pci_register_host_bridge:
  PCI host bridge to bus 0000:00
  pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
  pci_bus 0000:00: root bus resource [io  0x460000-0x46ffff]

Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-legacy: stop using of_pci_range_to_resource</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ecb9dc1581eebecaee56decac70e35365260866'/>
<id>urn:sha1:3ecb9dc1581eebecaee56decac70e35365260866</id>
<content type='text'>
Mirror commit aeba3731b150 ("powerpc/pci: Fix IO space breakage after
of_pci_range_to_resource() change").

Most MIPS platforms do not define PCI_IOBASE, nor implement
pci_address_to_pio(). Moreover, IO_SPACE_LIMIT is 0xffff for most MIPS
platforms. of_pci_range_to_resource passes the _start address_ of the IO
range into pci_address_to_pio, which then checks it against
IO_SPACE_LIMIT and fails, because for MIPS platforms that use
pci-legacy (pci-lantiq, pci-rt3883, pci-mt7620), IO ranges start much
higher than 0xffff.

In fact, pci-mt7621 in staging already works around this problem, see
commit 09dd629eeabb ("staging: mt7621-pci: fix io space and properly set
resource limits")

So just stop using of_pci_range_to_resource, which does not work for
MIPS.

Fixes PCI errors like:
  pci_bus 0000:00: root bus resource [io  0xffffffff]

Fixes: 0b0b0893d49b ("of/pci: Fix the conversion of IO ranges into IO resources")
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Cc: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-rt3883: more accurate DT error messages</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f802e17d5343780ae50b337ccd33a92c0aa4243'/>
<id>urn:sha1:2f802e17d5343780ae50b337ccd33a92c0aa4243</id>
<content type='text'>
Existing strings do not make sense: one is always NULL and the other
refers to the wrong parent node.

Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-rt3883: trivial: remove unused variable</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=becb0425bebfaf778f10c458634c11ab8d9e1a13'/>
<id>urn:sha1:becb0425bebfaf778f10c458634c11ab8d9e1a13</id>
<content type='text'>
Fixes the following compiler warning:
  warning: unused variable 'flags' [-Wunused-variable]

Fixes: e5067c718b3a ("MIPS: pci-rt3883: Remove odd locking in PCI config space access code")
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Acked-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Cc: trivial@kernel.org
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-rt2880: remove unneeded locks</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=791a7be27e76edfe8269e9fce2598cc58defa405'/>
<id>urn:sha1:791a7be27e76edfe8269e9fce2598cc58defa405</id>
<content type='text'>
Mirror pci-rt3883 fix from commit e5067c718b3a ("MIPS: pci-rt3883:
Remove odd locking in PCI config space access code"). pci-rt2880 shares
the driver layout with pci-rt3883 and the same reasons apply.

Caller (generic PCI code) already does proper locking, so no need to add
another one here. Local PCI read/write functions are never called
simultaneously, also they do not require synchronization with the PCI
controller ops, since they are used before the controller registration.

Suggested-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Reviewed-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: pci-rt2880: fix slot 0 configuration</title>
<updated>2021-04-16T07:15:40Z</updated>
<author>
<name>Ilya Lipnitskiy</name>
</author>
<published>2021-04-14T03:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e98b697006d749d745d3b174168a877bb96c500'/>
<id>urn:sha1:8e98b697006d749d745d3b174168a877bb96c500</id>
<content type='text'>
pci_fixup_irqs() used to call pcibios_map_irq on every PCI device, which
for RT2880 included bus 0 slot 0. After pci_fixup_irqs() got removed,
only slots/funcs with devices attached would be called. While arguably
the right thing, that left no chance for this driver to ever initialize
slot 0, effectively bricking PCI and USB on RT2880 devices such as the
Belkin F5D8235-4 v1.

Slot 0 configuration needs to happen after PCI bus enumeration, but
before any device at slot 0x11 (func 0 or 1) is talked to. That was
determined empirically by testing on a Belkin F5D8235-4 v1 device. A
minimal BAR 0 config write followed by read, then setting slot 0
PCI_COMMAND to MASTER | IO | MEMORY is all that seems to be required for
proper functionality.

Tested by ensuring that full- and high-speed USB devices get enumerated
on the Belkin F5D8235-4 v1 (with an out of tree DTS file from OpenWrt).

Fixes: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Cc: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Cc: Tobias Wolf &lt;dev-NTEO@vplace.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v4.14+
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: PCI: Fix a typo</title>
<updated>2021-03-24T09:29:45Z</updated>
<author>
<name>Bhaskar Chowdhury</name>
</author>
<published>2021-03-19T05:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8455033cd6a86b070186ea73f75344d9e0bdffd8'/>
<id>urn:sha1:8455033cd6a86b070186ea73f75344d9e0bdffd8</id>
<content type='text'>
s/packt/packet/

Signed-off-by: Bhaskar Chowdhury &lt;unixbhaskar@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
</feed>
