Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965257AbeAJJQG (ORCPT + 1 other); Wed, 10 Jan 2018 04:16:06 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:34469 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404AbeAJJQD (ORCPT ); Wed, 10 Jan 2018 04:16:03 -0500 X-Google-Smtp-Source: ACJfBot7H+QUSze1o05nCukjFgZTnWgezej4nklnitOzln/RM/DPcgShI4Qy7Np+p734M3BpdVPtGw== Subject: Re: [PATCH V2 1/5] usb: serial: f81534: add high baud rate support To: Johan Hovold Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter_hong@fintek.com.tw, "Ji-Ze Hong (Peter Hong)" References: <1515032961-29131-1-git-send-email-hpeter+linux_kernel@gmail.com> <20180109110841.GN11344@localhost> <18d4171a-1e1a-5476-dc9d-02a522cbf077@gmail.com> <20180110084914.GV11344@localhost> From: "Ji-Ze Hong (Peter Hong)" Message-ID: <3b594392-1b6d-f019-1e5f-3e3e3f87f7e8@gmail.com> Date: Wed, 10 Jan 2018 17:16:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180110084914.GV11344@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Johan, Johan Hovold 於 2018/1/10 下午 04:49 寫道: >> Normally, the communication with F81534 ep0 will take less than 1 sec >> (even only some milliseconds), but It maybe take much long time with >> huge loading with UART functional. >> >> We had tested it on BurnInTest, 4 ports with 921600bps + MSR status >> check to perform huge loading test. The worst case to read MSR register >> via ep0 will take 15~18 seconds. So We'll still remain the max waiting >> time for access ep0 with 2x10=20s in high baud rate mode. > > Wow, that's unfortunate. But note that your patch only doubles the > timeout to 2000 ms, that is, two seconds and not twenty: > > -#define F81534_USB_TIMEOUT 1000 > +#define F81534_USB_TIMEOUT 2000 > > If you really intended to increase this to twenty seconds, then please > do so in a separate (preparatory) patch where you describe why that is > needed (e.g. what you wrote above). In f81534_set_register()/f81534_get_register(), We'll use a while loop with 10 times to get/set register and the timeout is 1000ms. So the total minimum retry timeout is 1000x10=10s. But when introducing the high baud rate support, 10s is not enough for heavily loading. We had tested the minimum retry is 16~18s, so we enlarge the F81534_USB_TIMEOUT from 1000 to 2000 and the total minimum retry timeout is 20s. Should I separate it as 2 patches? This issue is due to introducing high baud patch. Thanks -- With Best Regards, Peter Hong