From patchwork Fri Nov 17 23:19:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lech Perczak X-Patchwork-Id: 13459784 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fXxd0tLo" Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252ABB0; Fri, 17 Nov 2023 15:19:37 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c51682fddeso38508781fa.1; Fri, 17 Nov 2023 15:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700263175; x=1700867975; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NW/yy30PlOuRE3Ej4NxBIfTdb4xQ3p8Y9PrdBaKyzLs=; b=fXxd0tLo5/y+/L1vgz7ry7heZyGs62pV7FvR0EhNMgsTYkAPC3xK69EEDJ/vKUimUQ NvzFF4VpgIWo5QsfjDMdPF1n4GdQ0Y89q0b8cJyTnkmCOz5BltNKTmaRkbiOXNgZi/p8 dVlIWS/fT4tcSrFZlp2cdi80leiu6KP3EKBIfERo9TsGClqqpEo5hYOvGmC/y0IyACIk gulh0rs8r3rxmlChSsyvpGaDac3tlhYhHjvuC9yMGBWbp683/l3d39CX8H/MZ+Sh6cBB Y4+Wr5eU7QtMfkOBH3nmBGm3lrDzBXl2aQy102KoCszGFZOJz4ygQ+nWRCaMbQ2DUIFM SZpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700263175; x=1700867975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NW/yy30PlOuRE3Ej4NxBIfTdb4xQ3p8Y9PrdBaKyzLs=; b=Xt/7LwihRQLaLxrr711IRJ7wYcpXnbo2mvsrut6rXjtjA2r/ByWp5B+Xnt6EeotvmF YdY7Bcwwa+NbKf6vJwDRh6RRoqyqrZMoW3WhiaVuKGu1dgNhOI9r44UOAzKwCpMf/XUc FsYTTqy3FE6hXFSS5LljZ/547GN0wl49KB4FY8iZfxBetl5os711VKYzwZA2L8VlpF8O rQsUS7lvk5AkqQvPWI2zWZDa1MOVcjQfwMP7KIVE+cmEGPo3Mt6WdInLfHWCxQJlaeSw tzSz1zOdN6XdcleBYb9/OnsdIWqCpSBhxcrvOwSBjLw2imv+lIVWLkixEv72pjU7G7OD 0PRg== X-Gm-Message-State: AOJu0YzTMft6euofdFHb7A8U3BF39PlIeAkcaSZDHMjEhoUx1JLdplA8 s6H4DSlRhNKX5kFhVLpfB3lvnv9eQSACeA== X-Google-Smtp-Source: AGHT+IH8aEFie+R43aD71/14qAOta29+7FsLfVGK0Vn3200HJrIvIWGgEFL6ZnM1oj7WGH6ouHKRAQ== X-Received: by 2002:ac2:4e10:0:b0:501:ba04:f352 with SMTP id e16-20020ac24e10000000b00501ba04f352mr3339819lfr.1.1700263175225; Fri, 17 Nov 2023 15:19:35 -0800 (PST) Received: from rafiki.local ([89.35.145.100]) by smtp.gmail.com with ESMTPSA id q22-20020ac246f6000000b005095881dc1asm377788lfo.87.2023.11.17.15.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 15:19:34 -0800 (PST) From: Lech Perczak To: netdev@vger.kernel.org, linux-usb@vger.kernel.org Cc: Lech Perczak , Johan Hovold , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290 Date: Sat, 18 Nov 2023 00:19:17 +0100 Message-Id: <20231117231918.100278-2-lech.perczak@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231117231918.100278-1-lech.perczak@gmail.com> References: <20231117231918.100278-1-lech.perczak@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Interface 4 is used by for QMI interface in stock firmware of MF28D, the router which uses MF290 modem. Free the interface up, to rebind it to qmi_wwan driver. The proper configuration is: Interface mapping is: 0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0189 Rev= 0.00 S: Manufacturer=ZTE, Incorporated S: Product=ZTE LTE Technologies MSM C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms Cc: Johan Hovold Cc: Bjørn Mork Signed-off-by: Lech Perczak --- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 45dcfaadaf98..ff9049db6e65 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1546,7 +1546,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff), .driver_info = RSVD(4) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff), + .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */ .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) }, From patchwork Fri Nov 17 23:19:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lech Perczak X-Patchwork-Id: 13459785 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b60qmXZr" Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5873D7A; Fri, 17 Nov 2023 15:19:37 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5099184f8a3so3684266e87.2; Fri, 17 Nov 2023 15:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700263176; x=1700867976; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y6GsLzHscU8yXDN6TiLq2nBefNDUx6j1mcmIXFk/Jmw=; b=b60qmXZrXpcnsvhqMBqdWZ7LdNGxsOsukBJjpyQrsrDqUq2yGsTiX8FtekSJqq7DHV 45Hr2s58RyGVuJm6tdrkxfPw1jqMDnlChc2ZnocoqLaev7HU9ZhSVgjQgY2GsT4mFcS4 11NsONJK6Md2VhFNDZougnjbUvxHS31vL0VTDD6n5sc5xGVDPUPBkGM0XJ3q2WB5s4OB 0CFuh2GMVX0TFv59q/Y3lkGZnhEe/79o5S4eNHpu+aCV9dvACeH7YqhX0m014xjsIjBl NPDdpkCbo1IFDMGHvpfCJCxRgzKlT1pm+rjt0njJh4IXLGF8JFHqsR2G1M7gHzWZkddG akEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700263176; x=1700867976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y6GsLzHscU8yXDN6TiLq2nBefNDUx6j1mcmIXFk/Jmw=; b=SbfK4CgFqpkrl12wkidNzbTSETv85TRr4ntrxQyqxvHw0Ubfs7NrCxzgT0mMbPaS9h 484lqRu+r2TbGpNwocYjW6cb5LCRAzeadFupBGW742aOSN6D9W+bVyqN87IhRYAY8F6s za5+YImsbEDlFx87LgByVRWUyE3bJDm8h5OPoV5ysgJ7+lERgprFPDdKk3CqBHAP+4nv 8sOxeRtzwGy7lcaVBIn0Aep/y+XlLXPbq9aorWt91rCdkFgWH2oc3enzUYo06UP9XrZI tnlxgdBgp4wSqQ1+PRxt8R9A/w/v1/e00d267KXpD8cRFdxUCQvxrghx/BemAfNyfP/O JNxw== X-Gm-Message-State: AOJu0YyWSJIf/xCWOYcvLaB/6RldVd0IMa0CNp/SiHUpvRTKk+S0nGfM ln8S18JpgNnhx5CmzBBrRW7oho1DsgIugQ== X-Google-Smtp-Source: AGHT+IG3QG4N7rbjOQNMHrLbf+ywamuEF8t0YgMdoAQcoq91DxVQQpucUmkjl2psV+qgzE+4JdKgKA== X-Received: by 2002:a05:6512:3d2a:b0:507:ae8b:a573 with SMTP id d42-20020a0565123d2a00b00507ae8ba573mr1018067lfv.51.1700263175940; Fri, 17 Nov 2023 15:19:35 -0800 (PST) Received: from rafiki.local ([89.35.145.100]) by smtp.gmail.com with ESMTPSA id q22-20020ac246f6000000b005095881dc1asm377788lfo.87.2023.11.17.15.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 15:19:35 -0800 (PST) From: Lech Perczak To: netdev@vger.kernel.org, linux-usb@vger.kernel.org Cc: Lech Perczak , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 2/2] net: usb: qmi_wwan: claim interface 4 for ZTE MF290 Date: Sat, 18 Nov 2023 00:19:18 +0100 Message-Id: <20231117231918.100278-3-lech.perczak@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231117231918.100278-1-lech.perczak@gmail.com> References: <20231117231918.100278-1-lech.perczak@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Interface 4 is used by for QMI interface in stock firmware of MF28D, the router which uses MF290 modem. Rebind it to qmi_wwan after freeing it up from option driver. The proper configuration is: Interface mapping is: 0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0189 Rev= 0.00 S: Manufacturer=ZTE, Incorporated S: Product=ZTE LTE Technologies MSM C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms Cc: Bjørn Mork Signed-off-by: Lech Perczak --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 344af3c5c836..e2e181378f41 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1289,6 +1289,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x0168, 4)}, {QMI_FIXED_INTF(0x19d2, 0x0176, 3)}, {QMI_FIXED_INTF(0x19d2, 0x0178, 3)}, + {QMI_FIXED_INTF(0x19d2, 0x0189, 4)}, /* ZTE MF290 */ {QMI_FIXED_INTF(0x19d2, 0x0191, 4)}, /* ZTE EuFi890 */ {QMI_FIXED_INTF(0x19d2, 0x0199, 1)}, /* ZTE MF820S */ {QMI_FIXED_INTF(0x19d2, 0x0200, 1)},