Received: by 10.192.165.148 with SMTP id m20csp1929454imm; Thu, 3 May 2018 07:39:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqtFdi+dO7qWuT4cqcbhlme8XUA7mUayQ2xiO+hm90LEp8JGMraGbSGDL4kt/xHlHktRLlo X-Received: by 2002:a65:4acd:: with SMTP id c13-v6mr9656621pgu.32.1525358396547; Thu, 03 May 2018 07:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525358396; cv=none; d=google.com; s=arc-20160816; b=rKV4zRnjLoO0Zd4DluAeY7et0QiIyi3Loion7YRYCP0xD7b5oCyg4WPVQJPAKYg8b4 b1aTaq2COW7Aoe9gdchZyDN6YryE8vaOesibM8rX3B8FmxeqVO2TIAApCf86St+IevQK pi0JtAxhue2F32T2Wzg8dN17PURWCuug3hDgQKD/4HQeNqKvKzKkiYi4tLfwrxJuinHj YKvcurY51kwzVlQMJXlB4A+WSlSFVksADYONO9aT+tRqdR7fVk6bc9iSUHc8sia0ZbEo DpOFND4fPdHEFkGDIQayujQu9i879xXlS2Xc2WFHgkh+CRZsL9BnodGnflCBGZsZkM3V 90FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:to:subject :message-id:date:from:mime-version:dkim-signature :arc-authentication-results; bh=hFcjrn0DSsRG7eIXGMvWlPXXg/zpznmHb60Vv9rFVJY=; b=qnqvmi9077eXWaxpKPTzHHiO6xalEPQN3+Q7zcbjpv7WpFyGOCqOf/cc/3JIpul0oT dMFYuJme0X0LX6kVoXkb9ZEeMoVfUJGwgC4WvPJSeysXXiD+j/jmTuXb7j3+8RUS+H2E SUbgBZuIg6E3n6jAZcmxLt4U53rvwKDpfB1607dfZFzqjjRnUygIMLcN49TuQHlKJgMT +CcZOIY+kkV8zUYnvTB5+API38lzOH/7+TcGpq+QrCS54rgCN1IiAWt/c5YLFs6r/1YA U8MhXkrM89ihyM3fXsFZp+S93rbPbXXZR4GhYFykkfH38IrWsAHxUqEOfr5T8gQgWXjg FMdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sjbxc84Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22-v6si14490270plp.216.2018.05.03.07.39.42; Thu, 03 May 2018 07:39:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sjbxc84Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbeECOix (ORCPT + 99 others); Thu, 3 May 2018 10:38:53 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:39795 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbeECOiu (ORCPT ); Thu, 3 May 2018 10:38:50 -0400 Received: by mail-ot0-f196.google.com with SMTP id l12-v6so20896053oth.6; Thu, 03 May 2018 07:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=hFcjrn0DSsRG7eIXGMvWlPXXg/zpznmHb60Vv9rFVJY=; b=sjbxc84Z6KduXJtvASxrwWfrx2SBE26Kps4jQx8WqMFBGNUgVsRM6qpwPuze2SllNi cU9tGUEQjhYS+gYx03az+8e+ghlGaegen6LcS3NrMi8lMFLJftwTt2YD/XN1DSMdHbR0 hVayzTTJjIFlgcqYpO2jrqRKfTToMpBEVxdbhndew//k2yF5CoyWXZleUG3dqayLbQmN 43vFc3SaJeuVJT9/vWyTUqmO7xPxal4AOPkA1594S+Y6GyqUwtmmuyiS/qxjXOAxOmX5 WWORwymhyMQhf05zYQOmu8FtEb3SVXVMxkWHkn5O91FC6kUY7ychqXcL2JqgRcH+8Ob1 yrFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=hFcjrn0DSsRG7eIXGMvWlPXXg/zpznmHb60Vv9rFVJY=; b=XbrawN0NbSBQfpz5w8EEkygu4q4jnQYQZfYndNOYP0bZSt8LwcTAVs1EhAYU+jHzKZ haZGumAKr2q9aXpGeAlYcN8ig9oID+oA34u7p4NnEkSX+LAj3+Z1vHeLJSoEwckRfmte MmeKWq2bUDQkTDg8bjuYAPkg/97LLhvPMjxyeQC6MN+vqksLedi1fVoEE9qP4/B9ur63 vsHr380dr6LMkFdL3/IPmuG2hn0pwH5VyNXxo9pGOtt/s81LkerJygU3ujr6SeU3Ad7c PjT9Rg0ani719Ke0pftc0+OKYGEKnw+BHuGdZcinoSbdYmtGbC5jrI/Hdikh53EOeOsn sUhA== X-Gm-Message-State: ALQs6tBcsF+VmWFl8+pGUwOiQr5bqLUbuUqauMb6M+JWpsKo3SQtzIv6 1tywc+l29MYR0EDrhiUx0oS7iqCEi5M6g3gf9Zc58w== X-Received: by 2002:a9d:286e:: with SMTP id h43-v6mr17880448otd.206.1525358329124; Thu, 03 May 2018 07:38:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:118b:0:0:0:0:0 with HTTP; Thu, 3 May 2018 07:38:48 -0700 (PDT) From: Muni Sekhar Date: Thu, 3 May 2018 20:08:48 +0530 Message-ID: Subject: serial: start_tx & buffer handling To: linux-serial , linux-kernel@vger.kernel.org, kernelnewbies Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, I=E2=80=99m trying to understand how user mode buffer is written to low lev= el serial hardware registers. For this I read the kernel code and I came to know that from user mode write() API lands into kernel=E2=80=99s tty_write() ("drivers/tty/tty_io.c"= ) and then it calls a uart_write() ("drivers/tty/serial/serial_core.c"). In uart_write(), the buffer is copied to circ_buf and then it calls low level serial hardware driver=E2=80=99s start_tx() (struct uart_ops .start_tx). But here I could not find how the buffer kept in circ_buf is copied to serial port=E2=80=99s TX_FIFO registers? Can someone take a moment to explain me on this? --=20 Thanks, Sekhar