All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
@ 2023-11-17 23:19 Lech Perczak
  2023-11-17 23:19 ` [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290 Lech Perczak
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Lech Perczak @ 2023-11-17 23:19 UTC (permalink / raw
  To: netdev, linux-usb; +Cc: Lech Perczak

This modem is used iside ZTE MF28D LTE CPE router. It can already
establish PPP connections. This series attempts to adjust its
configuration to properly support QMI interface which is available and
preferred over that. This is a part of effort to get the device
supported b OpenWrt.

Lech Perczak (2):
  usb: serial: option: don't claim interface 4 for ZTE MF290
  net: usb: qmi_wwan: claim interface 4 for ZTE MF290

 drivers/net/usb/qmi_wwan.c  | 1 +
 drivers/usb/serial/option.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)


base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86
-- 
2.39.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290
  2023-11-17 23:19 [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Lech Perczak
@ 2023-11-17 23:19 ` Lech Perczak
  2023-11-17 23:19 ` [PATCH 2/2] net: usb: qmi_wwan: " Lech Perczak
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Lech Perczak @ 2023-11-17 23:19 UTC (permalink / raw
  To: netdev, linux-usb; +Cc: Lech Perczak, Johan Hovold, Bjørn Mork

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 <johan@kernel.org>
Cc: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
---
 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) },
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] net: usb: qmi_wwan: claim interface 4 for ZTE MF290
  2023-11-17 23:19 [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Lech Perczak
  2023-11-17 23:19 ` [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290 Lech Perczak
@ 2023-11-17 23:19 ` Lech Perczak
  2023-11-21 10:49 ` [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Paolo Abeni
  2023-11-23  9:20 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 8+ messages in thread
From: Lech Perczak @ 2023-11-17 23:19 UTC (permalink / raw
  To: netdev, linux-usb; +Cc: Lech Perczak, Bjørn Mork

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 <bjorn@mork.no>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
---
 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)},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
  2023-11-17 23:19 [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Lech Perczak
  2023-11-17 23:19 ` [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290 Lech Perczak
  2023-11-17 23:19 ` [PATCH 2/2] net: usb: qmi_wwan: " Lech Perczak
@ 2023-11-21 10:49 ` Paolo Abeni
  2023-11-21 10:58   ` Paolo Abeni
  2023-11-23  9:20 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 8+ messages in thread
From: Paolo Abeni @ 2023-11-21 10:49 UTC (permalink / raw
  To: Lech Perczak, netdev, linux-usb

On Sat, 2023-11-18 at 00:19 +0100, Lech Perczak wrote:
> This modem is used iside ZTE MF28D LTE CPE router. It can already
> establish PPP connections. This series attempts to adjust its
> configuration to properly support QMI interface which is available and
> preferred over that. This is a part of effort to get the device
> supported b OpenWrt.
> 
> Lech Perczak (2):
>   usb: serial: option: don't claim interface 4 for ZTE MF290
>   net: usb: qmi_wwan: claim interface 4 for ZTE MF290

It looks like patch 1 targets the usb-serial tree, patch 2 targets the
netdev tree and there no dependencies between them.

I think it would be cleaner if you re-submit the patches separately,
thanks!

Paolo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
  2023-11-21 10:49 ` [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Paolo Abeni
@ 2023-11-21 10:58   ` Paolo Abeni
  2023-11-21 13:06     ` Johan Hovold
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Abeni @ 2023-11-21 10:58 UTC (permalink / raw
  To: Lech Perczak, netdev, linux-usb, Johan Hovold

On Tue, 2023-11-21 at 11:49 +0100, Paolo Abeni wrote:
> On Sat, 2023-11-18 at 00:19 +0100, Lech Perczak wrote:
> > This modem is used iside ZTE MF28D LTE CPE router. It can already
> > establish PPP connections. This series attempts to adjust its
> > configuration to properly support QMI interface which is available and
> > preferred over that. This is a part of effort to get the device
> > supported b OpenWrt.
> > 
> > Lech Perczak (2):
> >   usb: serial: option: don't claim interface 4 for ZTE MF290
> >   net: usb: qmi_wwan: claim interface 4 for ZTE MF290
> 
> It looks like patch 1 targets the usb-serial tree, patch 2 targets the
> netdev tree and there no dependencies between them.

Sorry, ENOCOFFEE here. I see the inter-dependency now. I guess it's
better to pull both patches via the same tree.

@Johan: do you have any preferences? We don't see changes on 
qmi_wwan.c too often, hopefully we should not hit conflicts up to the
next RC.

Cheers,

Paolo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
  2023-11-21 10:58   ` Paolo Abeni
@ 2023-11-21 13:06     ` Johan Hovold
  2023-11-23  8:15       ` Paolo Abeni
  0 siblings, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2023-11-21 13:06 UTC (permalink / raw
  To: Paolo Abeni; +Cc: Lech Perczak, netdev, linux-usb

On Tue, Nov 21, 2023 at 11:58:56AM +0100, Paolo Abeni wrote:
> On Tue, 2023-11-21 at 11:49 +0100, Paolo Abeni wrote:
> > On Sat, 2023-11-18 at 00:19 +0100, Lech Perczak wrote:
> > > This modem is used iside ZTE MF28D LTE CPE router. It can already
> > > establish PPP connections. This series attempts to adjust its
> > > configuration to properly support QMI interface which is available and
> > > preferred over that. This is a part of effort to get the device
> > > supported b OpenWrt.
> > > 
> > > Lech Perczak (2):
> > >   usb: serial: option: don't claim interface 4 for ZTE MF290
> > >   net: usb: qmi_wwan: claim interface 4 for ZTE MF290
> > 
> > It looks like patch 1 targets the usb-serial tree, patch 2 targets the
> > netdev tree and there no dependencies between them.
> 
> Sorry, ENOCOFFEE here. I see the inter-dependency now. I guess it's
> better to pull both patches via the same tree.
> 
> @Johan: do you have any preferences? We don't see changes on 
> qmi_wwan.c too often, hopefully we should not hit conflicts up to the
> next RC.

It should be fine to take these through the two trees, respectively, as
we usually do.

If the qmi_wwan change hits mainline first and that driver binds first,
all is good, otherwise option continues to bind until that patch is also
in mainline.

I'll go queue up the option patch now. Just let me know if you for some
reason prefer I take the qmi_wwan one too.

Johan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
  2023-11-21 13:06     ` Johan Hovold
@ 2023-11-23  8:15       ` Paolo Abeni
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Abeni @ 2023-11-23  8:15 UTC (permalink / raw
  To: Johan Hovold; +Cc: Lech Perczak, netdev, linux-usb

On Tue, 2023-11-21 at 14:06 +0100, Johan Hovold wrote:
> On Tue, Nov 21, 2023 at 11:58:56AM +0100, Paolo Abeni wrote:
> > On Tue, 2023-11-21 at 11:49 +0100, Paolo Abeni wrote:
> > > On Sat, 2023-11-18 at 00:19 +0100, Lech Perczak wrote:
> > > > This modem is used iside ZTE MF28D LTE CPE router. It can already
> > > > establish PPP connections. This series attempts to adjust its
> > > > configuration to properly support QMI interface which is available and
> > > > preferred over that. This is a part of effort to get the device
> > > > supported b OpenWrt.
> > > > 
> > > > Lech Perczak (2):
> > > >   usb: serial: option: don't claim interface 4 for ZTE MF290
> > > >   net: usb: qmi_wwan: claim interface 4 for ZTE MF290
> > > 
> > > It looks like patch 1 targets the usb-serial tree, patch 2 targets the
> > > netdev tree and there no dependencies between them.
> > 
> > Sorry, ENOCOFFEE here. I see the inter-dependency now. I guess it's
> > better to pull both patches via the same tree.
> > 
> > @Johan: do you have any preferences? We don't see changes on 
> > qmi_wwan.c too often, hopefully we should not hit conflicts up to the
> > next RC.
> 
> It should be fine to take these through the two trees, respectively, as
> we usually do.

Fine by me: I'll take patch 2/2 only.

Cheers,

Paolo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem
  2023-11-17 23:19 [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Lech Perczak
                   ` (2 preceding siblings ...)
  2023-11-21 10:49 ` [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Paolo Abeni
@ 2023-11-23  9:20 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-11-23  9:20 UTC (permalink / raw
  To: Lech Perczak; +Cc: netdev, linux-usb

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sat, 18 Nov 2023 00:19:16 +0100 you wrote:
> This modem is used iside ZTE MF28D LTE CPE router. It can already
> establish PPP connections. This series attempts to adjust its
> configuration to properly support QMI interface which is available and
> preferred over that. This is a part of effort to get the device
> supported b OpenWrt.
> 
> Lech Perczak (2):
>   usb: serial: option: don't claim interface 4 for ZTE MF290
>   net: usb: qmi_wwan: claim interface 4 for ZTE MF290
> 
> [...]

Here is the summary with links:
  - [1/2] usb: serial: option: don't claim interface 4 for ZTE MF290
    (no matching commit)
  - [2/2] net: usb: qmi_wwan: claim interface 4 for ZTE MF290
    https://git.kernel.org/netdev/net/c/99360d9620f0

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-23  9:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-17 23:19 [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Lech Perczak
2023-11-17 23:19 ` [PATCH 1/2] usb: serial: option: don't claim interface 4 for ZTE MF290 Lech Perczak
2023-11-17 23:19 ` [PATCH 2/2] net: usb: qmi_wwan: " Lech Perczak
2023-11-21 10:49 ` [PATCH 0/2] usb: fix port mapping for ZTE MF290 modem Paolo Abeni
2023-11-21 10:58   ` Paolo Abeni
2023-11-21 13:06     ` Johan Hovold
2023-11-23  8:15       ` Paolo Abeni
2023-11-23  9:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.