From owner-freebsd-current@freebsd.org Tue Aug 25 18:29:16 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 152E93B5D74; Tue, 25 Aug 2020 18:29:16 +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 4Bbcvv00Qkz3br0; Tue, 25 Aug 2020 18:29:14 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07PITHl3014175 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 25 Aug 2020 11:29:17 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07PITGqe014174; Tue, 25 Aug 2020 11:29:16 -0700 (PDT) (envelope-from fbsd) Date: Tue, 25 Aug 2020 11:29:16 -0700 From: bob prohaska To: Hans Petter Selasky , bob prohaska Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Message-ID: <20200825182916.GA14015@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> <20200825050304.GA11333@www.zefox.net> <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> X-Rspamd-Queue-Id: 4Bbcvv00Qkz3br0 X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.49 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.71)[0.713]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.88)[0.875]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 18:29:16 -0000 On Tue, Aug 25, 2020 at 09:41:41AM +0200, Hans Petter Selasky wrote: > > Can you try r364346 ? > The kernel compiled and installed without trouble. After running run bootcmd_usb0 the machine loaded the kernel, but stopped at the loader prompt. The keyboard was connected direct to the Pi, the mouse was disconnected. It isn't obvious why it stopped at the loader prompt. lsdev reports disk devices: disk0: 250085377 X 512 blocks (removable) disk0s1: DOS/Windows disk0s2: FreeBSD disk0s2a: FreeBSD UFS disk0s2b: FreeBSD swap disk1: 1953525169 X 512 blocks disk1s1: DOS/Windows disk1s2: FreeBSD disk1s2a: FreeBSD UFS disk1s2b: FreeBSD swap http: (unknown) net devices: net0: OK Disk0 is the (bootable) microSD, disk1 is the hard drive. Boot -s came up single-user, with / mounted from /dev/da0s2a as desired. Fsck reported the filesystem clean. Exit to multi-user worked. The USB system keyboard (plugged into the Pi) worked. The mouse (plugged into the hub after boot) also worked. A second reboot with the mouse connected via the hub worked without pausing at the loader prompt. Plugging the FTDI FT232 adapter into the hub triggered a round of uhub_reattach_port: giving up port reset - device vanished messages, but this time they stopped when I pulled the FT232. Plugging the FT232 directly into the Pi caused normal recognition. It looks as if the FT232 somehow interferes with disk discovery. A reboot with USB disk & mouse in the hub but keyboard and FT232 in the Pi again resulted in a mountroot failure, along with a few other error messages: uhub2: MTT enabled Root mount waiting for: usbus1 CAM uhub2: 4 ports with 4 removable, self powered Root mount waiting for: usbus1 CAM usb_alloc_device: set address 7 failed (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus1 CAM Root mount waiting for: usbus1 CAM usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus1 CAM Root mount waiting for: usbus1 CAM usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR Root mount waiting for: usbus1 CAM usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR Root mount waiting for: usbus1 CAM usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR ugen1.7: at usbus1 (disconnected) uhub_reattach_port: could not allocate new device Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Mounting from ufs:/dev/da0s2a failed with error 2; retrying for 3 more seconds Mounting from ufs:/dev/da0s2a failed with error 2. Loader variables: vfs.root.mountfrom=ufs:/dev/da0s2a vfs.root.mountfrom.options=rw With the FT232 unplugged the machine came up normally. With a _different_ FT232 plugged in it also came up normally. Both are thought to be genuine, but they are of different age and produce different recognition messages: The FT232 that causes trouble reports ugen1.4: at usbus1 uftdi0 on uhub1 uftdi0: on usbus1 The one that seems to work is newer and reports ugen1.4: at usbus1 uftdi0 on uhub1 uftdi0: on usbus1 On balance I think the new kernel is better-behaved. Beyond that I'm at a loss. If you can suggest other things to try please do. Thanks for all your help, bob prohaska