Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2147643iof; Tue, 7 Jun 2022 21:20:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlGfGM2BClUw1win+2m4r/DgLLA0mv4uzwJRQWqKvhkQ0i9XgGmKHCweU/CRiMPvi9afPj X-Received: by 2002:a17:90b:3b8a:b0:1e2:ee1e:6340 with SMTP id pc10-20020a17090b3b8a00b001e2ee1e6340mr35567856pjb.38.1654662016107; Tue, 07 Jun 2022 21:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662016; cv=none; d=google.com; s=arc-20160816; b=CbR6WCLdh7u8RGMbYfsZL3ZHRjpkik6E48kwHn0yrNI5UrcIphBZoT2sIlVsIUKrrf FMx0Bsjy702sZgJs0xpMAj8gzSbk2SCm9p5xphlsmWEM03dLBFtRqtQEtlbf5P0Ongw/ BLjQTLR9l8LUYYWcw/Q+37lqDpfccLxHqUhWdUwcC1I3YZOC6nAPvzWDZiBMGlXXBLt2 pCwvBf4TzShrcUN/PJfyxPlxOVANmg3f/K1pzdmxuBRqgqQWr4fICQrySsmcaqIpb3Mj pZB63UfLrWawfFKJiyVYRLJazFhaw370b7zdzjQ2YS7gaSgt+U/BI6fWgeIbfAUEVZyz rx0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FPwsRlc4Os16fonxLhcGkw4Y4YCDvljRqIZ/nxHFqFg=; b=urRlNUQWPNJpJ05q9+6N0hdJPrLadx7TkQoqSLWcrOKBKkxdARZxFE5XJ5YgOxpvOs VmlzJrnSKI32N+uTHixUMmhr5XLZScg3fh/qLDxWwXY26mvMFmWGWRucrddwlMXg2KWM ycM366dbpSA1/m3rxsPWOpcn6N2hE5zryRkBdTb8Ah3T69anh/mJQJqRx96OUmuobB8l p4ZKj4xTMG3z9Gro9CzzsBgbewxodN77TgUtz1uB7I+FLWCwCyzu333kJT8sQpYrp5f/ Qq4C7/+iPlWzklZRkkv1MkgjUrJxg3AelGUV1qpz+R2JP6Fs/qlRsl8pt1EojIHAa5ad Giwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Da8XPz4m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g6-20020a056a001a0600b005188fc8f52asi28440184pfv.71.2022.06.07.21.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:20:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Da8XPz4m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 135453C0008; Tue, 7 Jun 2022 20:51:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382470AbiFGWCi (ORCPT + 99 others); Tue, 7 Jun 2022 18:02:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379017AbiFGVB7 (ORCPT ); Tue, 7 Jun 2022 17:01:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A6B188E44; Tue, 7 Jun 2022 11:46:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76AA2B82018; Tue, 7 Jun 2022 18:46:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC3D9C385A2; Tue, 7 Jun 2022 18:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627568; bh=PQpjQG3pFURTCSgJVO1XL5DHQPOIXC4phwjj4OG20fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Da8XPz4mfZzFMUMzaxnExJaZWE8LI6fzD4+mDH5F6mxLPqMLkK0oJiT9M26rq3PIK mVs16aV4o8/x7pLaTe45uE4gDBO8mp8aJfBSdCUyfQYtnY6JVlZFxX4HuVaJVhuFjo MhwACM4Vfx9UKLhlwSzC4Rl4IaSQqIquUMaEc3G4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gary van der Merwe , Johan Hovold Subject: [PATCH 5.18 015/879] USB: serial: pl2303: fix type detection for odd device Date: Tue, 7 Jun 2022 18:52:13 +0200 Message-Id: <20220607165003.115165042@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit e82e7c6dde91acd6748d672a44dc1980ce239f86 upstream. At least one pl2303 device has a bcdUSB of 1.0.1 which most likely was was intended as 1.1. Allow bcdDevice 1.0.1 but interpret it as 1.1. Fixes: 1e9faef4d26d ("USB: serial: pl2303: fix HX type detection") Cc: stable@vger.kernel.org # 5.13 Link: https://lore.kernel.org/linux-usb/CAJixRzqf4a9-ZKZDgWxicc_BpfdZVE9qqGmkiO7xEstOXUbGvQ@mail.gmail.com Reported-by: Gary van der Merwe Link: https://lore.kernel.org/r/20220517161736.13313-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/pl2303.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -421,6 +421,9 @@ static int pl2303_detect_type(struct usb bcdUSB = le16_to_cpu(desc->bcdUSB); switch (bcdUSB) { + case 0x101: + /* USB 1.0.1? Let's assume they meant 1.1... */ + fallthrough; case 0x110: switch (bcdDevice) { case 0x300: