From nobody Mon Feb 9 11:32:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486382658826425.2473006596232; Mon, 6 Feb 2017 04:04:18 -0800 (PST) Received: from localhost ([::1]:46948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cai1p-00054z-9y for importer@patchew.org; Mon, 06 Feb 2017 07:04:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cahtc-0006mK-Nv for qemu-devel@nongnu.org; Mon, 06 Feb 2017 06:55:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cahtZ-00043c-NA for qemu-devel@nongnu.org; Mon, 06 Feb 2017 06:55:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cahtZ-000439-Gz for qemu-devel@nongnu.org; Mon, 06 Feb 2017 06:55:45 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B1F1C04B302 for ; Mon, 6 Feb 2017 11:55:45 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-97.ams2.redhat.com [10.36.116.97]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v16BtiYa007502; Mon, 6 Feb 2017 06:55:44 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id D2E9C8093B; Mon, 6 Feb 2017 12:55:42 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 6 Feb 2017 12:55:39 +0100 Message-Id: <1486382139-30630-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1486382139-30630-1-git-send-email-kraxel@redhat.com> References: <1486382139-30630-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 06 Feb 2017 11:55:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/4] xhci: drop via vendor command handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Seems pretty pointless, we don't emulate an via xhci controller. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 0e25943..fbf8a8b 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -196,7 +196,6 @@ typedef enum TRBType { ER_DEVICE_NOTIFICATION, ER_MFINDEX_WRAP, /* vendor specific bits */ - CR_VENDOR_VIA_CHALLENGE_RESPONSE =3D 48, CR_VENDOR_NEC_FIRMWARE_REVISION =3D 49, CR_VENDOR_NEC_CHALLENGE_RESPONSE =3D 50, } TRBType; @@ -552,7 +551,6 @@ static const char *TRBType_names[] =3D { [ER_HOST_CONTROLLER] =3D "ER_HOST_CONTROLLER", [ER_DEVICE_NOTIFICATION] =3D "ER_DEVICE_NOTIFICATION", [ER_MFINDEX_WRAP] =3D "ER_MFINDEX_WRAP", - [CR_VENDOR_VIA_CHALLENGE_RESPONSE] =3D "CR_VENDOR_VIA_CHALLENGE_RESPON= SE", [CR_VENDOR_NEC_FIRMWARE_REVISION] =3D "CR_VENDOR_NEC_FIRMWARE_REVISIO= N", [CR_VENDOR_NEC_CHALLENGE_RESPONSE] =3D "CR_VENDOR_NEC_CHALLENGE_RESPON= SE", }; @@ -2614,32 +2612,6 @@ static uint32_t xhci_nec_challenge(uint32_t hi, uint= 32_t lo) return ~val; } =20 -static void xhci_via_challenge(XHCIState *xhci, uint64_t addr) -{ - PCIDevice *pci_dev =3D PCI_DEVICE(xhci); - uint32_t buf[8]; - uint32_t obuf[8]; - dma_addr_t paddr =3D xhci_mask64(addr); - - pci_dma_read(pci_dev, paddr, &buf, 32); - - memcpy(obuf, buf, sizeof(obuf)); - - if ((buf[0] & 0xff) =3D=3D 2) { - obuf[0] =3D 0x49932000 + 0x54dc200 * buf[2] + 0x7429b578 * buf[3]; - obuf[0] |=3D (buf[2] * buf[3]) & 0xff; - obuf[1] =3D 0x0132bb37 + 0xe89 * buf[2] + 0xf09 * buf[3]; - obuf[2] =3D 0x0066c2e9 + 0x2091 * buf[2] + 0x19bd * buf[3]; - obuf[3] =3D 0xd5281342 + 0x2cc9691 * buf[2] + 0x2367662 * buf[3]; - obuf[4] =3D 0x0123c75c + 0x1595 * buf[2] + 0x19ec * buf[3]; - obuf[5] =3D 0x00f695de + 0x26fd * buf[2] + 0x3e9 * buf[3]; - obuf[6] =3D obuf[2] ^ obuf[3] ^ 0x29472956; - obuf[7] =3D obuf[2] ^ obuf[3] ^ 0x65866593; - } - - pci_dma_write(pci_dev, paddr, &obuf, 32); -} - static void xhci_process_commands(XHCIState *xhci) { XHCITRB trb; @@ -2735,9 +2707,6 @@ static void xhci_process_commands(XHCIState *xhci) case CR_GET_PORT_BANDWIDTH: event.ccode =3D xhci_get_port_bandwidth(xhci, trb.parameter); break; - case CR_VENDOR_VIA_CHALLENGE_RESPONSE: - xhci_via_challenge(xhci, trb.parameter); - break; case CR_VENDOR_NEC_FIRMWARE_REVISION: if (xhci->nec_quirks) { event.type =3D 48; /* NEC reply */ --=20 1.8.3.1