From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7416C432C3 for ; Thu, 14 Nov 2019 02:23:19 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72942206E1 for ; Thu, 14 Nov 2019 02:23:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s+2k0WGV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72942206E1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iV4mW-0005cB-V5; Wed, 13 Nov 2019 21:22:48 -0500 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1iV4mU-0005c5-7c for kernelnewbies@kernelnewbies.org; Wed, 13 Nov 2019 21:22:46 -0500 Received: by mail-io1-xd2b.google.com with SMTP id i11so4978567iol.13 for ; Wed, 13 Nov 2019 18:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=RsT66I+nWbSmryfoR/T3hHI3pCH27R8SYqdxHAN6Iv4=; b=s+2k0WGVHxbZRDx/X1txkXOnAhszaUFBkThhE2qsvksakoYIlFp6F9DowB0mLlFvBl 1CMwZO4eZpeJhIo6R5QeHQizxF3yNZRmXCbAyTSjNjQrmcFWLOPKeZgPvgzGSkQO3B3p jAa5kmw1FPR07+pmTfxKpcBcD+7u7Hm6PQBX8Q2wlffINWmstztIRethcYNX6t/m+vZI S4boaYE/k8KL+lP8K8OvvqUlsRqyIod4yECTMGr+wr2PKtyKnO6C4oF6TjJadmXEgKOs 3XwFmf8daZDOfxRR1tB9AP4C5bh8c8ZVx8mPzHk4piaiSIZv4pYAKd4ynlC4MlAoRLuu 71aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=RsT66I+nWbSmryfoR/T3hHI3pCH27R8SYqdxHAN6Iv4=; b=GXBknxOqw2sOvPMhAMh4iKT+qmhkEeHoi2GLiyzuC09UOWM6r8xa8fJjijqaH02/bL fhwzs7awr2lF1zz2si5Qo7DXnrxDcSEnwF14Rj5EJrul3RW/GJdkdAQhVo+P8pldUcwT w70RowkXo0n9buGJBfj6NKxhsctKKJ3r28tJIEne2Uq9Uv5XNJkRfXpjXzOtEjWFiwH0 cofpjZy96NZueemhkXqfZgov/iM79Gibzq0XIpDvJb9IfqT5sjd8MGB7o9EWX/hrIwlZ IQIp4uzMBPLO4/oOFTFN7MxDLlog4Y+QZpNfpw58YDR3HzqJzHHQd9mDgQUaY0m3Myjj gTDw== X-Gm-Message-State: APjAAAVbh8R0y7rUQcJH34RvYM0zJ/cW7rTKkRzZYldr/R1q4VYpNB9e UfMtvtieWTJWOPQccccxoGBXamrww416fupluQ3C2A== X-Google-Smtp-Source: APXvYqzkP8w35Hmo+l2y0qcQyFwKxQnVRiMj4FXpy0jBIXV24t7lVcrvleHxVgO9+hZNJgfT+n6YlEODglHixJJ5vl0= X-Received: by 2002:a5d:8b99:: with SMTP id p25mr6429489iol.41.1573698103556; Wed, 13 Nov 2019 18:21:43 -0800 (PST) MIME-Version: 1.0 References: <5DCBD3E1.7030109@swemel.ru> In-Reply-To: <5DCBD3E1.7030109@swemel.ru> From: Jeffrey Walton Date: Wed, 13 Nov 2019 21:20:24 -0500 Message-ID: Subject: Re: Switch a fd between blocking and non-blocking mode? To: Konstantin Andreev Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: noloader@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Wed, Nov 13, 2019 at 4:59 AM Konstantin Andreev wrote: > > I have looked into the sources of the kernel 4.19.13. > > After the series of checks the fcntl(F_SETFL) just stores flags into the file descriptor, and that's all: Ack, thanks. I did not think the kernel discarded the data when switching the mode. (a tcflush or tcdrain may do it, but I did not call them). I'm almost certain there's a bug in the firmware on the modem I am using. Jeff _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies