[PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760

Slark Xiao posted 2 patches 1 week, 5 days ago
[PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Slark Xiao 1 week, 5 days ago
T99W760 is designed based on Qualcomm SDX35 chip. It use similar
architechture with SDX72/SDX75 chip. So we need to assign initial
link id for this device to make sure network available.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
 drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
index c814fbd756a1..a142af59a91f 100644
--- a/drivers/net/wwan/mhi_wwan_mbim.c
+++ b/drivers/net/wwan/mhi_wwan_mbim.c
@@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
 static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
 {
 	if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
-	    strcmp(cntrl->name, "foxconn-t99w515") == 0)
+	    strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
+	    strcmp(cntrl->name, "foxconn-t99w760") == 0)
 		return WDS_BIND_MUX_DATA_PORT_MUX_ID;
 
 	return 0;
-- 
2.25.1
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Loic Poulain 1 week, 3 days ago
On Wed, Nov 19, 2025 at 11:57 AM Slark Xiao <slark_xiao@163.com> wrote:
>
> T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> architechture with SDX72/SDX75 chip. So we need to assign initial
> link id for this device to make sure network available.
>
> Signed-off-by: Slark Xiao <slark_xiao@163.com>

Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>

> ---
>  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> index c814fbd756a1..a142af59a91f 100644
> --- a/drivers/net/wwan/mhi_wwan_mbim.c
> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
>  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
>  {
>         if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> -           strcmp(cntrl->name, "foxconn-t99w515") == 0)
> +           strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> +           strcmp(cntrl->name, "foxconn-t99w760") == 0)
>                 return WDS_BIND_MUX_DATA_PORT_MUX_ID;
>
>         return 0;
> --
> 2.25.1
>
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Dmitry Baryshkov 1 week, 5 days ago
On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
> T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> architechture with SDX72/SDX75 chip. So we need to assign initial
> link id for this device to make sure network available.
> 
> Signed-off-by: Slark Xiao <slark_xiao@163.com>
> ---
>  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> index c814fbd756a1..a142af59a91f 100644
> --- a/drivers/net/wwan/mhi_wwan_mbim.c
> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
>  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
>  {
>  	if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> -	    strcmp(cntrl->name, "foxconn-t99w515") == 0)
> +	    strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> +	    strcmp(cntrl->name, "foxconn-t99w760") == 0)

Can we replace this list of strinc comparisons with some kind of device
data, being set in the mhi-pci-generic driver?

>  		return WDS_BIND_MUX_DATA_PORT_MUX_ID;
>  
>  	return 0;
> -- 
> 2.25.1
> 

-- 
With best wishes
Dmitry
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Loic Poulain 1 week, 5 days ago
On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
> > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> > architechture with SDX72/SDX75 chip. So we need to assign initial
> > link id for this device to make sure network available.
> >
> > Signed-off-by: Slark Xiao <slark_xiao@163.com>
> > ---
> >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> > index c814fbd756a1..a142af59a91f 100644
> > --- a/drivers/net/wwan/mhi_wwan_mbim.c
> > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
> >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
> >  {
> >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
> > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
>
> Can we replace this list of strinc comparisons with some kind of device
> data, being set in the mhi-pci-generic driver?

If we move this MBIM-specific information into mhi-pci-generic, we
should consider using a software node (e.g. via
device_add_software_node) so that these properties can be accessed
through the generic device-property API.

Regards,
Loic
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Manivannan Sadhasivam 1 week, 4 days ago
On Wed, Nov 19, 2025 at 02:08:33PM +0100, Loic Poulain wrote:
> On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >
> > On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
> > > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> > > architechture with SDX72/SDX75 chip. So we need to assign initial
> > > link id for this device to make sure network available.
> > >
> > > Signed-off-by: Slark Xiao <slark_xiao@163.com>
> > > ---
> > >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> > > index c814fbd756a1..a142af59a91f 100644
> > > --- a/drivers/net/wwan/mhi_wwan_mbim.c
> > > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> > > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
> > >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
> > >  {
> > >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> > > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
> > > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> > > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
> >
> > Can we replace this list of strinc comparisons with some kind of device
> > data, being set in the mhi-pci-generic driver?
> 
> If we move this MBIM-specific information into mhi-pci-generic, we
> should consider using a software node (e.g. via
> device_add_software_node) so that these properties can be accessed
> through the generic device-property API.
> 

MHI has to business in dealing with MBIM specific information as we already
concluded. So it should be handled within the WWAN subsystem.

- Mani

-- 
மணிவண்ணன் சதாசிவம்
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Loic Poulain 1 week, 4 days ago
On Thu, Nov 20, 2025 at 6:41 AM Manivannan Sadhasivam <mani@kernel.org> wrote:
>
> On Wed, Nov 19, 2025 at 02:08:33PM +0100, Loic Poulain wrote:
> > On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
> > <dmitry.baryshkov@oss.qualcomm.com> wrote:
> > >
> > > On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
> > > > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> > > > architechture with SDX72/SDX75 chip. So we need to assign initial
> > > > link id for this device to make sure network available.
> > > >
> > > > Signed-off-by: Slark Xiao <slark_xiao@163.com>
> > > > ---
> > > >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> > > > index c814fbd756a1..a142af59a91f 100644
> > > > --- a/drivers/net/wwan/mhi_wwan_mbim.c
> > > > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> > > > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
> > > >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
> > > >  {
> > > >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> > > > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
> > > > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> > > > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
> > >
> > > Can we replace this list of strinc comparisons with some kind of device
> > > data, being set in the mhi-pci-generic driver?
> >
> > If we move this MBIM-specific information into mhi-pci-generic, we
> > should consider using a software node (e.g. via
> > device_add_software_node) so that these properties can be accessed
> > through the generic device-property API.
> >
>
> MHI has to business in dealing with MBIM specific information as we already
> concluded. So it should be handled within the WWAN subsystem.

it doesn’t make sense to include MBIM-specific fields in a generic MHI
structure. However, attaching fwnode properties could be reasonable
since the MHI PCI driver is responsible for device enumeration, and
that would keep device model specific handling fully covered in that
driver.

It’s fine to keep device-specific handling within WWAN/MBIM. However,
next time, please introduce a dedicated device data structure for the
mux-id instead of adding another strcmp.

Regards,
Loic
Re:Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Slark Xiao 1 week, 4 days ago
At 2025-11-20 15:44:14, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote:
>On Thu, Nov 20, 2025 at 6:41 AM Manivannan Sadhasivam <mani@kernel.org> wrote:
>>
>> On Wed, Nov 19, 2025 at 02:08:33PM +0100, Loic Poulain wrote:
>> > On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
>> > <dmitry.baryshkov@oss.qualcomm.com> wrote:
>> > >
>> > > On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
>> > > > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
>> > > > architechture with SDX72/SDX75 chip. So we need to assign initial
>> > > > link id for this device to make sure network available.
>> > > >
>> > > > Signed-off-by: Slark Xiao <slark_xiao@163.com>
>> > > > ---
>> > > >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
>> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
>> > > >
>> > > > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>> > > > index c814fbd756a1..a142af59a91f 100644
>> > > > --- a/drivers/net/wwan/mhi_wwan_mbim.c
>> > > > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>> > > > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
>> > > >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
>> > > >  {
>> > > >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
>> > > > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
>> > > > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
>> > > > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
>> > >
>> > > Can we replace this list of strinc comparisons with some kind of device
>> > > data, being set in the mhi-pci-generic driver?
>> >
>> > If we move this MBIM-specific information into mhi-pci-generic, we
>> > should consider using a software node (e.g. via
>> > device_add_software_node) so that these properties can be accessed
>> > through the generic device-property API.
>> >
>>
>> MHI has to business in dealing with MBIM specific information as we already
>> concluded. So it should be handled within the WWAN subsystem.
>
>it doesn’t make sense to include MBIM-specific fields in a generic MHI
>structure. However, attaching fwnode properties could be reasonable
>since the MHI PCI driver is responsible for device enumeration, and
>that would keep device model specific handling fully covered in that
>driver.
>
>It’s fine to keep device-specific handling within WWAN/MBIM. However,
>next time, please introduce a dedicated device data structure for the
>mux-id instead of adding another strcmp.
>
Hi Loic,
So you answer is yes for this time. I appreciate it very much.
And I will commit another patch for fixing the name "t99w515" to 
"t99w640". I have updated it in mhi side in 2025/6.But I forgot to 
sync in MBIM side. Please refer to: 
https://lore.kernel.org/all/20250606095019.383992-1-slark_xiao@163.com/
Hope that commit won't break your decision.

To avoid such mismatch issue, I agree to use a new mechanism to
make it more convenient.
Currently, it seems only SDX75/SDX35 MBIM solution have this issue.
For whole MHI support products, only Foxconn fell into this trap.
So I hope community could help this for the new design.

Thanks
Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Dmitry Baryshkov 1 week, 5 days ago
On Wed, Nov 19, 2025 at 02:08:33PM +0100, Loic Poulain wrote:
> On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >
> > On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
> > > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
> > > architechture with SDX72/SDX75 chip. So we need to assign initial
> > > link id for this device to make sure network available.
> > >
> > > Signed-off-by: Slark Xiao <slark_xiao@163.com>
> > > ---
> > >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> > > index c814fbd756a1..a142af59a91f 100644
> > > --- a/drivers/net/wwan/mhi_wwan_mbim.c
> > > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> > > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
> > >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
> > >  {
> > >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
> > > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
> > > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
> > > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
> >
> > Can we replace this list of strinc comparisons with some kind of device
> > data, being set in the mhi-pci-generic driver?
> 
> If we move this MBIM-specific information into mhi-pci-generic, we
> should consider using a software node (e.g. via
> device_add_software_node) so that these properties can be accessed
> through the generic device-property API.

Works for me too.

-- 
With best wishes
Dmitry
Re:Re: [PATCH v3 2/2] net: wwan: mhi: Add network support for Foxconn T99W760
Posted by Slark Xiao 1 week, 4 days ago
At 2025-11-19 21:47:33, "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com> wrote:
>On Wed, Nov 19, 2025 at 02:08:33PM +0100, Loic Poulain wrote:
>> On Wed, Nov 19, 2025 at 12:27 PM Dmitry Baryshkov
>> <dmitry.baryshkov@oss.qualcomm.com> wrote:
>> >
>> > On Wed, Nov 19, 2025 at 06:56:15PM +0800, Slark Xiao wrote:
>> > > T99W760 is designed based on Qualcomm SDX35 chip. It use similar
>> > > architechture with SDX72/SDX75 chip. So we need to assign initial
>> > > link id for this device to make sure network available.
>> > >
>> > > Signed-off-by: Slark Xiao <slark_xiao@163.com>
>> > > ---
>> > >  drivers/net/wwan/mhi_wwan_mbim.c | 3 ++-
>> > >  1 file changed, 2 insertions(+), 1 deletion(-)
>> > >
>> > > diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>> > > index c814fbd756a1..a142af59a91f 100644
>> > > --- a/drivers/net/wwan/mhi_wwan_mbim.c
>> > > +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>> > > @@ -98,7 +98,8 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
>> > >  static int mhi_mbim_get_link_mux_id(struct mhi_controller *cntrl)
>> > >  {
>> > >       if (strcmp(cntrl->name, "foxconn-dw5934e") == 0 ||
>> > > -         strcmp(cntrl->name, "foxconn-t99w515") == 0)
>> > > +         strcmp(cntrl->name, "foxconn-t99w515") == 0 ||
>> > > +         strcmp(cntrl->name, "foxconn-t99w760") == 0)
>> >
>> > Can we replace this list of strinc comparisons with some kind of device
>> > data, being set in the mhi-pci-generic driver?
>> 
>> If we move this MBIM-specific information into mhi-pci-generic, we
>> should consider using a software node (e.g. via
>> device_add_software_node) so that these properties can be accessed
>> through the generic device-property API.
>
Hi Loic,
The original solution is we defined this mux_id in mhi-pci-generic side and 
transfer it to MBIM side. But it is rejected in last year.
Why we move it back again?

>Works for me too.
>
>-- 
>With best wishes
>Dmitry