From nobody Tue Sep 27 17:41:29 2022 X-Original-To: freebsd-usb@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 4McRkl2sPCz4YJ0Q for ; Tue, 27 Sep 2022 17:41:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4McRkk4F4Tz3yT6 for ; Tue, 27 Sep 2022 17:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.155] (unknown [178.232.223.95]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D86F3260160; Tue, 27 Sep 2022 19:41:31 +0200 (CEST) Message-ID: <62bff2db-ac3e-934e-a7fe-438ef6969391@selasky.org> Date: Tue, 27 Sep 2022 19:41:29 +0200 List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: USV control with repeated USB disconnects Content-Language: en-US To: Frank Behrens , "freebsd-usb@FreeBSD.org" References: From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4McRkk4F4Tz3yT6 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.23 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.93)[-0.929]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-usb@FreeBSD.org]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[selasky.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 9/27/22 17:45, Frank Behrens wrote: > Hi, > > I could use some debugging help. > I try to connect a CyberPower USV to my FreeBSD server, the uhid, usbhid > and hidbus modules are loaded and the new usb device is detected: > Sep 27 17:10:51 kernel: ugen6.2: at usbus6 > > But after some seconds the device is automatically disconnected and the > detection process starts again: > Sep 27 17:10:59 kernel: ugen6.2: at usbus6 > (disconnected) > Sep 27 17:11:03 kernel: ugen6.2: at usbus6 > Sep 27 17:11:11 kernel: ugen6.2: at usbus6 > (disconnected) > > A change of cable and usb port did not help. I switched usb debugging > on, but could not find any hint, that could guide me. I collected a lot > of debugging information, an usb dump file > and system information in > http://www2.behrens.de/usbusv_debug/usbusv_20220927.tbz > > Does one of the specialists see what the problem is? Is there any > additional information I should provide? > Hi, If you compile a kernel with "options USB_DEBUG" then enable: sysctl hw.usb.uhub.debug=15 This will show if the device initiates the disconnect or not. Dumping the USB device and configuration descriptors may also be useful. FreeBSD has some logic to reject USB autoinstall CD's. I'm not sure if this is the cause. Please also read this thread: "Flickering connection to UPS (again, but now I'm sure it is Ok under Windows)" on this list. --HPS