From owner-freebsd-usb@freebsd.org Sun Dec 22 21:00:05 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 BD9501DCDD7 for ; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47gvxx4Ymyz3MJD for ; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 98A981DCDD3; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) Delivered-To: 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 987601DCDD2 for ; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47gvxx2Y5xz3MJ4 for ; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3707454BE for ; Sun, 22 Dec 2019 21:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xBML05ec062100 for ; Sun, 22 Dec 2019 21:00:05 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xBML05xI062097 for usb@FreeBSD.org; Sun, 22 Dec 2019 21:00:05 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201912222100.xBML05xI062097@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: usb@FreeBSD.org Subject: Problem reports for usb@FreeBSD.org that need special attention Date: Sun, 22 Dec 2019 21:00:05 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sun, 22 Dec 2019 21:00:05 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 213877 | xhci reset causes panic on SuperMicro A1SRi-2758F 1 problems total for which you should take action. From owner-freebsd-usb@freebsd.org Mon Dec 23 05:44:35 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 9C4F71E6568 for ; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47h7b73cTvz4Ghq for ; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 7A2C41E6567; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) Delivered-To: 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 79EF11E6566 for ; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47h7b72hV8z4Ghp for ; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57BBBB42F for ; Mon, 23 Dec 2019 05:44:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xBN5iZgs038529 for ; Mon, 23 Dec 2019 05:44:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xBN5iZQt038527 for usb@FreeBSD.org; Mon, 23 Dec 2019 05:44:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 237666] repeated messages of "uhub_reattach_port: giving up port reset - device vanished" Date: Mon, 23 Dec 2019 05:44:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: needs-qa, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: felix.the.red@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 23 Dec 2019 05:44:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237666 Felix Guest changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |felix.the.red@gmail.com --- Comment #95 from Felix Guest --- Created attachment 210170 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D210170&action= =3Dedit Dmesg with hw.usb.xhci.debug=3D1 Verbose boot for similar error with Mediasonic Probox (external USB3 hard d= rive enclosure). --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Thu Dec 26 00:46:25 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 068051E91B9 for ; Thu, 26 Dec 2019 00:46:25 +0000 (UTC) (envelope-from farhan@farhan.codes) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 47jrqh0vBGz4Q2s for ; Thu, 26 Dec 2019 00:46:23 +0000 (UTC) (envelope-from farhan@farhan.codes) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A750D5E5 for ; Wed, 25 Dec 2019 19:46:22 -0500 (EST) Received: from imap35 ([10.202.2.85]) by compute5.internal (MEProxy); Wed, 25 Dec 2019 19:46:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=farhan.codes; h= mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=v/mqE0V59A0tpjUYUk4uP470dy1nGTxpv4WkI+T8nbM=; b=eH1Rq2Gs pWT6uWkFcBRe4r1l1WpF8DdKfl6gnRgPWfcniBmBvTZT+6bbaDY8LL9j+PwHTqyk vW170xueQLNNXIoXvJ5/TGrrFCcPexL4MRCL7uCdZQTPczvWaexJqI8EJ+ElHcbd jL5qMex6tAwXal6m5OEMmVRZ9odbsWS13msSNymtkYsVcWBRir0zAwhFMEtli/gs DT1X0HF8gIE/qL4Fz6JYioOa0LIvHMNyGMS9Lfy2pMBvC7cSmWfXBwzqL0BVlw2U BpmeNKkfonFYbqtRb4+mFvQxIm8qT6iP38ca/nSCFlt8Bzb2/dfZVXNJvDE8ZbpN WUTSQP4m0RnxWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=v/mqE0V59A0tpjUYUk4uP470dy1nG Txpv4WkI+T8nbM=; b=PZYhqAsmrBvBYvBQNL9ndWFQs0GKL20ST23MBHg3LDP9Y jdfs6b/u1noQstvQ566kL+pNRYBLnO79ts0rv/pvsywLx7gHRgbDPr3biHaMC/Te OTAcrrbRpDzlqu3HE+B5QTjSvgKNFhcTGGsZMGRowYvu+LRlspZnRiZk7R8x7Gu9 h+1RTj2D1iI9bBHGcc6ZPWyf7EBAAo5+2a9e8zrysGIBf52lqOK0tyjKV4dID5Bf XnUASuXER5U56Yf05/UX0+MvWhwjrtzbuhjE3CFGNviEDs3fAVfFH2Eoy00/cWkm RmKcI9M5soixYxQbAKPjdpjlwoAYDDWNYWhmyZL1A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddvhedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erredtnecuhfhrohhmpedfhfgrrhhhrghnucfmhhgrnhdfuceofhgrrhhhrghnsehfrghr hhgrnhdrtghouggvsheqnecuffhomhgrihhnpehkohdrughopdhgnhhurdhorhhgnecurf grrhgrmhepmhgrihhlfhhrohhmpehfrghrhhgrnhesfhgrrhhhrghnrdgtohguvghsnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id DFE1414C0068; Wed, 25 Dec 2019 19:46:21 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-694-gd5bab98-fmstable-20191218v1 Mime-Version: 1.0 Message-Id: <7b2a53c8-8640-4b0c-8d6e-22a1988a3ebd@www.fastmail.com> Date: Wed, 25 Dec 2019 19:46:01 -0500 From: "Farhan Khan" To: freebsd-usb@freebsd.org Subject: Page fault at USB attachment code X-Rspamd-Queue-Id: 47jrqh0vBGz4Q2s X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=farhan.codes header.s=fm1 header.b=eH1Rq2Gs; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=PZYhqAsm; dmarc=none; spf=pass (mx1.freebsd.org: domain of farhan@farhan.codes designates 64.147.123.25 as permitted sender) smtp.mailfrom=farhan@farhan.codes X-Spamd-Result: default: False [-4.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[farhan.codes:s=fm1,messagingengine.com:s=fm1]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; URI_COUNT_ODD(1.00)[9]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[farhan.codes]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[farhan.codes:+,messagingengine.com:+]; IP_SCORE(-3.49)[ip: (-9.82), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.68), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[25.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_WWW(0.50)[] Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Thu, 26 Dec 2019 00:46:25 -0000 Hi all, I am writing a simple USB network device driver skeleton, just to learn the framework. What I think is fairly simple code is having a kernel panic when it hits the attachment code. The code and kgdb output are below. I apologize, its been some time since I used kgdb, so I am not sure what the next step I should do to debug this. --------------------- static int skel_usb_attach(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); struct skel_usb_softc *uc = device_get_softc(self); struct skel_softc *sc = uc->sc_sc; struct ieee80211com *ic = &sc->sc_ic; device_set_usb_desc(self); uc->uc_udev = uaa->device; sc->sc_dev = self; ic->ic_name = device_get_nameunit(self); return 0; } --------------------- When I run kgdb, I get the following output. --------------------- sudo kgdb -n last GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD] Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd13.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.full... Unread portion of the kernel message buffer: Matched! skel0 on uhub0 skel0: on usbus0 Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x7170 fault code = supervisor write data, page not present instruction pointer = 0x20:0xffffffff8271f094 stack pointer = 0x28:0xfffffe00036f5930 frame pointer = 0x28:0xfffffe00036f5950 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 15 (usbus0) trap number = 12 panic: page fault cpuid = 0 time = 1577299341 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00036f5590 vpanic() at vpanic+0x17e/frame 0xfffffe00036f55f0 panic() at panic+0x43/frame 0xfffffe00036f5650 trap_fatal() at trap_fatal+0x386/frame 0xfffffe00036f56b0 trap_pfault() at trap_pfault+0x99/frame 0xfffffe00036f5730 trap() at trap+0x2a3/frame 0xfffffe00036f5860 calltrap() at calltrap+0x8/frame 0xfffffe00036f5860 --- trap 0xc, rip = 0xffffffff8271f094, rsp = 0xfffffe00036f5930, rbp = 0xfffffe00036f5950 --- skel_usb_attach() at skel_usb_attach+0x34/frame 0xfffffe00036f5950 device_attach() at device_attach+0x3ca/frame 0xfffffe00036f5990 device_probe_and_attach() at device_probe_and_attach+0x70/frame 0xfffffe00036f59c0 usb_probe_and_attach_sub() at usb_probe_and_attach_sub+0x150/frame 0xfffffe00036f5a10 usb_probe_and_attach() at usb_probe_and_attach+0x463/frame 0xfffffe00036f5ae0 uhub_explore() at uhub_explore+0x753/frame 0xfffffe00036f5b50 usb_bus_explore() at usb_bus_explore+0x11a/frame 0xfffffe00036f5b70 usb_process() at usb_process+0x103/frame 0xfffffe00036f5bb0 fork_exit() at fork_exit+0x80/frame 0xfffffe00036f5bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00036f5bf0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- KDB: enter: panic warning: Could not load shared library symbols for if_skel_usb.ko. Do you need "set solib-search-path" or "set sysroot"? --------------------- Note: I am testing this with an Atheros USB device. Thanks! -- Farhan Khan PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE From owner-freebsd-usb@freebsd.org Thu Dec 26 08:34:52 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 08A7D1CA3B7 for ; Thu, 26 Dec 2019 08:34:52 +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 47k3DB5s0Tz3DGf for ; Thu, 26 Dec 2019 08:34:50 +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 D79D6260179; Thu, 26 Dec 2019 09:34:41 +0100 (CET) Subject: Re: Page fault at USB attachment code To: Farhan Khan , freebsd-usb@freebsd.org References: <7b2a53c8-8640-4b0c-8d6e-22a1988a3ebd@www.fastmail.com> From: Hans Petter Selasky Message-ID: <5e3315f6-33e0-e494-4515-9f6023e1f54c@selasky.org> Date: Thu, 26 Dec 2019 09:33:42 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <7b2a53c8-8640-4b0c-8d6e-22a1988a3ebd@www.fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47k3DB5s0Tz3DGf 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 [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.12)[ip: (-9.33), ipnet: 88.99.0.0/16(-4.72), asn: 24940(-1.56), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Thu, 26 Dec 2019 08:34:52 -0000 On 2019-12-26 01:46, Farhan Khan wrote: > Hi all, > > I am writing a simple USB network device driver skeleton, just to learn the framework. What I think is fairly simple code is having a kernel panic when it hits the attachment code. > > The code and kgdb output are below. I apologize, its been some time since I used kgdb, so I am not sure what the next step I should do to debug this. > > --------------------- > static int > skel_usb_attach(device_t self) > { > struct usb_attach_arg *uaa = device_get_ivars(self); > struct skel_usb_softc *uc = device_get_softc(self); > struct skel_softc *sc = uc->sc_sc; > struct ieee80211com *ic = &sc->sc_ic; > > device_set_usb_desc(self); > uc->uc_udev = uaa->device; > sc->sc_dev = self; > ic->ic_name = device_get_nameunit(self); > > return 0; > } > --------------------- > > When I run kgdb, I get the following output. > > --------------------- > sudo kgdb -n last > GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD] > Copyright (C) 2019 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-portbld-freebsd13.0". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > . > Find the GDB manual and other documentation resources online at: > . > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.full... > > Unread portion of the kernel message buffer: > Matched! > skel0 on uhub0 > skel0: on usbus0 > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x7170 > fault code = supervisor write data, page not present > instruction pointer = 0x20:0xffffffff8271f094 > stack pointer = 0x28:0xfffffe00036f5930 > frame pointer = 0x28:0xfffffe00036f5950 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 15 (usbus0) > trap number = 12 > panic: page fault > cpuid = 0 > time = 1577299341 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00036f5590 > vpanic() at vpanic+0x17e/frame 0xfffffe00036f55f0 > panic() at panic+0x43/frame 0xfffffe00036f5650 > trap_fatal() at trap_fatal+0x386/frame 0xfffffe00036f56b0 > trap_pfault() at trap_pfault+0x99/frame 0xfffffe00036f5730 > trap() at trap+0x2a3/frame 0xfffffe00036f5860 > calltrap() at calltrap+0x8/frame 0xfffffe00036f5860 > --- trap 0xc, rip = 0xffffffff8271f094, rsp = 0xfffffe00036f5930, rbp = 0xfffffe00036f5950 --- > skel_usb_attach() at skel_usb_attach+0x34/frame 0xfffffe00036f5950 > device_attach() at device_attach+0x3ca/frame 0xfffffe00036f5990 > device_probe_and_attach() at device_probe_and_attach+0x70/frame 0xfffffe00036f59c0 > usb_probe_and_attach_sub() at usb_probe_and_attach_sub+0x150/frame 0xfffffe00036f5a10 > usb_probe_and_attach() at usb_probe_and_attach+0x463/frame 0xfffffe00036f5ae0 > uhub_explore() at uhub_explore+0x753/frame 0xfffffe00036f5b50 > usb_bus_explore() at usb_bus_explore+0x11a/frame 0xfffffe00036f5b70 > usb_process() at usb_process+0x103/frame 0xfffffe00036f5bb0 > fork_exit() at fork_exit+0x80/frame 0xfffffe00036f5bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00036f5bf0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > KDB: enter: panic > > warning: Could not load shared library symbols for if_skel_usb.ko. > Do you need "set solib-search-path" or "set sysroot"? > --------------------- > > Note: I am testing this with an Atheros USB device. > > Thanks! > Are you sure you specified sizeof the correct softc, in the driver declaration? --HPS From owner-freebsd-usb@freebsd.org Fri Dec 27 00:59:05 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 7A9E91DD98C for ; Fri, 27 Dec 2019 00:59:05 +0000 (UTC) (envelope-from Shichun.Ma@dell.com) Received: from mx0b-00154904.pphosted.com (mx0b-00154904.pphosted.com [148.163.137.20]) (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 47kT3r2tZJz4W8m for ; Fri, 27 Dec 2019 00:59:04 +0000 (UTC) (envelope-from Shichun.Ma@dell.com) Received: from pps.filterd (m0170398.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBR0ngEE029989 for ; Thu, 26 Dec 2019 19:59:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : subject : date : message-id : content-type : mime-version; s=smtpout1; bh=sIFeE8AXXN88WDo7TUW8ZHHVWod9qS0nXSa5ZDtRu8c=; b=wW+M4G1n1PiB65so8wXaULXgvYkuAE12gz+m0Du1s0NJPZ2I+JRCLcsk5MCSnbC9o5VU QssURoB5fbKw5ZX8WNaEc+jvTpOXS3Shx0LbCuGTv2y5l4Ccx+VxgicxjN6n2MKrhLaA Vh6An9sTB+4gfYqAcNV/R6gjTNG6nXYkmo5AU/RXS4NRXFRxPA3xVSDFSM33onsyozZ0 GmQDXAfuJwmQWpfMcz5F498WuHz3O1e5NFhbHjf3AobbgeCWp9N5xBjiqrcfBR1FPzCo TT9+m8ww83GjwKMXWETdaJsg4Lf9hRHC+nzrEqZ2wV1hT7lS04ZeLLnwUusjI2VcNOZn 3Q== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0b-00154904.pphosted.com with ESMTP id 2x1fgdt53y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Dec 2019 19:59:02 -0500 Received: from pps.filterd (m0090351.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBR0vsRp023143 for ; Thu, 26 Dec 2019 19:59:01 -0500 Received: from ausxippc101.us.dell.com (ausxippc101.us.dell.com [143.166.85.207]) by mx0b-00154901.pphosted.com with ESMTP id 2x4dbwares-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 26 Dec 2019 19:59:01 -0500 X-LoopCount0: from 10.166.135.93 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,346,1549951200"; d="scan'208,217";a="1341250390" From: To: , Subject: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC Thread-Topic: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC Thread-Index: AQHVvE76krxsHnNswkmdInicDjBNdw== Date: Fri, 27 Dec 2019 00:58:51 +0000 Message-ID: <1577408331523.24347@Dell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-26_05:2019-12-24,2019-12-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=671 clxscore=1011 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912270007 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxscore=0 mlxlogscore=816 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912270006 X-Rspamd-Queue-Id: 47kT3r2tZJz4W8m X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dell.com header.s=smtpout1 header.b=wW+M4G1n; dmarc=pass (policy=none) header.from=dell.com; spf=pass (mx1.freebsd.org: domain of Shichun.Ma@dell.com designates 148.163.137.20 as permitted sender) smtp.mailfrom=Shichun.Ma@dell.com X-Spamd-Result: default: False [-7.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[dell.com:s=smtpout1]; HAS_XOIP(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; R_SPF_ALLOW(-0.20)[+ip4:148.163.137.20]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; TO_DN_NONE(0.00)[]; DWL_DNSWL_LOW(-1.00)[dell.com.dwl.dnswl.org : 127.0.9.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dell.com:+]; RCPT_COUNT_TWO(0.00)[2]; FROM_NO_DN(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[dell.com,none]; IP_SCORE(-0.44)[ip: (-0.10), ipnet: 148.163.137.0/24(-0.04), asn: 22843(-2.01), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[20.137.163.148.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:22843, ipnet:148.163.137.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[dell.com:d:+,dell.com:s:+] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Fri, 27 Dec 2019 00:59:05 -0000 Background of the issue, with latest release of FreeBSD kernel. device used: CCID smart card reader, a PC which has Intel Gemini Lake SOC.= CCID reader has an interrupt endpoint which can detect card plugin. ccid and pcscd is used as the application that read data from smard card, a= nd CCID is using libusb to control the transfers. CCID may cancel URB and resubmit the URB, here is the problem: XHCI can't r= eceive interrupt after a cancel (stop) xfer is called. And XHCI interrupt can work normal after 1 plug-in/out. This issue can be avoided by do not call "xhci_cmd_configure_ep " in "xhci= _configure_reset_endpoint" I wish to confirm, is there any guy encounter similar issue? Thanks & Regards, Shichun Ma Software Engineer Dell | Cloud Client Computing office +86 10 82862579, Mobile +86 13241851528 shichun_ma@dell.com From owner-freebsd-usb@freebsd.org Fri Dec 27 01:08:09 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 37F1D1DDC2E for ; Fri, 27 Dec 2019 01:08:09 +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 47kTGJ1fN6z4WS3 for ; Fri, 27 Dec 2019 01:08:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.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 B21A42601A9; Fri, 27 Dec 2019 02:08:04 +0100 (CET) Subject: Re: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC To: Shichun.Ma@dell.com, freebsd-usb@freebsd.org References: <1577408331523.24347@Dell.com> From: Hans Petter Selasky Message-ID: Date: Fri, 27 Dec 2019 01:06:51 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <1577408331523.24347@Dell.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47kTGJ1fN6z4WS3 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 [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.12)[ip: (-9.33), ipnet: 88.99.0.0/16(-4.72), asn: 24940(-1.55), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Fri, 27 Dec 2019 01:08:09 -0000 On 2019-12-27 00:58, Shichun.Ma@dell.com wrote: > This issue can be avoided by do not call "xhci_cmd_configure_ep " in "xhci_configure_reset_endpoint" What does the XHCI specification say about this? Is the XHCI host controller broken? --HPS From owner-freebsd-usb@freebsd.org Fri Dec 27 01:50:32 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 B22571DEE14 for ; Fri, 27 Dec 2019 01:50:32 +0000 (UTC) (envelope-from Shichun.Ma@dell.com) Received: from mx0a-00154904.pphosted.com (mx0a-00154904.pphosted.com [148.163.133.20]) (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 47kVCC6Gpwz4YZP for ; Fri, 27 Dec 2019 01:50:31 +0000 (UTC) (envelope-from Shichun.Ma@dell.com) Received: from pps.filterd (m0170393.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBR1eu37025832 for ; Thu, 26 Dec 2019 20:50:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=smtpout1; bh=FHyIaZ9F6I36mWfiSiFXf9MVSoIuyREcrh53hjGLgHY=; b=rpooSb00IuafDfm5tUqAXn1OnnD/aboDqN1BVG02KvS6iaIy2LvSm8h6U+oQCNCx6i0Q sJB3k26md57j82tPxHV97rvZ9qlqql6n6VZ0dj6UXvXw9scGeWU0sFY45RGULKnKFUmR PlRBsuDEAN8Bw3EdA+Mbk1yaO3n6Tajaa+ixhhFBZA3chYCTGw6BwjWopyB6AqsqDROp VjjtaQTTxMav+u3oo+tCN9V4FQAPwsRmkp8iijg/MyTMNHfADomnpRbuL0FXRB7ono8X mXFTzPsAb2bDqNbRbwoCAAQUI4yubBCEgP7LabZg1uQKERrR+MZxzrwVnnDaDet++sIN Ng== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0a-00154904.pphosted.com with ESMTP id 2x4v85j7jr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Dec 2019 20:50:30 -0500 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBR1hPNp137586 for ; Thu, 26 Dec 2019 20:50:29 -0500 Received: from ausxippc106.us.dell.com (AUSXIPPC106.us.dell.com [143.166.85.156]) by mx0a-00154901.pphosted.com with ESMTP id 2x3t8bwc8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 26 Dec 2019 20:50:29 -0500 X-LoopCount0: from 10.166.136.215 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208";a="503403411" From: To: , CC: Subject: Re: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC Thread-Topic: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC Thread-Index: AQHVvFIbwJYTQurGg0iodFW1OW6TtKfNNjBE Date: Fri, 27 Dec 2019 01:50:25 +0000 Message-ID: <1577411424906.21267@Dell.com> References: <1577408331523.24347@Dell.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.242.75] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-26_05:2019-12-24,2019-12-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 mlxlogscore=849 impostorscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912270012 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 phishscore=0 mlxlogscore=981 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912270012 X-Rspamd-Queue-Id: 47kVCC6Gpwz4YZP X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dell.com header.s=smtpout1 header.b=rpooSb00; dmarc=pass (policy=none) header.from=dell.com; spf=pass (mx1.freebsd.org: domain of Shichun.Ma@dell.com designates 148.163.133.20 as permitted sender) smtp.mailfrom=Shichun.Ma@dell.com X-Spamd-Result: default: False [-7.51 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[dell.com:s=smtpout1]; HAS_XOIP(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_FIVE(0.00)[5]; R_SPF_ALLOW(-0.20)[+ip4:148.163.133.20]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; TO_DN_NONE(0.00)[]; DWL_DNSWL_LOW(-1.00)[dell.com.dwl.dnswl.org : 127.0.9.1]; RWL_MAILSPIKE_POSSIBLE(0.00)[20.133.163.148.rep.mailspike.net : 127.0.0.17]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dell.com:+]; DMARC_POLICY_ALLOW(-0.50)[dell.com,none]; FROM_NO_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[20.133.163.148.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:26211, ipnet:148.163.133.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.41)[ip: (0.00), ipnet: 148.163.133.0/24(0.00), asn: 26211(-2.02), country: US(-0.05)]; WHITELIST_SPF_DKIM(-3.00)[dell.com:d:+,dell.com:s:+] 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: Fri, 27 Dec 2019 01:50:32 -0000 Hi HPS,=0A= XHCI spec just tells:=0A= The configure Endpoint command TRB evalutes the bandwidth and resouce reqir= ement of the endpoints selected by the command.=0A= So I don't think this command can be call to one endpoint several times. = =0A= How, I tried to call configure endpoint with DC (disable configure), it can= 't help.=0A= =0A= >From XHCI spec's view, "reset Endpoint command" is enough to stop xfer.=0A= =0A= Thanks & Regards,=0A= =0A= Shichun Ma=0A= Software Engineer=0A= Dell | Cloud Client Computing=0A= office +86 10 82862579, Mobile +86 13241851528=0A= shichun_ma@dell.com=0A= =0A= =0A= =0A= ________________________________________=0A= From: Hans Petter Selasky =0A= Sent: Friday, December 27, 2019 9:06 AM=0A= To: Ma, Horse; freebsd-usb@freebsd.org=0A= Subject: Re: can not receive xfer interrupt after stop xfer is called intel= XHCI Gemini Lake SOC=0A= =0A= [EXTERNAL EMAIL]=0A= =0A= On 2019-12-27 00:58, Shichun.Ma@dell.com wrote:=0A= > This issue can be avoided by do not call "xhci_cmd_configure_ep " in "xh= ci_configure_reset_endpoint"=0A= =0A= What does the XHCI specification say about this?=0A= =0A= Is the XHCI host controller broken?=0A= =0A= --HPS=0A= From owner-freebsd-usb@freebsd.org Fri Dec 27 09:28:40 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 07E791E889F for ; Fri, 27 Dec 2019 09:28:40 +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 47khMq1grBz3QTD for ; Fri, 27 Dec 2019 09:28:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.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 6C90B260084; Fri, 27 Dec 2019 10:28:29 +0100 (CET) Subject: Re: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC To: Shichun.Ma@dell.com, freebsd-usb@freebsd.org Cc: Shunchao.Hu@dell.com References: <1577408331523.24347@Dell.com> <1577411424906.21267@Dell.com> From: Hans Petter Selasky Message-ID: Date: Fri, 27 Dec 2019 09:27:30 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <1577411424906.21267@Dell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47khMq1grBz3QTD 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 [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-3.12)[ip: (-9.33), ipnet: 88.99.0.0/16(-4.72), asn: 24940(-1.55), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Fri, 27 Dec 2019 09:28:40 -0000 On 2019-12-27 02:50, Shichun.Ma@dell.com wrote: > Hi HPS, > XHCI spec just tells: > The configure Endpoint command TRB evalutes the bandwidth and resouce reqirement of the endpoints selected by the command. > So I don't think this command can be call to one endpoint several times. Hi, When you have alternate interface settings for the same endpoint, how can you then update the max packet size, if the endpoint can't be re-configured? Are we missing some XHCI command before configure, like stop endpoint? > How, I tried to call configure endpoint with DC (disable configure), it can't help. > >>From XHCI spec's view, "reset Endpoint command" is enough to stop xfer. > In this piece of code, does it help to stop the endpoint before you configure? > /* configure endpoint */ > > err = xhci_configure_endpoint_by_xfer(xfer); > > if (err != 0) { > XHCI_CMD_UNLOCK(sc); > return (err); > } > > /* > * Get the endpoint into the stopped state according to the > * endpoint context state diagram in the XHCI specification: > */ > > err = xhci_cmd_stop_ep(sc, 0, epno, index); > > if (err != 0) > DPRINTF("Could not stop endpoint %u\n", epno); Thanks for notifying us about this issue. --HPS