Methods to reset PCIe devices on i.MX8 under Linux system

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Methods to reset PCIe devices on i.MX8 under Linux system

93 Views
pengluo
Contributor III

Our i.MX8QM uses PCIe A and PCIe B to connect two PCIe network cards. Among them, the network card on PCIe A works normally, while the PCIe network card on PCIe B may occasionally encounter link training failure during driver initialization. However, it can complete initialization successfully after each device restart. Since the probability of link training failure is low, we intend to reset PCIe B when such a failure occurs. After the reset is completed, we will reload the driver to trigger device initialization and link training. Please let us know the specific implementation method. Thank you!

Labels (1)
0 Kudos
Reply
1 Reply

69 Views
joanxie
NXP TechSupport
NXP TechSupport

try the command "echo 1 > /sys/bus/pci/rescan" i

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2205963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMethods%20to%20reset%20PCIe%20devices%20on%20i.MX8%20under%20Linux%20system%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2205963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOur%20i.MX8QM%20uses%20PCIe%20A%20and%20PCIe%20B%20to%20connect%20two%20PCIe%20network%20cards.%20Among%20them%2C%20the%20network%20card%20on%20PCIe%20A%20works%20normally%2C%20while%20the%20PCIe%20network%20card%20on%20PCIe%20B%20may%20occasionally%20encounter%20link%20training%20failure%20during%20driver%20initialization.%20However%2C%20it%20can%20complete%20initialization%20successfully%20after%20each%20device%20restart.%20Since%20the%20probability%20of%20link%20training%20failure%20is%20low%2C%20we%20intend%20to%20reset%20PCIe%20B%20when%20such%20a%20failure%20occurs.%20After%20the%20reset%20is%20completed%2C%20we%20will%20reload%20the%20driver%20to%20trigger%20device%20initialization%20and%20link%20training.%20Please%20let%20us%20know%20the%20specific%20implementation%20method.%20Thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2205963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2206040%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Methods%20to%20reset%20PCIe%20devices%20on%20i.MX8%20under%20Linux%20system%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2206040%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Etry%20the%20command%20%22echo%201%20%26gt%3B%20%2Fsys%2Fbus%2Fpci%2Frescan%22%20i%3C%2FP%3E%3C%2FLINGO-BODY%3E