From owner-freebsd-usb@freebsd.org Mon Jul 29 10:04:57 2019 Return-Path: Delivered-To: freebsd-usb@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 28C2AA4DD4 for ; Mon, 29 Jul 2019 10:04:57 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7668B75E0A for ; Mon, 29 Jul 2019 10:04:56 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D512B260407; Mon, 29 Jul 2019 12:04:53 +0200 (CEST) Subject: Re: Problem attaching USB Garmin device From: Hans Petter Selasky To: Mariappan N , "freebsd-usb@freebsd.org" References: <20701523-c2e3-e184-b695-ecd6dfed639b@selasky.org> <4aaaaadf-cf6b-8dc6-62a8-d4a577d19691@selasky.org> <2f317631-7e92-6fcc-7061-ae098ce99a68@selasky.org> Message-ID: Date: Mon, 29 Jul 2019 12:04:16 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2f317631-7e92-6fcc-7061-ae098ce99a68@selasky.org> Content-Type: multipart/mixed; boundary="------------340193C5FC253F38451655BA" Content-Language: en-US X-Rspamd-Queue-Id: 7668B75E0A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; 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 [-6.36 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; IP_SCORE(-3.19)[ip: (-9.39), ipnet: 88.99.0.0/16(-4.75), asn: 24940(-1.82), country: DE(-0.01)]; FREEMAIL_TO(0.00)[outlook.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; MIME_UNKNOWN(0.10)[text/x-patch] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2019 10:04:57 -0000 This is a multi-part message in MIME format. --------------340193C5FC253F38451655BA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2019-07-29 11:44, Hans Petter Selasky wrote: > On 2019-07-29 10:37, Mariappan N wrote: >> Hi HPS, >> >> Attached the USB analyzer trace for Garmin and other working device >> connected to XHCI. Please download from the following link. >> >> >> https://www.dropbox.com/sh/jkw2zns9l857e4v/AACp7r3dGjR-r9Vfy9KDmzZ6a?dl=0 >> > > Hi, > > Basically the Garmin doesn't respond to status stage of the set address > message, which is a clear USB specification violation. I wonder if doing > a bus-reset right before the set-address, like in the other trace, will > cause the device to recover. Can you make a new trace with the attached > patch? > Also try this patch, reverting the previous one. --HPS --------------340193C5FC253F38451655BA Content-Type: text/x-patch; name="xhci2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xhci2.diff" Index: sys/dev/usb/controller/xhci.c =================================================================== --- sys/dev/usb/controller/xhci.c (revision 349802) +++ sys/dev/usb/controller/xhci.c (working copy) @@ -4261,9 +4261,6 @@ switch (usb_get_device_state(udev)) { case USB_STATE_POWERED: - if (sc->sc_hw.devs[index].state == XHCI_ST_DEFAULT) - break; - /* set default state */ sc->sc_hw.devs[index].state = XHCI_ST_DEFAULT; --------------340193C5FC253F38451655BA--