From nobody Sat Nov 30 04:45:45 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2080.outbound.protection.outlook.com [40.107.22.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47D1D18BC27; Thu, 12 Sep 2024 08:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726130275; cv=fail; b=fYSOcZIX4AT30nKr2q55BR8rQzPp1OCaeiualRzSMJmaD7JP8/vbUyh2JBW2EH1fvGWQ8SfsQENhmJIvE1tafnCLDnOOLJrBJdCYH8VH+yoSJLWl+8DbZrU2yNk4RhhFbhrseOiQBKW66v9l8TFCW6Es2CMYW1tdxilCso8Xfoo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726130275; c=relaxed/simple; bh=w8lxtiv6rGDcqtr7vWjpaS+V4MZ7S+kvIu0040jveZU=; h=Message-ID:Date:From:Subject:To:Cc:Content-Type:MIME-Version; b=JR8eH3MB7fYsB9BblnJ8Mi5TKDNQhOw4HBMG04oLw6cMrqSWBqo5SxbuysbZIachynBMf6BXN7Jv7hJcqcHiOj9K9Fh8NR+ZDkP1kLnx0u8geHObiSh28O5LCmnhItBDKkT2AFIyJ6g2LTIgE5mtRUzxA8dCd3sx9GSvzaIIRBE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com; spf=pass smtp.mailfrom=siemens.com; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b=NYOzQNZj; arc=fail smtp.client-ip=40.107.22.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siemens.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b="NYOzQNZj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rmlFzzfzB5tINl/HskwmOOBttjYItsFxkJ7yWBnJEVEY0fQmilhygPedTQk3GVrPSi4vGSFn8/YMlexZZBrqujlCl90hh6gTAMxAjr3M0bs6pzFTwvTr8DV76EPiNw1gx/XhLFp4g4aRcwJ4reNl65KUVgVBMc3vQoXgN4/FHtx1iZ527pdnHxxtnsasqINpd1Wi6MehSjsiTjZZZJkk9PZgDnNAvi2qvGbpJoXICirfOVIAf+yJcOCCVtqePpbtknJu7sE50QfNSvtDpi3/isTDFqYFyS7RMPwplV8Ix/dLj4M08ieoTIXMKg+t1VRh+AKxfo9lVEDITc3X5Ez51A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QbdTVDQtDBVfOVlDf+Y/kjNnVNECLu2Y8iFmPYDXTfA=; b=d0DNm6r7vZrwR9M3Yi0CLhkUKy1ciUtpa02aF60wHNUBqaKmbSyN6ayjI+h77xtMqc4ERn0Q2vPSWdCdzq6b5GfMjVbNnIuCWJ3t2Fp5HtX2Tzt2roF5RPgNlKynqp18rij3b8mNhGOUtvzhGCy6S9poFYOvHpKHW+SgO42cKOe33NWZdTH3YR9MyLDbvsIxJlrEeRxN0zub6JupbXmHLQwOI5BGI1Py1mWh6tjvYO5odWhHgrup7A9ixAD/yhuGsMwbQQOyDItGLR0cgHw112r4bQLp5f78KC/7+Cu9H6Vljt5yiC/wYjJPQT9JIrcwLBmlX4ZoqTT08SuZf5uj+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QbdTVDQtDBVfOVlDf+Y/kjNnVNECLu2Y8iFmPYDXTfA=; b=NYOzQNZjvkhNxXDL7iOmLpJUcB9K7h3rDc4cTdkbV8mY1q9xKdrTKs34jo05M+Ad3aVxIGF4t/y+lWB0snyHK2wq+EFr5l7tSeYAVPpinI3UkUwqeROtlznozlrulXSlIjNqQp+4IV0ClmfUVB6asobZNVi3DEAa3WjpnQvIJ5BnR1yQvF1DNing1+G/LOBbpF4fzVGAjSTrTauEGgj9MYvwfSZ5U7a9zIoPwPiOedX/zPeVer8DZouxUHCwxPnIhg3C5lnhz6FkuEVlD462gm69P2JmyIVG5MInbZprrYOQeJtwlxk+ANLd4ZVIRIdBuk1oAF9FvopuI3hQA1ReQQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by AS4PR10MB6158.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:586::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Thu, 12 Sep 2024 08:37:48 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408%3]) with mapi id 15.20.7962.016; Thu, 12 Sep 2024 08:37:42 +0000 Message-ID: Date: Thu, 12 Sep 2024 10:37:39 +0200 User-Agent: Mozilla Thunderbird From: Jan Kiszka Subject: [PATCH v3] USB: serial: pl2303: account for deficits of clones Content-Language: en-US To: Greg Kroah-Hartman , Johan Hovold , linux-usb , Linux Kernel Mailing List Cc: =?UTF-8?Q?Micha=C5=82_Pecio?= Autocrypt: addr=jan.kiszka@siemens.com; keydata= xsFNBGZY+hkBEACkdtFD81AUVtTVX+UEiUFs7ZQPQsdFpzVmr6R3D059f+lzr4Mlg6KKAcNZ uNUqthIkgLGWzKugodvkcCK8Wbyw+1vxcl4Lw56WezLsOTfu7oi7Z0vp1XkrLcM0tofTbClW xMA964mgUlBT2m/J/ybZd945D0wU57k/smGzDAxkpJgHBrYE/iJWcu46jkGZaLjK4xcMoBWB I6hW9Njxx3Ek0fpLO3876bszc8KjcHOulKreK+ezyJ01Hvbx85s68XWN6N2ulLGtk7E/sXlb 79hylHy5QuU9mZdsRjjRGJb0H9Buzfuz0XrcwOTMJq7e7fbN0QakjivAXsmXim+s5dlKlZjr L3ILWte4ah7cGgqc06nFb5jOhnGnZwnKJlpuod3pc/BFaFGtVHvyoRgxJ9tmDZnjzMfu8YrA +MVv6muwbHnEAeh/f8e9O+oeouqTBzgcaWTq81IyS56/UD6U5GHet9Pz1MB15nnzVcyZXIoC roIhgCUkcl+5m2Z9G56bkiUcFq0IcACzjcRPWvwA09ZbRHXAK/ao/+vPAIMnU6OTx3ejsbHn oh6VpHD3tucIt+xA4/l3LlkZMt5FZjFdkZUuAVU6kBAwElNBCYcrrLYZBRkSGPGDGYZmXAW/ VkNUVTJkRg6MGIeqZmpeoaV2xaIGHBSTDX8+b0c0hT/Bgzjv8QARAQABzSNKYW4gS2lzemth IDxqYW4ua2lzemthQHNpZW1lbnMuY29tPsLBlAQTAQoAPhYhBABMZH11cs99cr20+2mdhQqf QXvYBQJmWPvXAhsDBQkFo5qABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEGmdhQqfQXvY zPAP/jGiVJ2VgPcRWt2P8FbByfrJJAPCsos+SZpncRi7tl9yTEpS+t57h7myEKPdB3L+kxzg K3dt1UhYp4FeIHA3jpJYaFvD7kNZJZ1cU55QXrJI3xu/xfB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PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|AS4PR10MB6158:EE_ X-MS-Office365-Filtering-Correlation-Id: a60a8ef0-52fd-4a93-56b0-08dcd3062b24 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eTFQT1R1VEJ3cnA5MVlrOHJTREgxNS9JcTBUNDZ5KzM3OVlCdk8yYXdFdGFh?= =?utf-8?B?a0JOajZlT0xSMXo2aVFhQ2dZd1pTNG83UzNTM2JaN29KNWpRQ3hLM1JPV1Mv?= =?utf-8?B?Yk4xTXdhUnZGNFdHbEh4TnE0bjNPK045cWhoZVV6ejVNQ0MxSjliNlhYWGlu?= =?utf-8?B?bFJySGxOMFphOWVlMjQyVFJwN3NPejU1MXpFeXYwNHBhSk5ORGxMTVRnUEhZ?= =?utf-8?B?b0ZON29kZ1pkSzhrMS96dmd3K0lJaVlsQjRyVVJJN1Y5alJzODZqTE1GTDBz?= =?utf-8?B?NkI4alZ6Z3hWLzRqMGtuTlE1aHRaZzhwbUhLWE1IS1dzRExTQXJwVGhSRE9P?= =?utf-8?B?YTFpNSt2eFQvaCtlREJ1aC9XQUNWd0ZPa1Q2L3Y0OG1RSEhGQWlLbU1tUVI0?= =?utf-8?B?NG9jQ3dFTzdoZHlPRm5JRWJWUWtxcCtUUzRnOFROeGJNeGFKNkpTeGsralFC?= =?utf-8?B?eU02aGhVQXN5RW9UVzZ3OFE5d1FqK2txY0hKSXhBa051ZTRKTGlTS3JxN012?= =?utf-8?B?TmdOZVY2OFlYK1Y3a3V2cVR0MC9DOEl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Y1BBL25ndkpOZWhpY1ZwbnVhOG1OQWI1bFpFdys5c0ZI?= =?utf-8?B?OWNHeXFiS2NQdXhvNDQweGYvNUs4Mm13Sm4zZlgwN1pMSHBibkdRUDZnS1o1?= =?utf-8?B?ZUVOSGdYenFwU2JlZllLdXhhZ2JXVytuQkFiUzNsK3c2ZEt1V3dVRHZRVERx?= =?utf-8?B?YVpXSDFmOTVDTHhBOVdEdy8rdFdGcmVicitDbVNpbWlPdzR3SlZmUllpWFVr?= =?utf-8?B?cnlCUURrV0Q2aExLejZlUFNWZXVmeko4dzFtQ0pTTG0yRDVhNGRNaVpiOFBr?= =?utf-8?B?bW1HSGZ6K3JrbUhyZmNDSXdCN0tTU0NJbUlyM2EvZzByWnRRSFR3eC83MDZV?= =?utf-8?B?UDJJaU9lL2trVkxIeXFQQT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OFZ0TFIzdGJ0R3B3TTI1STJaalVBRWRIVU5USDhiZ1dmaUVvMkxRb0tlWG12?= =?utf-8?B?MnRIZHgyTkdwNGdHYk1KZk1DQWxiK2VvVEF4dStGaEZwZkpwaStzUVlCT1hH?= =?utf-8?B?VjFIeDc3QktEMjYrSm96Y2dyQVRXT1FkMG1qRGp0R2VqdVN1TWlBbk9tdzF2?= =?utf-8?B?czVWMEZwM29QQ1A2ZFJvWE5IblJWcnVCNExRZkJkVHRVSXRJRkhLdnFXUWU5?= =?utf-8?B?NDMzbUhGVXZaMGZOOXhwcTZQU0h5WGNNZnBvTlBRUUJ4d1hmckZ0Z2hLSGd6?= =?utf-8?B?cFduVHBHN01YTmdEWU1QYWppU0lDcXdw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NbWtHWHNsZXdldHpja0twK3NkVmpabStaQktCUmptS2hoVXBFeEQ0?= =?utf-8?B?NFE9PQ==?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: a60a8ef0-52fd-4a93-56b0-08dcd3062b24 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 08:37:42.8241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GiZpojBT5oFxuc8cmh3cOakKcnx4iwNNmv0sM87BtW9wW3pjFtVVA4y5jKgV+NgWuxLni2KgXN6uMG3oeeVPxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR10MB6158 Content-Type: text/plain; charset="utf-8" From: Jan Kiszka There are apparently incomplete clones of the HXD type chip in use. Those return -EPIPE on GET_LINE_REQUEST and BREAK_REQUEST. Avoid flooding the kernel log with those errors. Detect them during startup and then use the line_settings cache instead of GET_LINE_REQUEST. Signal missing break support via -ENOTTY. Signed-off-by: Jan Kiszka --- Changes in v3: - use quirks field instead of new type (suggested by Michal) drivers/usb/serial/pl2303.c | 41 ++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index d93f5d584557..bc433178a6b0 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -31,6 +31,7 @@ #define PL2303_QUIRK_UART_STATE_IDX0 BIT(0) #define PL2303_QUIRK_LEGACY BIT(1) #define PL2303_QUIRK_ENDPOINT_HACK BIT(2) +#define PL2304_QUIRK_NO_BREAK_GETLINE BIT(3) =20 static const struct usb_device_id id_table[] =3D { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID), @@ -466,6 +467,28 @@ static int pl2303_detect_type(struct usb_serial *seria= l) return -ENODEV; } =20 +static bool pl2303_is_hxd_clone(struct usb_serial *serial) +{ + struct usb_device *udev =3D serial->dev; + unsigned char *buf; + int ret; + + buf =3D kmalloc(7, GFP_KERNEL); + if (!buf) { + dev_err(&serial->interface->dev, + "could not check for clone type, not enough memory\n"); + return false; + } + + ret =3D usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, + 0, 0, buf, 7, 100); + + kfree(buf); + + return ret =3D=3D -EPIPE; +} + static int pl2303_startup(struct usb_serial *serial) { struct pl2303_serial_private *spriv; @@ -488,6 +511,9 @@ static int pl2303_startup(struct usb_serial *serial) spriv->quirks =3D (unsigned long)usb_get_serial_data(serial); spriv->quirks |=3D spriv->type->quirks; =20 + if (type =3D=3D TYPE_HXD && pl2303_is_hxd_clone(serial)) + spriv->quirks |=3D PL2304_QUIRK_NO_BREAK_GETLINE; + usb_set_serial_data(serial, spriv); =20 if (type !=3D TYPE_HXN) { @@ -724,9 +750,18 @@ static void pl2303_encode_baud_rate(struct tty_struct = *tty, static int pl2303_get_line_request(struct usb_serial_port *port, unsigned char buf[7]) { - struct usb_device *udev =3D port->serial->dev; + struct usb_serial *serial =3D port->serial; + struct pl2303_serial_private *spriv =3D usb_get_serial_data(serial); + struct usb_device *udev =3D serial->dev; int ret; =20 + if (spriv->quirks & PL2304_QUIRK_NO_BREAK_GETLINE) { + struct pl2303_private *priv =3D usb_get_serial_port_data(port); + + memcpy(buf, priv->line_settings, 7); + return 0; + } + ret =3D usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, 0, 0, buf, 7, 100); @@ -1063,9 +1098,13 @@ static int pl2303_carrier_raised(struct usb_serial_p= ort *port) static int pl2303_set_break(struct usb_serial_port *port, bool enable) { struct usb_serial *serial =3D port->serial; + struct pl2303_serial_private *spriv =3D usb_get_serial_data(serial); u16 state; int result; =20 + if (spriv->quirks & PL2304_QUIRK_NO_BREAK_GETLINE) + return -ENOTTY; + if (enable) state =3D BREAK_ON; else --=20 2.43.0