Say you have 2 cards in your system, both listed in /sys/class/cxl/card*
If for some reason, one card has an unknown fpga_type (taken from psl-device list, like 0x601), or the card failed and is not reckonized anymore, then the script doesn't look for the second card and issues "Card not listed in psl-devices!".
This is correct for first card, but if you try to work on the second one, it doesn't tell you there was another one and doesn't provide access to the flash of interest.
Suggestions :
report which card is not listed
continue explore the following ones if the one we consider has no error.
Say you have 2 cards in your system, both listed in /sys/class/cxl/card* If for some reason, one card has an unknown fpga_type (taken from psl-device list, like 0x601), or the card failed and is not reckonized anymore, then the script doesn't look for the second card and issues "Card not listed in psl-devices!". This is correct for first card, but if you try to work on the second one, it doesn't tell you there was another one and doesn't provide access to the flash of interest. Suggestions :