Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933571AbbBQJva (ORCPT ); Tue, 17 Feb 2015 04:51:30 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:36512 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbbBQJv1 (ORCPT ); Tue, 17 Feb 2015 04:51:27 -0500 X-Google-Original-Sender: Date: Tue, 17 Feb 2015 16:51:36 +0700 From: Johan Hovold To: Peter Hung Cc: johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, tom_tsai@fintek.com.tw, peter_hong@fintek.com.tw, Peter Hung Subject: Re: [PATCH V6 08/10] USB: f81232: fix read MSR strange value Message-ID: <20150217095136.GU2551@localhost> References: <1424073482-18164-1-git-send-email-hpeter+linux_kernel@gmail.com> <1424073482-18164-9-git-send-email-hpeter+linux_kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424073482-18164-9-git-send-email-hpeter+linux_kernel@gmail.com> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 29 On Mon, Feb 16, 2015 at 03:58:00PM +0800, Peter Hung wrote: > When we use RS232 loopback, assume doing RTS change will cause > CTS change, DTR change will cause DCD/DSR change too. > > Sometimes we got 7~4 bits of MSR changed but the 3~0 bits of > MSR(delta) maybe not changed when set & get MCR fasterly. I think you mean "rapidly" here. > So we add more check not only UART_MSR_ANY_DELTA but also with > comparing DCD/RI/DSR/CTS change with old value. Due to the state > bit is always correct, we direct save msr when read. > > The following step to reproduce this problem with while loop step 1~4: > 1. ioctl(fd, TIOCMSET, &data) to set RTS or DTR > 2. ioctl(fd, TIOCMGET, &data) to read CTS or DCD/DSR state > 3. ioctl(fd, TIOCMSET, &data) to unset RTS or DTR > 4. ioctl(fd, TIOCMGET, &data) to read CTS or DCD/DSR state Without having looked at this very closely; are you sure this is a hardware issue and not related to the locking issues I pointed at in my comments to tiocmset? Johan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/