From patchwork Mon Jun 26 16:45:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9810121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A6DD60329 for ; Mon, 26 Jun 2017 16:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 935EB28546 for ; Mon, 26 Jun 2017 16:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 854662857F; Mon, 26 Jun 2017 16:59:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8AE928546 for ; Mon, 26 Jun 2017 16:59:50 +0000 (UTC) Received: from localhost ([::1]:47691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXMc-0004vh-3v for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Jun 2017 12:59:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXAi-0003CI-7d for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPXAe-0003Dg-WC for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:32 -0400 Received: from mail-eopbgr50101.outbound.protection.outlook.com ([40.107.5.101]:27580 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPXAe-0003D5-H0 for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=23kCKxW9jNj/ekrA/gvGiPFJPhAW0s2r6DCLQbieUg8=; b=bNdi2eDbvoB8eSWH1VPhHljojRkMz/CnMCwDf3+tmrdJbFxSGTMEBh4NVu9ygCtq8dObsEVOUIYAxGUk7Th+h0qhVZnU+UJdiWuOSB8rQmFje2SCARH8UOJwD1wAxMn+mYuNn4JaZcKWV9Et8xCreGGZQmLWJkbVxQYL7zHrq1A= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 16:47:22 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 26 Jun 2017 19:45:49 +0300 Message-ID: <1498495550-72357-13-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::23) To VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0bdfcde0-e8e6-49f9-61b0-08d4bcb306ac X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 3:2X8C4baUJOUoWJBmyRW7l+nkTkIsMZoUyowCFuxIhHAcjncYs2M8pjCIhy3Acfq7Ku9fmcEwVt+tl3/oHo5MJAGx3w9eDhSyhLqdoUFm9322bF8pGJ9ziU5Spz3tWrtcGMWHRsm9NlZk6w979gToD0fPV2eUAU1TycSqAJSfWTzy3vkS1BMoWKYYwpNcjEsEzlxo2mkFwMLd7Nztj2ZduuNx4XWskIw49yA3OHs3PRL82+eb6Xc+UXIuZAmHomNyv6vdAhKkoYcPbnGGkmIfD/YAnL+p4qSuul8c1XBAAk5M9ROvdH4jZ84jZ+7EDcJD9NXE35aHXPQNLscKzJ/x9HtwnguwHgKrfzQWhq79f63jiaNc3+QGl9M4fwlfqOiQueZ+audTFtNypLzstHCoPKChUf5vFbi3qxvoN8PKr6O051ecFSbS73Eu3NlItt1uIaoKzghzYlKbA288y9vM4EaCqpSAzeiYzqSBbSEuIcHvsi/EbtiSRlXi5f08QJP79VpJQj+hX9hXfE80CwrfeIT7jye49U1iTMfx+M+4h3Tzj/JzFvBsT20rZq/EWBxBYxMEyD9V0rVodwxDJvgxZw8pLj7mhWAZ5UxgnLNYUq+Hih1awPinFvU0mZaAIlfjUVyQ5NNJ/igtqEY5r0QW33NltTvYhNbBLW55MaJBI4EdF/vcpNm1h3PsO8MQZKwj X-MS-TrafficTypeDiagnostic: VI1PR0801MB1998: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 25:3sX8bdjhPrbg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change-Antispam-Report-Test: UriScan:(236129657087228)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1998; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 4:kHz05Vm0xb4vlM6tNP1WSm/zwoCO7LO48o9DKLI5?= =?us-ascii?Q?YM2cF+napzIjshm3jeUMQBA1nfz7tIAz8K+dJqio+Ce1cwIYEXABOTlfz72q?= =?us-ascii?Q?klcS31aZGrrrb8e/Fi56lnW7tOvKektZ7FqlOBH3xdM6F9icT7tqojyf82Ec?= =?us-ascii?Q?EV6f/3iTcGpYGBfL97Z/g+Uq7Zw+AAoG7Bs3mfBKpt9tbLkNWz7qqf46eNdR?= =?us-ascii?Q?ORtVC2puoWAs8ehH98JjjHV/GK2YCHXhNdjgfknoIw+yYpGfpRlegSV/Ng0g?= =?us-ascii?Q?1dogaedKpiEGOC1V9IbJJtrDZ+wcWC7rPyE0LlneY6QGkP2BF02Jwquy9VNf?= =?us-ascii?Q?wcrjp4ISas0e3Z5ETnmZui7gsPTcfOlxWxpke6EHS2xVCp5yyCy6iNH9Tl79?= =?us-ascii?Q?4OSq/MGfcBeM445gK2H3Yzegylr2gTAQP5ZJDyIwBBljQMH5/GjloLCiBmoN?= =?us-ascii?Q?3J7QfEq6tluN1OBJezQbkOn90VRNSWw0IwiOO7Tw7AeLJua0SUzWig6KtXm4?= =?us-ascii?Q?fUaEsisRpwmEPZgEDp8QaPce2oBcu8MDjh0Y+GBz1Y9qnvH5xcxnGSGLD3vh?= =?us-ascii?Q?6Gh/n15DRf/TIeBQ9wTVfFqAsHCqbZR1CaRVAYdhzuaE4BqNdjZ/nGF6AVdc?= =?us-ascii?Q?98C/WgmCNvL9o0VwtTGinEcvUWrVGyaPr+6crBR4kfRWTtE6+MPcWeQ5AYGC?= =?us-ascii?Q?YRZQaIGvS1BlDi7t6iKqSjrWtEewuiUeIPmm0xT/CAoO2VSaANbcV9P9lruj?= =?us-ascii?Q?WNIuDrjnLjLXFtc90a1FvbMAwrggiE9Pq2j5Kkz5mgPDBlzQo/JhAwCO8wm8?= =?us-ascii?Q?OBp/CGkuBgdF0BlBOS1FftDXy9ZC8Xfm4YjLhIaKUSdLU3DDgx8ICmtjTcOs?= =?us-ascii?Q?begtBZMZZN01pgv7SkayiZFZHar5JRSp8R1pMVe1gnGAjQ2AhmqsJbMVXFHU?= =?us-ascii?Q?ba7sXspWRWfUyIhyDHDQcsAZVGOT0PmWXEsaPQDfbQNVbWeHUSM1Gd5nibHA?= =?us-ascii?Q?SDOdwQlZNeJ1YwYgPC2GHREBhy0YoSQHvOQHIXp+jgaYEhlExt60n7XXn6DJ?= =?us-ascii?Q?WUbdD0w4EMkSApb81Zd6W7KN+ffg+vWpkaX7TGZkM+LCIDdU1JWfDwKjOvIN?= =?us-ascii?Q?+2F8yfQREbGPFp/vOC4bVlYfmlc+lqDsqCLyKmAAEtEyP8aoSuzMnL9mLdY+?= =?us-ascii?Q?KttIvfQw9bG6N7SCNhx0FYxrr/Uz8qTGAqlRSXfIbSNc+7AaENfig9CA+A?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(189998001)(575784001)(86362001)(53416004)(2870700001)(478600001)(53936002)(6486002)(5660300001)(50226002)(50466002)(42186005)(36756003)(81166006)(25786009)(50986999)(6506006)(76176999)(3846002)(23676002)(66066001)(47776003)(305945005)(33646002)(15650500001)(54906002)(2906002)(38730400002)(110136004)(2361001)(6116002)(4326008)(7736002)(6512007)(2351001)(2950100002)(8676002)(6666003)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1998; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 23:WU1yn/29F811Ut74S/g5YQkK7KjdE8sIgZw5vm0?= =?us-ascii?Q?d13qD+6NLXsX951yy6W4AnpJjAyJfa3+b9xM1dytYw9vd4HOl8dNXuIBav3O?= =?us-ascii?Q?nF9vNkT3MYslc7G74LJnwNmh6MTQqgu12bmsJ0IRVMZWz6ibX++lADZEZWcS?= =?us-ascii?Q?maCXm4HKZ35cHv0P23zIptW3Vcz8EN8vVO/bf8Ojm/A8J+PzWBSLsGrMJ7qQ?= =?us-ascii?Q?S+8IkIL0UBT7EvkkUMZ4cJlnDNseUCjPG5VIfba1jgW3UY93pi+CJ5r2o8es?= =?us-ascii?Q?mu8czc2ZAur+PqutzrXqX6/g0l5L9+dWveSTcBd3PggT/RsGj2+c0W+hfPwq?= =?us-ascii?Q?cRnbZ2TrXwh0t2UCiTSBljzfBXaKOS5T0HeBllcsNQXz7kAyNm1wRplJjZmZ?= =?us-ascii?Q?3x2Wc2nsqeDSkPvfBeRO4kNojZNDT5VwqvldjLTidhShIeimQSyEkNGh//XO?= =?us-ascii?Q?A5m0N8gh/+J0BK4b3ag1TNyuZK1BQQQ302/FWvZVv0uXJo3XernTWHi0YLKs?= =?us-ascii?Q?dWMIPm+OOD7jG68n+tEhiPvKt2CTe5m3tJedCx3/wPe6ixMn7wpjAC+W5hrM?= =?us-ascii?Q?5gPlAQ2JhlyZqY1k5QVdKbOwR+6h6uO2eHrYWUwyatIZf+yayWxlSi79+ADI?= =?us-ascii?Q?GZvFdsd2+j9sfax/JPJyXKFPZK+f9t0x754vOMLV+5X5DBCBQdE7eqxoh6dY?= =?us-ascii?Q?KZR58F+iX87tu52jLZDCVPE7bnnhWd+aifVIjrrWnztowZK0v5Yae6gGgo59?= =?us-ascii?Q?dZ2xZP9+GrIbZNZzI08n5u64gDrdok5cyMTpg2GXqpNVPqm2PIdz7NE7DIyq?= =?us-ascii?Q?JQmCs05ZzyksiHOacg6ySIZJS721QVfvcnjSGq0nG0tfWMqRD7WGkFjAmcLh?= =?us-ascii?Q?dqQ4EvUP8YxX3l36XjnQDz/rk//ddwPWPKq+GlxIFKoQkLUX8fvNBhki6dOV?= =?us-ascii?Q?PIyES57EFPe/lRywWkQvGSAhifG2KVerjCFhbAZtzL4VIPaSvzeoufGJab0Q?= =?us-ascii?Q?KDWgGk9KvDJuOnL2hhqurYMNZx12llaTbYr/ngzz1hwh210Nc3JVhzwiaEqa?= =?us-ascii?Q?cXCR6KTc2YSKqTSNZPrLQqCC5iIPMkQNcWPwen8vyO+vbMHH2safxSwce8SE?= =?us-ascii?Q?rBFgGhgQoO2g=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 6:FEhwiC37yhjq9G9s4x63mC0WgSaktlbN/xks5feB?= =?us-ascii?Q?/IvGNl9UsKQ1oa3t5uSerf+uG3adGcgBbMCN/YfX2OMVY5kR86sApoG/ggeV?= =?us-ascii?Q?KNOEwlrtLy6XfzxRntt3n/3/UwP4dkArLtR9Y0/RVTieLGIGG/okc6Iu40EQ?= =?us-ascii?Q?K2ILXLkma4vNOHisUqEcTbg0nfQSaM44G3xpNquyOkz9/Qla5b5m4ojcxJuF?= =?us-ascii?Q?uSpGGBFwF/hUV0vcjiUt21klpClza3dDXiE3jLYimY2OcTOMs5FuTI+rkpGV?= =?us-ascii?Q?yXS0fVCqyZug7FoESM/DDP0Vj+ss4VcN/cqX/vk9Vb6+620QI2+oABMQpA9b?= =?us-ascii?Q?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GsCTzj++7Vfz/8oTL7kEZem5X6jBtvCopXXFRuhc6q4GKkwgOeBxPqdbAE6UXBVCTNmMLpaY004GehNXRddNIq76tMDh0vV+ME+uOxaiCczPljsW0jY1bGRtZDvyw4KqF32myLUijXcd+IrWW/3yP1hS0yuKYBfZUxUAraFsCOaTjSp591stlle4zfgPYf9xHEoVQqy7Yq58lTceokS1byS0dTZFXgY+JYbgeGN5is7NV0R8= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 20:Xs5QdBCx873JRYE7G7OBnf4CB7VYCW4NI5opxy6mBCVEnORpl/15P2U0fVvGgn+bXYWZd50TCTzosRSmK9l/9ByeVSkwj5Cw4uQ3HrXzDeh15zUa5wyhlG5BG6eEpQRb4GJy1nhgVXTI51t3Ku6/jW+brb8wFBnqTSAHoAjoG0M= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 16:47:22.0710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1998 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.101 Subject: [Qemu-devel] [PATCH v4 12/13] serial: move TIOCM update to a separate function 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: pbonzini@redhat.com, Anton Nefedov , "Michael S . Tsirkin" , den@virtuozzo.com, marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP will be used by the following patch Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Michael S. Tsirkin CC: Paolo Bonzini Reviewed-by: Marc-André Lureau --- hw/char/serial.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index ab14ca4..e47f0b6 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -312,6 +312,24 @@ static void serial_write_fcr(SerialState *s, uint8_t val) } } +static void serial_update_tiocm(SerialState *s) +{ + int flags; + + qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_GET_TIOCM, &flags); + + flags &= ~(CHR_TIOCM_RTS | CHR_TIOCM_DTR); + + if (s->mcr & UART_MCR_RTS) { + flags |= CHR_TIOCM_RTS; + } + if (s->mcr & UART_MCR_DTR) { + flags |= CHR_TIOCM_DTR; + } + + qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_TIOCM, &flags); +} + static void serial_ioport_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { @@ -426,24 +444,13 @@ static void serial_ioport_write(void *opaque, hwaddr addr, uint64_t val, break; case 4: { - int flags; int old_mcr = s->mcr; s->mcr = val & 0x1f; if (val & UART_MCR_LOOP) break; if (s->poll_msl >= 0 && old_mcr != s->mcr) { - - qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_GET_TIOCM, &flags); - - flags &= ~(CHR_TIOCM_RTS | CHR_TIOCM_DTR); - - if (val & UART_MCR_RTS) - flags |= CHR_TIOCM_RTS; - if (val & UART_MCR_DTR) - flags |= CHR_TIOCM_DTR; - - qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_TIOCM, &flags); + serial_update_tiocm(s); /* Update the modem status after a one-character-send wait-time, since there may be a response from the device/computer at the other end of the serial line */ timer_mod(s->modem_status_poll, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + s->char_transmit_time);