Received: by 10.223.176.5 with SMTP id f5csp2323028wra; Wed, 31 Jan 2018 21:51:46 -0800 (PST) X-Google-Smtp-Source: AH8x227n1EpCDMo9wtXb3/agDkIsJLmgy32vsFSeY/xFcct6JHm9s+gSbg9lGOFvBeBz9Gy/0Z6V X-Received: by 2002:a17:902:128c:: with SMTP id g12-v6mr1946156pla.417.1517464306025; Wed, 31 Jan 2018 21:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517464305; cv=none; d=google.com; s=arc-20160816; b=XZ5WYT1u9E8bZ0xJgpr10l/iuWA/JY2THF2Dgv2Kzlo7VGHBg5p6u6FRnQWV7D0Oux 5P0BNWxugZqL/Fp/gPFeYgQYnPLn6l/0oRtMsMbb90WzIBaoqvxsFFOTFnAdc+wykWEc RW7whR70X4M22+G/5cYTADK1dNAbT+4u61AHrMGBLu06zcJgOp1CYHuFC0doWCF6njHN Lm+wbhv2bJsVnBHiy/iqx2uP0SuCNAEDMewy0NQ0OImKEdtP0MXeYNTIzy2ZMsSIjNfj xXLqloEO+hPnEj2X3fGdWyk4UMskuujhr8AOeguI2J2oM6MwY5gFZGY373wy/ZPDOgua nLFA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=I/qeI6q/7GfjOndjXA8EgoZxeHykPch7+lzOxmQ579Y=; b=I9uUfXuPR4mitqbqSLrr60d0eKDcUS49MNTI4k2PlzpsORhLgVjhBzhQkZv2ByN4Xh KUtuBAZNe/2r6o4yoCBh7MGMHfGZPRJPO0WqOcOaP0KLr2jc9SNtHAZtjx1j6x2EGOzs fzEPASV2TNgtirLT3NrCoEpCezfrrCx0xDqXQnjLs9vb7icZ07f8QPGjgwNbZAl9Sl/s dEBxFhyla+DNgcOposXnInjpYOoa1lIIPIlH2bIyR2jdAptmuxGNM9MZMa80YUOpmxq7 +hIQ5sd2dy0Du4EAAAsYeVzuWK1Sm2Tya1fiZBvVP4oNKhyFLbZ4G/1gzAjl45aG4vOn 4Pcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FUvdKuCf; 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=NONE 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 r3si4392154pgr.349.2018.01.31.21.51.31; Wed, 31 Jan 2018 21:51:45 -0800 (PST) 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=FUvdKuCf; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716AbeBAFvE (ORCPT + 99 others); Thu, 1 Feb 2018 00:51:04 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:44633 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbeBAFu7 (ORCPT ); Thu, 1 Feb 2018 00:50:59 -0500 Received: by mail-io0-f180.google.com with SMTP id z6so17854477iob.11; Wed, 31 Jan 2018 21:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=I/qeI6q/7GfjOndjXA8EgoZxeHykPch7+lzOxmQ579Y=; b=FUvdKuCf+LdZUklsID36pJ+PqtXu99ASZUJWSH8bbKGZwI5fskxz5171d1czBuKhM1 fzYEHEUjxmG+F1FIFQ35wxH6E2hsc48fgjbZzRyQlanXQE+h7P2yTqVn8vMLTw26cYvm YYQ2bcZ2yDPV5yqtlrd5cevLw14e8JGhF4oM6AXuAem5NBMfKqTCDxVmdITgRFRZKSbM 3c6kZCBBh+i2/Rj1jE6wSndaEi88BPZDaVtQ4DXsb9jU1IFFHEnSZds68ZNaznT+Logw NxPuq/DjYq+d84lnjvFmm7mHkyaHZGT3Fg0FEund+56MgHUTxdLNPzsOWhh9LTCA4vPT UYIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I/qeI6q/7GfjOndjXA8EgoZxeHykPch7+lzOxmQ579Y=; b=c5/n23xVQIO1O7KwCw3vOXvJayH89RNkFWmFSGmCDOMHCvGQVrHRZ9UYPddqOl9L/4 9SWIYkZ1/zScL3+xSZEfVru0650XSaVUf7lFz8cHH0zM3+n9cQJI3uF6bT3UDhCm6f8K vSwXh60Mww3S0OS0wUJw03RKLXkFEwwirfCmwXDrtyUIEDW5/Kovor3Nu/DRPeqiU+75 2Zga8xQO1MZHD/XkBvhSdlUavKUrRiFvhj6ZCf/KE9K4Ian7+y4kHs0H+OQ2H3+zAeTV iQ6WbCkuSq4MBGW5q27dgJdrZYCFz67hSEb67K3lqrKHIyAG3fXHqvUnGqPhPcdIRNyF 9SFA== X-Gm-Message-State: AKwxytdkdfBYR3nd0umDqpFDXFPBDDyTGaJhkTetn174e+yKRA5xZrGS KHVGLlKILOcnsXeZ0KZdn+8= X-Received: by 10.107.6.161 with SMTP id f33mr39618020ioi.196.1517464258365; Wed, 31 Jan 2018 21:50:58 -0800 (PST) Received: from [192.168.1.42] (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id k5sm8589711ioe.59.2018.01.31.21.50.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 21:50:57 -0800 (PST) Subject: Re: [PATCH 5/5] USB: serial: f81232: fix bulk_in/out size 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: <1516607927-8887-1-git-send-email-hpeter+linux_kernel@gmail.com> <1516607927-8887-5-git-send-email-hpeter+linux_kernel@gmail.com> <20180130041150.GC3434@localhost> From: "Ji-Ze Hong (Peter Hong)" Message-ID: <840d55b0-9ce2-846d-9bf5-8d0e67b8739e@gmail.com> Date: Thu, 1 Feb 2018 13:50:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180130041150.GC3434@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, Johan Hovold 於 2018/1/30 下午 12:11 寫道: > On Mon, Jan 22, 2018 at 03:58:47PM +0800, Ji-Ze Hong (Peter Hong) wrote: >> diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c >> index a054f69446fd..f3ee537d643c 100644 >> --- a/drivers/usb/serial/f81232.c >> +++ b/drivers/usb/serial/f81232.c >> @@ -769,8 +769,7 @@ static struct usb_serial_driver f81232_device = { >> }, >> .id_table = id_table, >> .num_ports = 1, >> - .bulk_in_size = 256, >> - .bulk_out_size = 256, >> + .bulk_out_size = 16, > > So it seems you should really be setting bulk_in_size to 64 here (and > possibly leave bulk_out_size unset) as that would appear to match your > device buffer sizes. Yes, we want to set the bulk_in_size as 64. The public datasheet has some error with bulk in/out, the correct size is 64. We had test the bulk_out_size set the same with internal TX FIFO will make the best performance in tests, but it's ok to set 64. In my opinion , I'll prefer to set 16. The following information is the F81232 dump by lsusb: Bus 002 Device 007: ID 1934:0706 Feature Integration Technology Inc. (Fintek) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 16 idVendor 0x1934 Feature Integration Technology Inc. (Fintek) idProduct 0x0706 bcdDevice 0.01 iManufacturer 1 FINTEK iProduct 2 USB TO UART BRIDGE iSerial 3 88635600168801 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0 (Defined at Interface level) bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 10 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered) Thanks -- With Best Regards, Peter Hong