Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2227042/?format=api
{ "id": 2227042, "url": "http://patchwork.ozlabs.org/api/patches/2227042/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260423051804.362095-5-jamin_lin@aspeedtech.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260423051804.362095-5-jamin_lin@aspeedtech.com>", "list_archive_url": null, "date": "2026-04-23T05:18:10", "name": "[v4,04/17] hw/usb/hcd-ehci.c: Fix coding style issues reported by checkpatch", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "daf1723a8e301b7035b22c68307c15a424301c36", "submitter": { "id": 81768, "url": "http://patchwork.ozlabs.org/api/people/81768/?format=api", "name": "Jamin Lin", "email": "jamin_lin@aspeedtech.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260423051804.362095-5-jamin_lin@aspeedtech.com/mbox/", "series": [ { "id": 501145, "url": "http://patchwork.ozlabs.org/api/series/501145/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501145", "date": "2026-04-23T05:18:08", "name": "hw/usb/ehci: Add 64-bit descriptor addressing support", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/501145/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227042/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2227042/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=aspeedtech.com header.i=@aspeedtech.com\n header.a=rsa-sha256 header.s=selector1 header.b=lROhp24K;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=aspeedtech.com;" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1PYp07Wrz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 15:20:30 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFmSI-0007SB-O8; Thu, 23 Apr 2026 01:18:26 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jamin_lin@aspeedtech.com>)\n id 1wFmSG-0007RC-SH; Thu, 23 Apr 2026 01:18:24 -0400", "from mail-japaneastazlp170130007.outbound.protection.outlook.com\n ([2a01:111:f403:c405::7] helo=TYDPR03CU002.outbound.protection.outlook.com)\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jamin_lin@aspeedtech.com>)\n id 1wFmSE-0003Bi-At; Thu, 23 Apr 2026 01:18:24 -0400", "from TYPPR06MB8206.apcprd06.prod.outlook.com (2603:1096:405:383::19)\n by KUXPR06MB8534.apcprd06.prod.outlook.com (2603:1096:d10:9d::22)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.16; Thu, 23 Apr\n 2026 05:18:10 +0000", "from TYPPR06MB8206.apcprd06.prod.outlook.com\n ([fe80::e659:1ead:77cb:f6d3]) by TYPPR06MB8206.apcprd06.prod.outlook.com\n ([fe80::e659:1ead:77cb:f6d3%3]) with mapi id 15.20.9846.021; Thu, 23 Apr 2026\n 05:18:10 +0000" ], "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=rFY55zbQihlTD5ZHxc7kNBDcLLuOQgwIFgmGSiouNWHPiKJJ1dctfOkBFxNQxMkzSDs4q4T5osoSelHxVomdfmmpYcY76w5rd2yLu5+4FT6Z12LQZfgR9twmpA65P1iW69s+G7TnqgdHZOpf4x8drk9XkPaZqse0OnFRDZXhMGzspI5C2kUHpppAb84hV4Ih6Ych7xaczV4sMIH+d7/hneFVdCTW8CDeF71zwFhrcXsTQ4dse+CJNGW97BrQA/cx/lDWfUURVeL6rHEk+N0HRhq2z1qiBC+7qubPmj6mCWyALywu5nbdVA4PAWFuYnBDbq+nW7EIZrI54eq5lTqKJw==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=njr4wCoeju2QssBCsergfxNnAQJ7Wb4og1kRDdF9wIg=;\n b=Cp9sYqUbLgKfkoHjaJSwEayfv3ykHdhkLWGsNIMTwDRgMDwEU6ueZiXXX/VhpFtacLX39Q8oqRhPwvN13W8nNbQu3IXXqAW9mw5OdmO5jC6uezrIz2cmRk+X82R97El4SLO18Gb5kmZOO1f8jVijo/2Uvr59d3A820HJ5UwpH+CH+bLndGQ3wQLnZNJ1jWceAKRlYTtn2N9qMtSv22RSdFccZSTCQs6lhbC7Ikx3ai6D05+bqwSYRBC2VV1Q+jyoiWbKSCbVUPeS9G+abnlaDS5xf1jOljCo8uMUEeZ/WEXk9IKlvRBoSIThshhpqXmiyYOTFUb7zF6yXMLsTdD7Ww==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=aspeedtech.com; dmarc=pass action=none\n header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=aspeedtech.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=njr4wCoeju2QssBCsergfxNnAQJ7Wb4og1kRDdF9wIg=;\n b=lROhp24Kb8nq8wkZ9tkgtENK2ianUOw7rKc71en1AD1AfVBnAF+7AYOb/KEFKvy8HMlPimD1G70E+Dv9sS+mZwh4hZZ8h2+HPSCYnZzP5YcsGOYCJpKSMTa+lkM/m5juIPG+apVwuOue+FhLZIAhaRnytqKzGczxBm26agwZiiqboRKQXwboFkR5oipp2SWVmjxVPDFCKRoqp9ITfOpfiq+3+YGC4YQvIYgOwPrQnQeNwCtXby6QgEhQd0acKDufG4oZJK8NCh+sbhyXQ67gRi6uRYx8JACik6Ph1IhbWTSvfXlRasMq+mbB9I4fWojpAaSdXMW1Tft1nM4Bw7XE7Q==", "From": "Jamin Lin <jamin_lin@aspeedtech.com>", "To": "\"philmd@linaro.org\" <philmd@linaro.org>,\n \"peterx@redhat.com\" <peterx@redhat.com>,\n =?iso-8859-1?q?C=E9dric_Le_Goater?= <clg@kaod.org>,\n Peter Maydell <peter.maydell@linaro.org>,\n Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>,\n Kane Chen <kane_chen@aspeedtech.com>,\n Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>,\n \"open list:ASPEED BMCs\" <qemu-arm@nongnu.org>,\n \"open list:All patches CC here\" <qemu-devel@nongnu.org>", "CC": "Jamin Lin <jamin_lin@aspeedtech.com>, Troy Lee <troy_lee@aspeedtech.com>,\n \"flwu@google.com\" <flwu@google.com>,\n \"nabihestefan@google.com\" <nabihestefan@google.com>,\n \"farosas@suse.de\" <farosas@suse.de>,\n =?iso-8859-1?q?C=E9dric_Le_Goater?= <clg@redhat.com>", "Subject": "[PATCH v4 04/17] hw/usb/hcd-ehci.c: Fix coding style issues reported\n by checkpatch", "Thread-Topic": "[PATCH v4 04/17] hw/usb/hcd-ehci.c: Fix coding style issues\n reported by checkpatch", "Thread-Index": "AQHc0uCTwyqYk72ua0yM0nO2B2R3hA==", "Date": "Thu, 23 Apr 2026 05:18:10 +0000", "Message-ID": "<20260423051804.362095-5-jamin_lin@aspeedtech.com>", "References": "<20260423051804.362095-1-jamin_lin@aspeedtech.com>", "In-Reply-To": "<20260423051804.362095-1-jamin_lin@aspeedtech.com>", "Accept-Language": "zh-TW, en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=aspeedtech.com header.i=@aspeedtech.com\n header.a=rsa-sha256 header.s=selector1 header.b=lROhp24K;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=aspeedtech.com;" ], "x-ms-publictraffictype": "Email", "x-ms-traffictypediagnostic": "TYPPR06MB8206:EE_|KUXPR06MB8534:EE_", "x-ms-office365-filtering-correlation-id": "7fc11e76-4206-4dc0-5608-08dea0f7b631", "x-ms-exchange-senderadcheck": "1", "x-ms-exchange-antispam-relay": "0", "x-microsoft-antispam": "BCL:0;\n ARA:13230040|376014|7416014|1800799024|366016|38070700021|921020|18002099003|18096099003|22082099003|56012099003;", "x-microsoft-antispam-message-info": "\n DUaCNfkTTySk2T2OqI/Idy/S89LyEbpPyR5m4+BiKZbeqp8IhGMNkeAUJzK0HujpfBqRbqOTLjslWwLk2+lVEFGDx6FBNBUvIwfrpEkdk8Al/T7LO1d5tLDrLsEaDEXL2CWhi0ew84vOsB9W4Pb3VMEhaipfrv9yvZZTbYyhNtBqYTM8bZFD1N73nqgzNmLHdTe4M2mHfulav3J/G2xVJkku4iJsw6EGjCgx5dO0HJ+oE5ILS2br+HC+6Klu+9IxiXe3cmWD/Qn2Nb8+zP2eIi4aEC6YUOvlOCowNQ7ku9qHIzKIBvbiirfGVtMQ/p1MzOtDN/M03+FJEFJYSxabORPWmE2oCGry+4KTTH1FuEU4KgM2TArDcsSNvnvwBKCWaSE3QF5uXoIldqdX4E/Fe7VGOpLxlGXVL/m0bwfyi/hOlhgpc7+gdhCxQwWiKxAlFv08inHnFdc2xNmKdgpqYAn/CIkQi6bVp/VXwQC+hKVOAhfjRhfZnmM8+lfxfcTtuAvDrUWkxXwoKCBmQwlo4QQFFUs84o0gcWA6iUlRe/GEEl4ueNSG2dXIiY+JWasLzeOaOH2gyfEuTLa2DI/ZAHGtpoDkRU2Zj6YgJItzDKtr6r252Dc+phJWCvfZxGDYyLksUYwG3+4OIrHS+AgHWGo80QSeoTs79gKIe6f7bGvlTA3r3I/VVSQQS3CJIt59MbAj04r3V400uxEVe8p4LhCtdznPjHEYH0Q7jlL37NmpdljALbr64EmaayuM0cyHHrWjRGbRd8oCo6RTs9occcql7BOvPFwnFXYn4Zgz8q/QJbOdxgBS816O+gf8Mf6I", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:TYPPR06MB8206.apcprd06.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230040)(376014)(7416014)(1800799024)(366016)(38070700021)(921020)(18002099003)(18096099003)(22082099003)(56012099003);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata-chunkcount": "1", "x-ms-exchange-antispam-messagedata-0": "=?iso-8859-1?q?viu0A0MMMMmO6MtZ5BjAQwU?=\n\t=?iso-8859-1?q?dVOwfMyFehr7S6m/yMJrHA/SGOMsK2jhSAd6V92Wl+RUOS1qd0USZoEXdn1P?=\n\t=?iso-8859-1?q?mfH8k+g0n+6Y104ieD7Rt75hld9jAcvZyCB7U0BwZw5RCMbYOSkRM6mo7AGt?=\n\t=?iso-8859-1?q?l6S3bmT9muckqNStm4iNUDBRm6bCSZm1j6B3UjxYLP3OlRWj/BA32CoAxiXA?=\n\t=?iso-8859-1?q?HWHmDOBQnwdL3ZiBFfp4W/zowYOXzgjY+xYh4RRfqYQW0IGYWXmVrTgtmLkU?=\n\t=?iso-8859-1?q?9v/bI9kuya3/Q3PMD66ApGD3uJfi7NsBKL9pQweLq3FYge4+jaNikS9eSLaa?=\n\t=?iso-8859-1?q?rl5Kj2ZX7sf4W+powx1RLdJ4pqG47VH9nFVkwMPFVqZTdohR7jC6UpuUXGyZ?=\n\t=?iso-8859-1?q?5Jt8BDwbiPm31lnD3cinkAEelAAL+2vgj6qBV4a1J377Ydv4eiw+z+BZmtLy?=\n\t=?iso-8859-1?q?pwcifdlA0aEqCja3q3fWaoMOpXihsVpDo7zfj9K7hmkscnGzlBW0GT/uAk/b?=\n\t=?iso-8859-1?q?PIHLeLmdADwwicx+WiafXc8JxI3GVdqTrpDIlbovVixjrQbkBUak6tCdlQvy?=\n\t=?iso-8859-1?q?f+UglTX5lR923KrSJfCVJJfp27wNg7LD2D/vSJl03db7dgu9r6Mg4A3am0Yv?=\n\t=?iso-8859-1?q?WALfGV+KTMQOILh7pCyd8DI+Xz4wifMSiqyIw0kyvHH/0DMnjqXACHwrv9AI?=\n\t=?iso-8859-1?q?g90VD2RGq//96Relgay+Xn9YahxWW6sXtYDTnP585QPXuCsRg7UJjNnM03vN?=\n\t=?iso-8859-1?q?ravbhoTFnB56Kauhc8pM2Ov5raeGGAKg43QlJU11MjZRxLqGMj8A7C8zq2Ka?=\n\t=?iso-8859-1?q?zo/I+wVUQYiZT6O77WmJAnXOeJD0YwrrIbWZspih5F5QfACqACgNnxVFNz6t?=\n\t=?iso-8859-1?q?JU2YUUNZy/7nRQ3TB42W7STye8M+/yiede2WoQebJR/kmTdN4rfsv138+JA8?=\n\t=?iso-8859-1?q?Grye1TkV5Qtc2VPay/BHEf5Co84sHk4sNhVhBdzAfrMPlYZMmDRhHzIPcFT/?=\n\t=?iso-8859-1?q?4VUknROp8PcbCamtnyETHTzfrXdwY4qj+y1CtbzzY6OXbKdNTLxcEgOaVpYr?=\n\t=?iso-8859-1?q?gKypGNCmrX77O1stvavI34HBzh/Bjo+taXhIf6ccGINbVImgmP2qTzKeCb7G?=\n\t=?iso-8859-1?q?JvxYi66Sm9euu83Ew/Umq1eBGbGWH4npLEyI3ck7dDR9GpM/AN2c57zZI1he?=\n\t=?iso-8859-1?q?leRrl9ORwxSlJ74PPu1vGmaxdNK10AHCIVDlgQCYQ2tNnvbpQlZiVQGB4gd7?=\n\t=?iso-8859-1?q?C/jPDSB4whfahtUSUVBOIQHd3COM5FAKZWrpSFBAKLM9hzBFA7J5vuOiGHrD?=\n\t=?iso-8859-1?q?xcjDbGXQj+2gdUJc1GIJv/7iY3fZ6pup9VtZILSVE9jA+77xKu1nFYByRr8i?=\n\t=?iso-8859-1?q?D2o25lo+Q0AX2PrtJtndjCzDUlLfHkr0AIChjS3oV5iOM14HLzmRO5VKfzng?=\n\t=?iso-8859-1?q?fgtGL5uiihE3EN+/Zi6YMn6Nf6n+X9fDeuy9dF5sD3n03H+x6RhOTB4BdHhO?=\n\t=?iso-8859-1?q?DvKSRYD9LD5HB/GcrapND0QkFKDUnrotUCmr2heRd10CkiRVDHntJknI3avS?=\n\t=?iso-8859-1?q?GEyYzUzU8bewJoNrhcxS3Hs1UnhnRyrquElL/FuTIfUTWL9oyufyrwXZqW5F?=\n\t=?iso-8859-1?q?yfrRJAImzs2svngCtwjbYXPxHXiaVcdWi4tL+g2PIQzvTMmdPHXD5lQ3emaA?=\n\t=?iso-8859-1?q?RMe3eIDuOm27wuvlSR4dY3NY5GYbrc5YGURRgJSOAes5QxBpwhcQ6BzQDbJN?=\n\t=?iso-8859-1?q?Bx6NGrrVUriQYnCUmlVNIMxYZHRXjUNWLchPMa62pObD+/A=3D=3D?=", "Content-Type": "text/plain; charset=\"iso-8859-1\"", "Content-Transfer-Encoding": "quoted-printable", "MIME-Version": "1.0", "X-Exchange-RoutingPolicyChecked": "\n AZsYCCyiwhuEw3+8ph2xcHoPuZ18X9eGa8RhRGf17fDRPr5/KHBNlBGBSXeSwDJZatQ+y7EePPEFqOAMFXW9p3AqZM0UbcKxCGrBamhoS31EfXMyae5iCkpA70JcT0NahMugoM/RuDLBy14Fcv7V535NhJ5kRo8Gomi8HwJYbCzTexFi7SgMCM8dY6kKMN5RBEwdtwRlxlva0tA/hGb5okyETExuCYNIaTNEjgLpuU0zZs9tKzOCFrNmrAZZVHs2Q7dM2/4xzRWoWIIvLenHGYCQQ4R8GqXW58mgGuQP2FtlDEm7TNJR4ocJVNptbPQboWkUFgIAcu/+YhpWO+1XvQ==", "X-OriginatorOrg": "aspeedtech.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "TYPPR06MB8206.apcprd06.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 7fc11e76-4206-4dc0-5608-08dea0f7b631", "X-MS-Exchange-CrossTenant-originalarrivaltime": "23 Apr 2026 05:18:10.6991 (UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "43d4aa98-e35b-4575-8939-080e90d5a249", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "\n U7beYCGPWhtZL3YzpyX0+MtKANlOXUNVFXebtUoXuJ93w8jKUNFiid328Vtiz0NtL8bfW0HyzASuf0iq9ubC1ExTg1WW29DJ8JLQ0xT89BU=", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "KUXPR06MB8534", "Received-SPF": "pass client-ip=2a01:111:f403:c405::7;\n envelope-from=jamin_lin@aspeedtech.com;\n helo=TYDPR03CU002.outbound.protection.outlook.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "No functional change.\n\nSigned-off-by: Jamin Lin <jamin_lin@aspeedtech.com>\nReviewed-by: Cédric Le Goater <clg@redhat.com>\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n hw/usb/hcd-ehci.c | 129 +++++++++++++++++++++++++---------------------\n 1 file changed, 71 insertions(+), 58 deletions(-)", "diff": "diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c\nindex 23167bf96f..7e0b767eb9 100644\n--- a/hw/usb/hcd-ehci.c\n+++ b/hw/usb/hcd-ehci.c\n@@ -41,21 +41,23 @@\n #define FRAME_TIMER_NS (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ)\n #define UFRAME_TIMER_NS (FRAME_TIMER_NS / 8)\n \n-#define NB_MAXINTRATE 8 // Max rate at which controller issues ints\n-#define BUFF_SIZE 5*4096 // Max bytes to transfer per transaction\n-#define MAX_QH 100 // Max allowable queue heads in a chain\n+#define NB_MAXINTRATE 8 /* Max rate at which controller issues ints */\n+#define BUFF_SIZE (5 * 4096) /* Max bytes to transfer per transaction */\n+#define MAX_QH 100 /* Max allowable queue heads in a chain */\n #define MIN_UFR_PER_TICK 24 /* Min frames to process when catching up */\n #define PERIODIC_ACTIVE 512 /* Micro-frames */\n \n-/* Internal periodic / asynchronous schedule state machine states\n+/*\n+ * Internal periodic / asynchronous schedule state machine states\n */\n typedef enum {\n EST_INACTIVE = 1000,\n EST_ACTIVE,\n EST_EXECUTING,\n EST_SLEEPING,\n- /* The following states are internal to the state machine function\n- */\n+ /*\n+ * The following states are internal to the state machine function\n+ */\n EST_WAITLISTHEAD,\n EST_FETCHENTRY,\n EST_FETCHQH,\n@@ -71,13 +73,13 @@ typedef enum {\n /* macros for accessing fields within next link pointer entry */\n #define NLPTR_GET(x) ((x) & 0xffffffe0)\n #define NLPTR_TYPE_GET(x) (((x) >> 1) & 3)\n-#define NLPTR_TBIT(x) ((x) & 1) // 1=invalid, 0=valid\n+#define NLPTR_TBIT(x) ((x) & 1) /* 1=invalid, 0=valid */\n \n /* link pointer types */\n-#define NLPTR_TYPE_ITD 0 // isoc xfer descriptor\n-#define NLPTR_TYPE_QH 1 // queue head\n-#define NLPTR_TYPE_STITD 2 // split xaction, isoc xfer descriptor\n-#define NLPTR_TYPE_FSTN 3 // frame span traversal node\n+#define NLPTR_TYPE_ITD 0 /* isoc xfer descriptor */\n+#define NLPTR_TYPE_QH 1 /* queue head */\n+#define NLPTR_TYPE_STITD 2 /* split xaction, isoc xfer descriptor */\n+#define NLPTR_TYPE_FSTN 3 /* frame span traversal node */\n \n #define SET_LAST_RUN_CLOCK(s) \\\n (s)->last_run_ns = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);\n@@ -88,10 +90,10 @@ typedef enum {\n \n #define set_field(data, newval, field) do { \\\n uint32_t val = *data; \\\n- val &= ~ field##_MASK; \\\n+ val &= ~field##_MASK; \\\n val |= ((newval) << field##_SH) & field##_MASK; \\\n *data = val; \\\n- } while(0)\n+ } while (0)\n \n static const char *ehci_state_names[] = {\n [EST_INACTIVE] = \"INACTIVE\",\n@@ -472,8 +474,10 @@ static bool ehci_verify_pid(EHCIQueue *q, EHCIqtd *qtd)\n }\n }\n \n-/* Finish executing and writeback a packet outside of the regular\n- fetchqh -> fetchqtd -> execute -> writeback cycle */\n+/*\n+ * Finish executing and writeback a packet outside of the regular\n+ * fetchqh -> fetchqtd -> execute -> writeback cycle\n+ */\n static void ehci_writeback_async_complete_packet(EHCIPacket *p)\n {\n EHCIQueue *q = p->queue;\n@@ -733,7 +737,7 @@ static void ehci_detach(USBPort *port)\n ehci_queues_rip_device(s, port->dev, 0);\n ehci_queues_rip_device(s, port->dev, 1);\n \n- *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND);\n+ *portsc &= ~(PORTSC_CONNECT | PORTSC_PED | PORTSC_SUSPEND);\n *portsc |= PORTSC_CSC;\n \n ehci_raise_irq(s, USBSTS_PCD);\n@@ -858,7 +862,7 @@ void ehci_reset(void *opaque)\n * Do the detach before touching portsc, so that it correctly gets send to\n * us or to our companion based on PORTSC_POWNER before the reset.\n */\n- for(i = 0; i < EHCI_PORTS; i++) {\n+ for (i = 0; i < EHCI_PORTS; i++) {\n devs[i] = s->ports[i].dev;\n if (devs[i] && devs[i]->attached) {\n usb_detach(&s->ports[i]);\n@@ -877,7 +881,7 @@ void ehci_reset(void *opaque)\n s->astate = EST_INACTIVE;\n s->pstate = EST_INACTIVE;\n \n- for(i = 0; i < EHCI_PORTS; i++) {\n+ for (i = 0; i < EHCI_PORTS; i++) {\n if (s->companion_ports[i]) {\n s->portsc[i] = PORTSC_POWNER | PORTSC_PPOWER;\n } else {\n@@ -942,8 +946,9 @@ static void handle_port_owner_write(EHCIState *s, int port, uint32_t owner)\n uint32_t *portsc = &s->portsc[port];\n uint32_t orig;\n \n- if (s->companion_ports[port] == NULL)\n+ if (s->companion_ports[port] == NULL) {\n return;\n+ }\n \n owner = owner & PORTSC_POWNER;\n orig = *portsc & PORTSC_POWNER;\n@@ -988,7 +993,7 @@ static void ehci_port_write(void *ptr, hwaddr addr,\n trace_usb_ehci_port_reset(port, 1);\n }\n \n- if (!(val & PORTSC_PRESET) &&(*portsc & PORTSC_PRESET)) {\n+ if (!(val & PORTSC_PRESET) && (*portsc & PORTSC_PRESET)) {\n trace_usb_ehci_port_reset(port, 0);\n if (dev && dev->attached) {\n usb_port_reset(&s->ports[port]);\n@@ -1065,8 +1070,10 @@ static void ehci_opreg_write(void *ptr, hwaddr addr,\n break;\n \n case USBSTS:\n- val &= USBSTS_RO_MASK; // bits 6 through 31 are RO\n- ehci_clear_usbsts(s, val); // bits 0 through 5 are R/WC\n+ /* bits 6 through 31 are RO */\n+ val &= USBSTS_RO_MASK;\n+ /* bits 0 through 5 are R/WC */\n+ ehci_clear_usbsts(s, val);\n val = s->usbsts;\n ehci_update_irq(s);\n break;\n@@ -1131,8 +1138,7 @@ static void ehci_flush_qh(EHCIQueue *q)\n put_dwords(q->ehci, addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);\n }\n \n-// 4.10.2\n-\n+/* 4.10.2 */\n static int ehci_qh_do_overlay(EHCIQueue *q)\n {\n EHCIPacket *p = QTAILQ_FIRST(&q->packets);\n@@ -1145,8 +1151,7 @@ static int ehci_qh_do_overlay(EHCIQueue *q)\n assert(p != NULL);\n assert(p->qtdaddr == q->qtdaddr);\n \n- // remember values in fields to preserve in qh after overlay\n-\n+ /* remember values in fields to preserve in qh after overlay */\n dtoggle = q->qh.token & QTD_TOKEN_DTOGGLE;\n ping = q->qh.token & QTD_TOKEN_PING;\n \n@@ -1170,7 +1175,7 @@ static int ehci_qh_do_overlay(EHCIQueue *q)\n }\n \n if (!(q->qh.epchar & QH_EPCHAR_DTC)) {\n- // preserve QH DT bit\n+ /* preserve QH DT bit */\n q->qh.token &= ~QTD_TOKEN_DTOGGLE;\n q->qh.token |= dtoggle;\n }\n@@ -1397,9 +1402,7 @@ static int ehci_execute(EHCIPacket *p, const char *action)\n return 1;\n }\n \n-/* 4.7.2\n- */\n-\n+/* 4.7.2 */\n static int ehci_process_itd(EHCIState *ehci,\n EHCIitd *itd,\n uint32_t addr)\n@@ -1411,13 +1414,13 @@ static int ehci_process_itd(EHCIState *ehci,\n \n ehci->periodic_sched_active = PERIODIC_ACTIVE;\n \n- dir =(itd->bufptr[1] & ITD_BUFPTR_DIRECTION);\n+ dir = (itd->bufptr[1] & ITD_BUFPTR_DIRECTION);\n devaddr = get_field(itd->bufptr[0], ITD_BUFPTR_DEVADDR);\n endp = get_field(itd->bufptr[0], ITD_BUFPTR_EP);\n max = get_field(itd->bufptr[1], ITD_BUFPTR_MAXPKT);\n mult = get_field(itd->bufptr[2], ITD_BUFPTR_MULT);\n \n- for(i = 0; i < 8; i++) {\n+ for (i = 0; i < 8; i++) {\n if (itd->transact[i] & ITD_XACT_ACTIVE) {\n pg = get_field(itd->transact[i], ITD_XACT_PGSEL);\n off = itd->transact[i] & ITD_XACT_OFFSET_MASK;\n@@ -1513,8 +1516,9 @@ static int ehci_process_itd(EHCIState *ehci,\n }\n \n \n-/* This state is the entry point for asynchronous schedule\n- * processing. Entry here constitutes a EHCI start event state (4.8.5)\n+/*\n+ * This state is the entry point for asynchronous schedule\n+ * processing. Entry here constitutes a EHCI start event state (4.8.5)\n */\n static int ehci_state_waitlisthead(EHCIState *ehci, int async)\n {\n@@ -1531,7 +1535,7 @@ static int ehci_state_waitlisthead(EHCIState *ehci, int async)\n ehci_queues_rip_unused(ehci, async);\n \n /* Find the head of the list (4.9.1.1) */\n- for(i = 0; i < MAX_QH; i++) {\n+ for (i = 0; i < MAX_QH; i++) {\n if (get_dwords(ehci, NLPTR_GET(entry), (uint32_t *) &qh,\n sizeof(EHCIqh) >> 2) < 0) {\n return 0;\n@@ -1564,8 +1568,9 @@ out:\n }\n \n \n-/* This state is the entry point for periodic schedule processing as\n- * well as being a continuation state for async processing.\n+/*\n+ * This state is the entry point for periodic schedule processing as\n+ * well as being a continuation state for async processing.\n */\n static int ehci_state_fetchentry(EHCIState *ehci, int async)\n {\n@@ -1674,7 +1679,7 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async)\n \n #if EHCI_DEBUG\n if (q->qhaddr != q->qh.next) {\n- DPRINTF(\"FETCHQH: QH 0x%08x (h %x halt %x active %x) next 0x%08x\\n\",\n+ DPRINTF(\"FETCHQH: QH 0x%08x (h %x halt %x active %x) next 0x%08x\\n\",\n q->qhaddr,\n q->qh.epchar & QH_EPCHAR_H,\n q->qh.token & QTD_TOKEN_HALT,\n@@ -1756,7 +1761,8 @@ static int ehci_state_fetchsitd(EHCIState *ehci, int async)\n /* Section 4.10.2 - paragraph 3 */\n static int ehci_state_advqueue(EHCIQueue *q)\n {\n- /* TO-DO: 4.10.2 - paragraph 2\n+ /*\n+ * TO-DO: 4.10.2 - paragraph 2\n * if I-bit is set to 1 and QH is not active\n * go to horizontal QH\n */\n@@ -1929,8 +1935,10 @@ static int ehci_state_execute(EHCIQueue *q)\n return -1;\n }\n \n- // TODO verify enough time remains in the uframe as in 4.4.1.1\n- // TODO write back ptr to async list when done or out of time\n+ /*\n+ * TODO verify enough time remains in the uframe as in 4.4.1.1\n+ * TODO write back ptr to async list when done or out of time\n+ */\n \n /* 4.10.3, bottom of page 82, go horizontal on transaction counter == 0 */\n if (!q->async && q->transact_ctr == 0) {\n@@ -2041,7 +2049,7 @@ static void ehci_advance_state(EHCIState *ehci, int async)\n int again;\n \n do {\n- switch(ehci_get_state(ehci, async)) {\n+ switch (ehci_get_state(ehci, async)) {\n case EST_WAITLISTHEAD:\n again = ehci_state_waitlisthead(ehci, async);\n break;\n@@ -2120,21 +2128,20 @@ static void ehci_advance_state(EHCIState *ehci, int async)\n ehci_reset(ehci);\n again = 0;\n }\n- }\n- while (again);\n+ } while (again);\n }\n \n static void ehci_advance_async_state(EHCIState *ehci)\n {\n const int async = 1;\n \n- switch(ehci_get_state(ehci, async)) {\n+ switch (ehci_get_state(ehci, async)) {\n case EST_INACTIVE:\n if (!ehci_async_enabled(ehci)) {\n break;\n }\n ehci_set_state(ehci, async, EST_ACTIVE);\n- // No break, fall through to ACTIVE\n+ /* No break, fall through to ACTIVE */\n \n case EST_ACTIVE:\n if (!ehci_async_enabled(ehci)) {\n@@ -2158,7 +2165,8 @@ static void ehci_advance_async_state(EHCIState *ehci)\n ehci_set_state(ehci, async, EST_WAITLISTHEAD);\n ehci_advance_state(ehci, async);\n \n- /* If the doorbell is set, the guest wants to make a change to the\n+ /*\n+ * If the doorbell is set, the guest wants to make a change to the\n * schedule. The host controller needs to release cached data.\n * (section 4.8.2)\n */\n@@ -2185,13 +2193,13 @@ static void ehci_advance_periodic_state(EHCIState *ehci)\n uint32_t list;\n const int async = 0;\n \n- // 4.6\n+ /* 4.6 */\n \n- switch(ehci_get_state(ehci, async)) {\n+ switch (ehci_get_state(ehci, async)) {\n case EST_INACTIVE:\n if (!(ehci->frindex & 7) && ehci_periodic_enabled(ehci)) {\n ehci_set_state(ehci, async, EST_ACTIVE);\n- // No break, fall through to ACTIVE\n+ /* No break, fall through to ACTIVE */\n } else\n break;\n \n@@ -2215,7 +2223,7 @@ static void ehci_advance_periodic_state(EHCIState *ehci)\n \n DPRINTF(\"PERIODIC state adv fr=%d. [%08X] -> %08X\\n\",\n ehci->frindex / 8, list, entry);\n- ehci_set_fetch_addr(ehci, async,entry);\n+ ehci_set_fetch_addr(ehci, async, entry);\n ehci_set_state(ehci, async, EST_FETCHENTRY);\n ehci_advance_state(ehci, async);\n ehci_queues_rip_unused(ehci, async);\n@@ -2240,7 +2248,8 @@ static void ehci_update_frindex(EHCIState *ehci, int uframes)\n ehci_raise_irq(ehci, USBSTS_FLR);\n }\n \n- /* How many times will frindex roll over 0x4000 with this frame count?\n+ /*\n+ * How many times will frindex roll over 0x4000 with this frame count?\n * usbsts_frindex is decremented by 0x4000 on rollover until it reaches 0\n */\n int rollovers = (ehci->frindex + uframes) / 0x4000;\n@@ -2320,8 +2329,9 @@ static void ehci_work_bh(void *opaque)\n ehci->async_stepdown++;\n }\n \n- /* Async is not inside loop since it executes everything it can once\n- * called\n+ /*\n+ * Async is not inside loop since it executes everything it can once\n+ * called\n */\n if (ehci_async_enabled(ehci) || ehci->astate != EST_INACTIVE) {\n need_timer++;\n@@ -2339,15 +2349,18 @@ static void ehci_work_bh(void *opaque)\n }\n \n if (need_timer) {\n- /* If we've raised int, we speed up the timer, so that we quickly\n- * notice any new packets queued up in response */\n+ /*\n+ * If we've raised int, we speed up the timer, so that we quickly\n+ * notice any new packets queued up in response\n+ */\n if (ehci->int_req_by_async && (ehci->usbsts & USBSTS_INT)) {\n expire_time = t_now +\n NANOSECONDS_PER_SECOND / (FRAME_TIMER_FREQ * 4);\n ehci->int_req_by_async = false;\n } else {\n- expire_time = t_now + (NANOSECONDS_PER_SECOND\n- * (ehci->async_stepdown+1) / FRAME_TIMER_FREQ);\n+ expire_time = t_now\n+ + (NANOSECONDS_PER_SECOND * (ehci->async_stepdown + 1) /\n+ FRAME_TIMER_FREQ);\n }\n timer_mod(ehci->frame_timer, expire_time);\n }\n", "prefixes": [ "v4", "04/17" ] }