Tyrel Datwyler 4f9f2d3d7a PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info
The newer ibm,drc-info property is a condensed description of the old
ibm,drc-* properties (ie. names, types, indexes, and power-domains).
When matching a drc-index to a drc-name we need to verify that the
index is within the start and last drc-index range and map it to a
drc-name using the drc-name-prefix and logical index.

Fix the mapping by checking that the index is within the range of the
current drc-info entry, and build the name from the drc-name-prefix
concatenated with the starting drc-name-suffix value and the sequential
index obtained by subtracting ibm,my-drc-index from this entries
drc-start-index.

Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1573449697-5448-10-git-send-email-tyreld@linux.ibm.com
2019-11-13 16:57:58 +11:00
..
2019-09-22 09:39:09 -07:00
2019-09-24 15:54:11 -07:00
2019-10-04 09:56:51 -07:00
2019-09-30 10:04:28 -07:00
2019-10-03 09:15:19 -07:00
2019-09-22 09:30:30 -07:00
2019-09-22 09:39:09 -07:00
2019-09-19 14:14:28 -07:00
2019-09-30 10:04:28 -07:00
2019-09-18 11:14:31 -07:00
2019-09-27 12:19:47 -07:00
2019-10-04 16:31:06 +10:00
2019-09-22 12:02:21 -07:00
2019-09-29 11:20:41 -07:00
2019-09-28 20:44:12 +02:00
2019-09-19 14:14:28 -07:00
2019-09-19 14:14:28 -07:00
2019-09-29 10:00:14 -07:00
2019-09-22 09:30:30 -07:00
2019-09-24 16:31:50 -07:00
2019-09-22 09:30:30 -07:00
2019-09-23 17:20:40 -04:00
2019-09-29 10:33:41 -07:00
2019-09-19 13:27:23 -07:00
2019-09-23 19:16:01 -07:00
2019-09-24 12:39:40 -07:00
2019-09-27 12:19:47 -07:00
2019-09-17 18:40:42 -07:00
2019-09-22 10:55:08 -07:00
2019-09-30 10:04:28 -07:00
2019-09-22 11:05:43 -07:00
2019-10-05 08:44:02 -07:00
2019-10-05 12:53:27 -07:00
2019-09-16 15:52:38 -07:00
2019-09-22 10:52:23 -07:00
2019-09-17 18:40:42 -07:00
2019-09-24 15:54:08 -07:00
2019-09-18 11:14:31 -07:00
2019-09-27 11:17:38 -07:00
2019-10-04 11:13:09 -07:00
2019-09-18 11:05:34 -07:00