From patchwork Tue Jul 18 00:16:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Maynard X-Patchwork-Id: 704015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB3BEEB64DC for ; Tue, 18 Jul 2023 00:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230477AbjGRARI (ORCPT ); Mon, 17 Jul 2023 20:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbjGRARH (ORCPT ); Mon, 17 Jul 2023 20:17:07 -0400 Received: from exhmta17.bpe.bigpond.com (exhmta17.bpe.bigpond.com [203.42.40.161]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3D0A188; Mon, 17 Jul 2023 17:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bigpond.com ; s=202303; h=Content-Type:MIME-Version:Date:Message-ID:To:Subject:From; bh=Q0ZgKzQZd4FX/D+rysn1QvJp6Cn5FgznCU7I/mWePQ4=; b=BdTVojFH19bpzxzE0yOoEysqxW nTsF+DV2Pr+MJz6UwYbf9h68cp8N1BhSi+33fVlWx65wYuynKeNI+gHNM4WV7TnD3dQfmu+gAVb02 uah9YwcrdlIKxPc9gX1avo+sCG8WSUmhndLtUR2kkHm+Gkdi9e+5iAEH9VV0N140Jj4ibE37FR7aI jsNUsFbtOuTjHo+Ad51RW6kQeUflRz4shuX3jv6eal4ymAZ0rRFft2GcEh2Q7LooMKtUH+0pVRg/l XmcO1o3bvM/bYvdvI8PSHG4qZiq1hQuJc9Xy1hFTx20ItoyHuaKYi/J3KqdBmmEqZm6IypnucEAlm y22YvjeQ==; Received: from exhprdcmr03 by exhprdomr17 with esmtp (envelope-from ) id 1qLYOh-0007Hk-1c for ; Tue, 18 Jul 2023 10:16:59 +1000 Received: from [101.191.138.223] (helo=[10.0.0.38]) by exhprdcmr03 with esmtpa (envelope-from ) id 1qLYOh-0008eX-0y; Tue, 18 Jul 2023 10:16:59 +1000 From: Ross Maynard Subject: [PATCH] USB: zaurus: 3 broken Zaurus devices To: Greg KH , linux-usb@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org Cc: Oliver Neukum Message-ID: <4963f4df-e36d-94e2-a045-48469ab2a892@bigpond.com> Date: Tue, 18 Jul 2023 10:16:55 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Language: en-US X-tce-id: bids.7405@bigpond.com X-tce-ares-id: e{574c812c-f7a5-4f03-878b-cf17a3d432d5}1 X-tce-spam-action: no action X-tce-spam-score: 0.0 X-Cm-Analysis: v=2.4 cv=PNXJu9mC c=1 sm=1 tr=0 ts=64b5d9fb a=I+ymoOSk5yzZBOYXmf4WnA==:117 a=I+ymoOSk5yzZBOYXmf4WnA==:17 a=ws7JD89P4LkA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=VwQbUJbxAAAA:8 a=vca9FNj1airBrpF0sQMA:9 a=QEXdDO2ut3YA:10 a=1IlZJK9HAAAA:8 a=iXZdpN1a21TaRPcZ4IIA:9 a=B2y7HmGcmWMA:10 a=AjGcO6oz07-iQ99wixmX:22 X-Cm-Envelope: MS4xfFavOt6c0+/h0YKaw/uC8Di/Vg708bI+MXh28FIG7Xg911w3ZUQsfPpxhK6xb2OJyNSiVtiFOzuZ7tEhBItCM2PWoe7y5ky4CaXdB/IXmvL3/rOBRvxr 43RBBWMk7IfE/W9GRC4sLFQHdfQfmLECNB0PCIwINoafXlRpb3rlXINp3EcjS5MYiKoO2Gu3cq1cNA== Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi Greg, This is related to Oliver Neukum's patch 6605cc67ca18b9d583eb96e18a20f5f4e726103c (USB: zaurus: support another broken Zaurus) which you committed in 2022 to fix broken support for the Zaurus SL-6000. Prior to that I had been able to track down the original offending patch using git bisect as you had suggested to me: 16adf5d07987d93675945f3cecf0e33706566005 (usbnet: Remove over-broad module alias from zaurus). It turns out that the offending patch also broke support for 3 other Zaurus models: A300, C700 and B500/SL-5600. My patch adds the 3 device IDs to the driver in the same way Oliver added the SL-6000 ID in his patch. Could you please review the attached patch? I tested it on all 3 devices and it fixed the problem. For your reference, the associated bug URL is https://bugzilla.kernel.org/show_bug.cgi?id=217632. Thank you. Regards, Ross Signed-off-by: Ross Maynard Reported-by: Ross Maynard Link: https://bugzilla.kernel.org/show_bug.cgi?id=217632 --- drivers/net/usb/cdc_ether.c | 21 +++++++++++++++++++++ drivers/net/usb/zaurus.c | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -616,6 +616,13 @@ static const struct usb_device_id products[] = { }, { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x8005, /* A-300 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = 0, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, .idProduct = 0x8006, /* B-500/SL-5600 */ ZAURUS_MASTER_INTERFACE, @@ -623,12 +630,26 @@ static const struct usb_device_id products[] = { }, { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x8006, /* B-500/SL-5600 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = 0, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, .idProduct = 0x8007, /* C-700 */ ZAURUS_MASTER_INTERFACE, .driver_info = 0, }, { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x8007, /* C-700 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = 0, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, .idProduct = 0x9031, /* C-750 C-760 */ --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c @@ -289,9 +289,23 @@ static const struct usb_device_id products [] = { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, + .idProduct = 0x8005, /* A-300 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = (unsigned long)&bogus_mdlm_info, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, .idProduct = 0x8006, /* B-500/SL-5600 */ ZAURUS_MASTER_INTERFACE, .driver_info = ZAURUS_PXA_INFO, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x8006, /* B-500/SL-5600 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = (unsigned long)&bogus_mdlm_info, }, { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, @@ -301,6 +315,13 @@ static const struct usb_device_id products [] = { .driver_info = ZAURUS_PXA_INFO, }, { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x8007, /* C-700 */ + ZAURUS_FAKE_INTERFACE, + .driver_info = (unsigned long)&bogus_mdlm_info, +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, .idProduct = 0x9031, /* C-750 C-760 */