<div dir="ltr"><div><br></div><div>>If I understand this properly if we set a bit in the modem control<br>>register we will test mostly the circuits between CPU and UART<br>>controller which is better than nothing, but we are not really testing<br>>if the port speed was set correctly since the data are just being copied<br>>between registers in the UART controller, so it does not make sense to<br>>change the speed in this mode. Or am I mistaken?<br><br>>Also it does not seem to work for me and I've tried with both serial<br>>ports on my desktop PC as well as with USB-to-Serial dongle. I can set<br>>the bit just fine but loopback does not work. </div><div> <br></div><div>In the loopback mode , the data will be transferred in buffer ,and back to CPU </div><div>by FIFO way. </div><div>I understand the test flow is CPU->uart Tx-> buffer file->uart Rx->CPU,</div><div>so it does make sense to the uart driver .</div><div> BTW, I found the latest seriacheck git is <a href="https://github.com/nsekhar/serialcheck.git">https://github.com/nsekhar/serialcheck.git</a></div><div>and I test on my arm64 machine of sprdtream. and it does works.</div><div>the test log I had send in another patch</div><div><a href="https://patchwork.ozlabs.org/patch/1264553/">https://patchwork.ozlabs.org/patch/1264553/</a> </div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> 于2020年4月1日周三 上午2:08写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
> > Thank you porting the serialcheck.c into LTP<br>
> > I am sorry to find the serialcheck have not LOOPBACK mode support<br>
> > the LOOPBACK mode is a better test than HW flow , because most machine's<br>
> > uart have not connect the Rx & TX<br>
> > in LOOPBACK mode. we test the uart port directly, So we can test one uart<br>
> > port Rx and Tx functions at the same time .<br>
> > here is the diff serialcheck with loopback patch<br>
> > So I'd prefer use loopback mode test the uart in case.<br>
> > $ diff serialcheck.c serialcheck-with-loopback.c<br>
> <br>
> Thanks for the hint, I had no idea that subset serial port hardware has<br>
> a loopback test that could be enabled in modem control register which is<br>
> meant for testing. I will have a closer look tomorrow.<br>
<br>
If I understand this properly if we set a bit in the modem control<br>
register we will test mostly the circuits between CPU and UART<br>
controller which is better than nothing, but we are not really testing<br>
if the port speed was set correctly since the data are just being copied<br>
between registers in the UART controller, so it does not make sense to<br>
change the speed in this mode. Or am I mistaken?<br>
<br>
Also it does not seem to work for me and I've tried with both serial<br>
ports on my desktop PC as well as with USB-to-Serial dongle. I can set<br>
the bit just fine but loopback does not work.<br>
<br>
-- <br>
Cyril Hrubis<br>
<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a><br>
</blockquote></div>