code: plan9front

Download patch

ref: 4cdf05391aa8e0aa300c2fc4c0ad49003b8989d8
parent: d034799ead43775fabef709d9bed05be00e238c8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Mar 27 17:13:11 EDT 2024

devuart: should use rts() control only when hw flow control is enabled (modem flag)

--- a/sys/src/9/port/devuart.c
+++ b/sys/src/9/port/devuart.c
@@ -711,8 +711,9 @@
 			p->ir = p->iw;
 		}
 		if((n = qproduce(p->iq, ir, iw - ir)) < 0){
+			if(p->modem)
+				(*p->phys->rts)(p, 0);
 			p->serr++;
-			(*p->phys->rts)(p, 0);
 		}
 		else if(n == 0)
 			p->berr++;