From owner-freebsd-usb@freebsd.org Fri Jan 10 09:21:59 2020 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 395DE1E1789 for ; Fri, 10 Jan 2020 09:21:59 +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 47vHYf1SFYz4Nhy for ; Fri, 10 Jan 2020 09:21:57 +0000 (UTC) (envelope-from Shichun.Ma@dell.com) Received: from pps.filterd (m0170389.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00A9KH0Y002383 for ; Fri, 10 Jan 2020 04:21:56 -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=kd0h4vjXd4saryVNkopqVCTOwQ5TXlnwUIN6vW93JsM=; b=SPNt++cHzNywoVyw41H/G8OIen+o4nQ7cD97bfB/Sk1ARqM6XeFNIWquIk/d2xdCE8hK dHHCfkBQC1oHqZ1GqD5BFRGTS6uKHA3WozrB4RBaZbWjjNHQzRfEuRbJAcFDDTt7EFfH z4SAYZkLLS3hRnJu170nv88l5Hw7z353+/EG2ICO+YxoGS77O4rS9ARnHs0gfk44JBA7 KXLBK/Clau0E020qR90smiiYQo3+IQI8lfPg+fK383sLFgKHjnMlyA07OLymaFzFihBo sbhw6QrFtEChFvGtVey9vg0YdAeF9X7X21frgdAahmMAkrAw/E8H+Ti6/ePctfg0fpUh 8w== Received: from mx0a-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 2xe8smtss5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 10 Jan 2020 04:21:56 -0500 Received: from pps.filterd (m0089484.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00A9IPNj060097 for ; Fri, 10 Jan 2020 04:21:55 -0500 Received: from ausxippc106.us.dell.com (AUSXIPPC106.us.dell.com [143.166.85.156]) by mx0b-00154901.pphosted.com with ESMTP id 2xen6e1305-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 10 Jan 2020 04:21:55 -0500 X-LoopCount0: from 10.166.132.127 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208";a="507971588" From: To: , CC: Subject: Re: minor improve for xhci_cmd_stop_ep in xhci_configure_reset_endpoint Thread-Topic: minor improve for xhci_cmd_stop_ep in xhci_configure_reset_endpoint Thread-Index: AQHVx1zY/T1s1lBQl02qpmHnCbNkT6fjEwaAgAABegCAAIb6MA== Date: Fri, 10 Jan 2020 09:21:51 +0000 Message-ID: <1578648110788.20024@Dell.com> References: <1578623361805.72194@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.138, 18.0.572 definitions=2020-01-10_01:2020-01-10, 2020-01-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=807 lowpriorityscore=0 spamscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001100079 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 clxscore=1015 mlxscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001100079 X-Rspamd-Queue-Id: 47vHYf1SFYz4Nhy X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dell.com header.s=smtpout1 header.b=SPNt++cH; 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.53 / 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]; 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.43)[ip: (-0.03), ipnet: 148.163.133.0/24(-0.01), asn: 26211(-2.04), 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, 10 Jan 2020 09:21:59 -0000 Hi HPS,=0A= XHCI spec mentioned this, =0A= https://www.intel.com/content/dam/www/public/us/en/documents/technical-spec= ifications/extensible-host-controler-interface-usb-xhci.pdf, P443=0A= =0A= The Device Context data structure is used in the xHCI architecture as Outpu= t by the xHC to report device configuration and state information to system= software. The Device Context data structure is pointed to by an entry in t= he Device Context Base Address Array (refer to sectio=0A= =0A= XHCI shoud update this memory.=0A= =0A= your diff is ok in my test.=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, January 10, 2020 5:02 PM=0A= To: Ma, Horse; freebsd-usb@freebsd.org=0A= Cc: Hu, Shunchao=0A= Subject: Re: minor improve for xhci_cmd_stop_ep in xhci_configure_reset_end= point=0A= =0A= [EXTERNAL EMAIL]=0A= =0A= On 2020-01-10 09:57, Hans Petter Selasky wrote:=0A= > Hi,=0A= >=0A= > Can you test the attached patch?=0A= >=0A= =0A= HI,=0A= =0A= How are we sure that the XHCI doesn't cache the device endpoint state in=0A= its internal memory cache. I.E. that it doesn't update the device=0A= context in host memory at all times?=0A= =0A= I think it is better to query the XHCI controller and if we get an error=0A= back that is OK.=0A= =0A= --HPS=0A= =0A=