From nobody Mon Dec 6 06:34:29 2021 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 948A818B72B4 for ; Mon, 6 Dec 2021 06:35:18 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (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 ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J6tw44l02z3pfy for ; Mon, 6 Dec 2021 06:35:16 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.16.1/8.16.1) with ESMTPS id 1B66Yl6S066664 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 6 Dec 2021 17:05:00 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1638772504; bh=KYTLtaFZ8mv9CUbkA4ZK881fzIa8zSqO/bFyABkyEdg=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Uj/Z5FeUvKfIxHy8XTAaNnNtqiOazrvpB3J41+SHBfX3bRHbrvSgdUebw1nAJ1+vY YnIZaer4OJJTCKm0y4Hpm83SYLjDKOF+pBN/AE61puR/1vxlhY4oMCvwoPrb5kHPGI uJ8m4ViDVdc0P6xLBKI15DxVxGDrsOIlVvVn2INs= Received: (from mailnull@localhost) by midget.dons.net.au (8.16.1/8.16.1/Submit) id 1B66YUAW066623 for ; Mon, 6 Dec 2021 17:04:30 +1030 (ACDT) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-f0f0b4ff001831caa5b8ac39868c4c7e9b4d12fc: 2001:44b8:1d2:8900:f03d:d961:1645:418 Received: from smtpclient.apple ([IPv6:2001:44b8:1d2:8900:f03d:d961:1645:418] [2001:44b8:1d2:8900:f03d:d961:1645:418]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 1B66YTfO066618; Mon, 06 Dec 2021 17:04:30 +1030 Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Poor USB performance on ASUS 520 motherboard (no IRQ?) In-Reply-To: <3ec03f87-ec26-cb0a-58bb-76fd32c49060@selasky.org> Date: Mon, 6 Dec 2021 17:04:29 +1030 Cc: freebsd-usb@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <499BEF34-F85D-4A0B-A4C1-30B7BCF40556@dons.net.au> References: <3ec03f87-ec26-cb0a-58bb-76fd32c49060@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 4J6tw44l02z3pfy X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b="Uj/Z5FeU"; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-3.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.962]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:4764, ipnet:2403:5800:5000::/36, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] Reply-To: darius@dons.net.au From: Daniel O'Connor via freebsd-usb X-Original-From: Daniel O'Connor X-ThisMailContainsUnwantedMimeParts: N Hi, Thanks, I discovered that if I connect the device to xhci0 it exhibits = poor performance (and only shows 1000 IRQ/sec), however if I connect it = to xhci1 it works fine (8kHz). They show up slightly differently in dmesg: xhci0: mem 0xfcfa0000-0xfcfa7fff at = device 0.0 on pci1 xhci0: 32 bytes context size, 64-bit DMA usbus0 on xhci0 usbus0: 5.0Gbps Super Speed USB v3.0 xhci1: mem 0xfcb00000-0xfcbfffff at = device 0.3 on pci7 xhci1: 64 bytes context size, 64-bit DMA usbus1 on xhci1 usbus1: 5.0Gbps Super Speed USB v3.0 However I don't know what the "context size" means, they are different = PCI IDs too: xhci0@pci0:1:0:0: class=3D0x0c0330 rev=3D0x00 hdr=3D0x00 = vendor=3D0x1022 device=3D0x43ec subvendor=3D0x1b21 subdevice=3D0x1142 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D serial bus subclass =3D USB bar [10] =3D type Memory, range 64, base 0xfcfa0000, size 32768, = enabled PCI-e errors =3D Correctable Error Detected Unsupported Request Detected Corrected =3D Advisory Non-Fatal Error xhci1@pci0:7:0:3: class=3D0x0c0330 rev=3D0x00 hdr=3D0x00 = vendor=3D0x1022 device=3D0x15e0 subvendor=3D0x1043 subdevice=3D0x876b vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'Raven USB 3.1' class =3D serial bus subclass =3D USB bar [10] =3D type Memory, range 64, base 0xfcb00000, size 1048576, = enabled I tried changing the imod value from 500 to 125 but it had no impact on = the IRQ rate so I guess perhaps that controller is broken in some way.. > On 4 Dec 2021, at 16:32, Hans Petter Selasky wrote: >=20 > On 12/4/21 03:12, Daniel O'Connor via freebsd-usb wrote: >> How can I change it? >=20 > Please refer to this: >=20 > /* set up interrupt rate */ > XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); >=20 > --HPS -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum