On 7/8/25 2:07 PM, Tyrel Datwyler wrote:
> From: Seeteena Thoufeek <
s1se...@linux.ibm.com>
>
> Could not retrieve logical device name for pci device type from OF path.
>
> without patch :
>
> ofpathname -l /pci@800000020000048/pci15b3,1003@0
>
> ofpathname: Could not retrieve logical device name for
> Open Firmware path "/pci@800000020000021/pci15b3,1003@0".
>
> with patch :
>
> ofpathname -l /pci@800000020000048/pci15b3,1003@0
>
> enP72p1s0
>
> ofpathname enP72p1s0
>
> /pci@800000020000048/pci15b3,1003@0
>
> Signed-off-by: Seeteena Thoufeek <
s1se...@linux.vnet.ibm.com>
> ---
> scripts/ofpathname | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
After taking a look at the machine and adapter in question its clear to me now
that this patch is only functional as a bandaid, and even then there are other
issues it misses which I'll address below.
The problem as a whole is that, as I mentioned in a previous reply, ofpathname
fails to translate the logical ethernet device to a valid OF path when storing
it in bootlist. Further, I'm not even sure how SMS/OpenFirmware would even treat
the abridged OF path in the bootlist. Might be worth testing if
/pci@800000020000048/pci15b3,1003@0 would event boot.
In a different thread of the discussion it was identified that OpenFirmware
treats the OF device path we are trying to work with as:
/pci@800000020000048/pci15b3,1003@0/ethernet@0
This makes sense especially since the pci device in question has 2 ethernet
ports each with a distinct mac address. As such the second port of this network
device would be identified as:
/pci@800000020000048/pci15b3,1003@0/ethernet@1
Looking at the machine in question we can see two different ethernet interfaces
with different addresses:
[root@ltczep6-lp7 ~]# ifconfig | grep "enP72" -A1
enP72p1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether f4:52:14:27:71:c0 txqueuelen 1000 (Ethernet)
--
enP72p1s0d1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether f4:52:14:27:71:c1 txqueuelen 1000 (Ethernet)
Further, we can see how the mac addresses of each correspond to the OF path in
our device tree for each port on this pci device.
[root@ltczep6-lp7 ~]# lsprop
/proc/device-tree/pci@800000020000048/pci15b3\,1003@0/ethernet@*/mac-address
/proc/device-tree/pci@800000020000048/pci15b3,1003@0/ethernet@0/mac-address
f4 52 14 27 71 c0
/proc/device-tree/pci@800000020000048/pci15b3,1003@0/ethernet@1/mac-address
f4 52 14 27 71 c1
So, now we can see the overall problem of properly identifying the correct
device since using ofpathname to map either logical network device only gets us
the pci device and not the actual ethernet port in question on that pci device.
As an example both enP72* devices map to the pci device, but in reverse with
just the pci device we will only ever map to the first logical ethernet device.
[root@ltczep6-lp7 ~]# ofpathname -r enP72p1s0
/pci@800000020000048/pci15b3,1003@0
[root@ltczep6-lp7 ~]# ofpathname -r enP72p1s0d1
/pci@800000020000048/pci15b3,1003@0
[root@ltczep6-lp7 ~]# ofpathname -l /pci@800000020000048/pci15b3,1003@0
enP72p1s0
I think we need to go back and fix ofpathname to correctly map in both
directions to/from a valid OF path name.
-Tyrel