From owner-freebsd-arm@freebsd.org Wed Jun 3 17:51:54 2020 Return-Path: Delivered-To: freebsd-arm@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 DC12133CCCD for ; Wed, 3 Jun 2020 17:51:54 +0000 (UTC) (envelope-from luke@lukeross.name) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49cc154zszz4079 for ; Wed, 3 Jun 2020 17:51:53 +0000 (UTC) (envelope-from luke@lukeross.name) X-Originating-IP: 84.45.129.34 Received: from clara.lan (unknown [84.45.129.34]) (Authenticated sender: luke@lukeross.name) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 515CB6000C for ; Wed, 3 Jun 2020 17:51:51 +0000 (UTC) Message-ID: <75a918d07625de979e9995b3f01662c9deb0a9c1.camel@lukeross.name> Subject: Problems with cdce/cdceem as a USB-device on R-Pi From: Luke Ross To: freebsd-arm@freebsd.org Date: Wed, 03 Jun 2020 18:51:49 +0100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49cc154zszz4079 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of luke@lukeross.name designates 217.70.183.195 as permitted sender) smtp.mailfrom=luke@lukeross.name X-Spamd-Result: default: False [-1.40 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.23)[0.229]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[217.70.183.195:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.71)[-0.707]; DMARC_NA(0.00)[lukeross.name]; R_SPF_ALLOW(-0.20)[+ip4:217.70.183.192/28]; NEURAL_HAM_MEDIUM(-0.53)[-0.526]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[217.70.183.195:from] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 17:51:54 -0000 Hi, I have a plan to run FreeBSD on a Raspberry Pi Zero configured as a USB network device, attached to a USB host. I've booted the 12.1 image, and in theory it looks like it ought to be as simple as: /boot/loader.conf: hw.usb.template=8 If I do this, the Pi does indeed have an interface ue0, and the host recognises a new CDC-ether device. Configuring both ends with IPs is successful, but no packets can be passed between the two ends. The USB serial console works fine, so there is some USB connectivity, just not the cdce network. The same applies with hw.usb.template=1 (cdce with no serial). I then reconfigured with hw.usb.template=11 for cdceem connectivity. This is more successful - using the same IP configuration, packets pass between host and pi-device in the main without problem. Every 15 seconds or so, the link freezes for a few seconds and the pi logs: cdceem0: WARNING: cdceem_bulk_read_callback: USB_ST_ERROR: USB_ERR_STALLED Unfortunately this stall is frequent enough to make cdceem mode not useful for my use-case. Has anyone else got cdce device-mode working on a Pi, or knows hows to prevent the cdceem stall? I did experiment with using a 13-CURRENT image (same behaviour) and with FreeBSD or Linux hosts (same behaviour). I double-checked for any inadvertent firewalling on the host. The same sort of set-up works fine under Raspbian, so I don't believe it's a hardware fault. Any suggestions/pointers very much appreciated! Many thanks, Luke