From nobody Thu Oct 26 14:42:23 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGT6H0CB0z4xtvK for ; Thu, 26 Oct 2023 14:42:31 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SGT6G04rhz4Hvh for ; Thu, 26 Oct 2023 14:42:29 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net; dmarc=none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 39QEgOqH075076 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Thu, 26 Oct 2023 07:42:24 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 39QEgO4q075075 for freebsd-arm@freebsd.org; Thu, 26 Oct 2023 07:42:24 -0700 (PDT) (envelope-from fbsd) Date: Thu, 26 Oct 2023 07:42:23 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Re: Stable/14 dropping ssh connections to FT232 usb-serial adapter Message-ID: References: List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-1.08 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.984]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[zefox.net]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4SGT6G04rhz4Hvh X-Spamd-Bar: - On Fri, Sep 29, 2023 at 11:12:00AM -0700, bob prohaska wrote: > A stable/14 install on a Pi2 v1.1 (armv7) host seems to > work quite well, apart from dropping ssh connections when > used to run a cu or tip session to an FT232 usb-serial > adapter. Ssh connections to interactive shells seem to > remain up indefinitely, but drop within a couple of hours > (between the same hosts) when used to run cu or tip. Now that ucom supports debugging at the USB end of the connection a little more information is offered. At the armv7 USB end of the link the console reports: login: ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_close: tp=0xd6c38800 ucom_shutdown: ucom_dtr: onoff = 0 ucom_line_state: on=0x00, off=0x01 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_cfg_close: while at the serial end I see: FreeBSD/arm64 (pelorus.zefox.org) (ttyu0) login: client_loop: send disconnect: Broken pipe On reconnecting the ssh/ucom link it looks as if the USB end emits: Oct 26 07:26:03 generic su[55592]: bob to root on /dev/pts/0 ucom_open: tp = 0xd6c38800 ucom_cfg_open: ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_ring: onoff = 0 ucom_line_state: on=0x00, off=0x08 ucom_break: onoff = 0 ucom_line_state: on=0x00, off=0x04 ucom_status_change: ucom_param: sc = 0xd6c7a058 ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_outwakeup: sc = 0xd6c7a058 ucom_status_change: ucom_status_change: ucom_outwakeup: sc = 0xd6c7a058 ucom_get_data: cnt=404 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_ioctl: cmd = 0x2000740d ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_param: sc = 0xd6c7a058 ucom_ioctl: cmd = 0x8004667e ucom_ioctl: cmd = 0x8004667d ucom_inwakeup: tp=0xd6c38800 ucom_get_data: cnt=0 ucom_inwakeup: tp=0xd6c38800 ucom_outwakeup: sc = 0xd6c7a058 ucom_get_data: cnt=1 ucom_get_data: cnt=0 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 ucom_inwakeup: tp=0xd6c38800 USB debugging has been enabled now on four Raspberry Pi 2/3/4 hosts. On a Pi3 or -4 running -current the ucom_inwakeup lines seem to come in pairs, not sevens. Please let me know if there any useful experiments to be tried. Thanks for reading, bob prohaska