From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753945AbbG0KBA (ORCPT ); Mon, 27 Jul 2015 06:01:00 -0400 Received: from foo.stuge.se ([212.116.89.98]:60935 "EHLO foo.stuge.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835AbbG0KA6 (ORCPT ); Mon, 27 Jul 2015 06:00:58 -0400 Message-ID: <20150727100055.19696.qmail@stuge.se> Date: Mon, 27 Jul 2015 12:00:55 +0200 From: Peter Stuge To: Sven Brauch Cc: Peter Hurley , Oliver Neukum , Johan Hovold , Linux Kernel Mailing List , One Thousand Gnomes , Toby Gray , linux-usb@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH] Fix data loss in cdc-acm Mail-Followup-To: Sven Brauch , Peter Hurley , Oliver Neukum , Johan Hovold , Linux Kernel Mailing List , One Thousand Gnomes , Toby Gray , linux-usb@vger.kernel.org, linux-serial@vger.kernel.org References: <55AC1883.4050605@svenbrauch.de> <20150720172546.GF20628@localhost> <55AD38E5.1090807@svenbrauch.de> <1437486195.3823.13.camel@suse.com> <55AEBD06.6020402@svenbrauch.de> <55AED708.903@hurleysoftware.com> <55AEE805.9050204@svenbrauch.de> <55B01554.90201@hurleysoftware.com> <55B01EDE.3050503@svenbrauch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B01EDE.3050503@svenbrauch.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sven Brauch wrote: > I don't make any other changes to the default settings. To be honest, > I'm not sure in which mode it is operating then (I was assuming raw, but > I might be wrong?). You should explicitly set a mode if you need a particular mode, otherwise the port might be in another mode. This sets raw. Add error checking. struct termios t; tcgetattr(fd, &t); cfmakeraw(&t); cfsetspeed(&t, B115200); tcsetattr(fd, 0, &t); //Peter