Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread Bjørn Mork
matthew stanger  writes:

>>
>> Forgot to comment on this. They use a SIMCom SIM7100E or SIM7100A WWAN
>> module according to
>> https://developer.puri.sm/Librem5/Hardware_Reference.html
>
> Oh that's new, they where going to use the PLS8 with PCIe. That's what got
> my attention.

That's also a MDM9215 module with USB 2.0 AFAICT


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread matthew stanger
>
> Forgot to comment on this. They use a SIMCom SIM7100E or SIM7100A WWAN
> module according to
> https://developer.puri.sm/Librem5/Hardware_Reference.html

Oh that's new, they where going to use the PLS8 with PCIe. That's what got
my attention.

On Fri, Mar 15, 2019 at 10:04 AM Bjørn Mork  wrote:

> matthew stanger  writes:
>
>
> > I thought
> > the (Librem 5 Linux Phone) ( https://puri.sm/products/librem-5/  )  was
> > already using MM with PCIe?  I know that's their plan.
>
> Forgot to comment on this. They use a SIMCom SIM7100E or SIM7100A WWAN
> module according to
> https://developer.puri.sm/Librem5/Hardware_Reference.html
>
> This module is based on the MDM9215 and has a USB 2.0 interface to the
> host, supported by the qmi_wwan driver.
>
>
> Bjørn
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread Bjørn Mork
matthew stanger  writes:


> I thought
> the (Librem 5 Linux Phone) ( https://puri.sm/products/librem-5/  )  was
> already using MM with PCIe?  I know that's their plan.

Forgot to comment on this. They use a SIMCom SIM7100E or SIM7100A WWAN
module according to
https://developer.puri.sm/Librem5/Hardware_Reference.html

This module is based on the MDM9215 and has a USB 2.0 interface to the
host, supported by the qmi_wwan driver.


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread Bjørn Mork
matthew stanger  writes:

> Is this thread implying the MM doesn't support PCIe in general?

No.  Only that kernel drivers are required.

The situation for USB devices is good because there are only a few
host<->device protocols in use, and those protocols are well known by
now.  We even have a USB-IF class protocol, MBIM, which is used by a
large number of devices thanks to Microsoft making it mandatory for
Windows certification.

The situation for PCI is quite different.  AFAIK, there are no modern
PCIe modems using a documented protocol.  And unfortunately some modem
chipset vendors have found a way around the Microsoft requirement by
letting a Windows specific PCIe driver create a virtual USB MBIM device.


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread matthew stanger
Is this thread implying the MM doesn't support PCIe in general? I thought
the (Librem 5 Linux Phone) ( https://puri.sm/products/librem-5/  )  was
already using MM with PCIe?  I know that's their plan.

On Fri, Mar 15, 2019 at 4:01 AM Bjørn Mork  wrote:

> 王道之  writes:
>
> > Intel have the plan to opensource the PCIe driver.  I would put it here
> > once the Intel opensource it.
>
> Looking forward to that!
>
>
> Bjørn
> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread Bjørn Mork
王道之  writes:

> Intel have the plan to opensource the PCIe driver.  I would put it here
> once the Intel opensource it.

Looking forward to that!


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread 王道之
Intel have the plan to opensource the PCIe driver.  I would put it here
once the Intel opensource it.
But the driver do not offer a cdc_mbim port, just offer AT port. In MM, it
would manage with the base modem. And the VLAN ID map is defined by Intel,
so I do not think the driver could be use in other modem chips.
As the link that Daniele put shows, MHI seems like a usual solution.

Bjørn Mork  于2019年3月15日周五 下午4:28写道:

> Now you made me really curious. That sounds a lot like the cdc_mbim
> userspace ABI. And I didn't expect anyone to copy that since I don't think
> anyone is happy with it. Including me.
>
> Or are they simply creating a usb mbim device? That would make sense. But
> then it should have worked with mm, so I guess not...
>
>
> Bjørn
>
> On March 15, 2019 8:59:04 AM GMT+01:00, "王道之" 
> wrote:
> >Hey
> >The Intel offer a PCIe device driver to suit my situation. The driver
> >could
> >grab a virtual net port from the PCIe modem, then the user like me
> >could
> >use VLAN to divide the virtual net port in several VLAN ports, the VLAN
> >port can be mapped by socat as AT port and trace port. The map is
> >defined
> >by Intel.
> >But the MM could not add those virtual AT ports and virtual net port.
> >To do
> >that, I change some filter logic that would not influence the
> >architecture
> >now in use. And I add two UDEV flag to set the  subsystem and port name
> >of
> >the virtual ports, flags named ID_MM_VIRTUAL_SUBSYSTEMS and
> >ID_MM_VIRTUAL_NAME, the way that the two new flags work just like the
> >already existing UDE flag D_MM_PHYSDEV_UID did. In this way, the MM
> >would
> >support modem devices with virtual ports.
> >
> >Bjørn Mork  于2019年3月9日周六 下午8:09写道:
> >
> >> Daniele Palmas  writes:
> >> > Il giorno lun 10 dic 2018 alle ore 14:25 Bjørn Mork 
> >ha
> >> scritto:
> >> >>
> >> >> As for Qualcomm based modems:  Haven't yet seen any docs for the
> >PCIe
> >> >> interface there either.  So I'll assume it is similar to the Intel
> >one.
> >> >
> >> > related to Qualcomm I guess this development
> >> >
> >> >
> >>
> >
> http://archive.lwn.net:8080/linux-kernel/1524795811-21399-1-git-send-email-sd...@codeaurora.org/
> >> >
> >> > should be related, but unfortunately it seems that the attempt for
> >> > upstream inclusion stopped.
> >>
> >> Thanks for the pointer!  Really interesting and encouraging.
> >>
> >>
> >> Bjørn
> >>
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread Bjørn Mork
Now you made me really curious. That sounds a lot like the cdc_mbim userspace 
ABI. And I didn't expect anyone to copy that since I don't think anyone is 
happy with it. Including me.

Or are they simply creating a usb mbim device? That would make sense. But then 
it should have worked with mm, so I guess not...


Bjørn 

On March 15, 2019 8:59:04 AM GMT+01:00, "王道之"  wrote:
>Hey
>The Intel offer a PCIe device driver to suit my situation. The driver
>could
>grab a virtual net port from the PCIe modem, then the user like me
>could
>use VLAN to divide the virtual net port in several VLAN ports, the VLAN
>port can be mapped by socat as AT port and trace port. The map is
>defined
>by Intel.
>But the MM could not add those virtual AT ports and virtual net port.
>To do
>that, I change some filter logic that would not influence the
>architecture
>now in use. And I add two UDEV flag to set the  subsystem and port name
>of
>the virtual ports, flags named ID_MM_VIRTUAL_SUBSYSTEMS and
>ID_MM_VIRTUAL_NAME, the way that the two new flags work just like the
>already existing UDE flag D_MM_PHYSDEV_UID did. In this way, the MM
>would
>support modem devices with virtual ports.
>
>Bjørn Mork  于2019年3月9日周六 下午8:09写道:
>
>> Daniele Palmas  writes:
>> > Il giorno lun 10 dic 2018 alle ore 14:25 Bjørn Mork 
>ha
>> scritto:
>> >>
>> >> As for Qualcomm based modems:  Haven't yet seen any docs for the
>PCIe
>> >> interface there either.  So I'll assume it is similar to the Intel
>one.
>> >
>> > related to Qualcomm I guess this development
>> >
>> >
>>
>http://archive.lwn.net:8080/linux-kernel/1524795811-21399-1-git-send-email-sd...@codeaurora.org/
>> >
>> > should be related, but unfortunately it seems that the attempt for
>> > upstream inclusion stopped.
>>
>> Thanks for the pointer!  Really interesting and encouraging.
>>
>>
>> Bjørn
>>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-15 Thread 王道之
Hey
The Intel offer a PCIe device driver to suit my situation. The driver could
grab a virtual net port from the PCIe modem, then the user like me could
use VLAN to divide the virtual net port in several VLAN ports, the VLAN
port can be mapped by socat as AT port and trace port. The map is defined
by Intel.
But the MM could not add those virtual AT ports and virtual net port. To do
that, I change some filter logic that would not influence the architecture
now in use. And I add two UDEV flag to set the  subsystem and port name of
the virtual ports, flags named ID_MM_VIRTUAL_SUBSYSTEMS and
ID_MM_VIRTUAL_NAME, the way that the two new flags work just like the
already existing UDE flag D_MM_PHYSDEV_UID did. In this way, the MM would
support modem devices with virtual ports.

Bjørn Mork  于2019年3月9日周六 下午8:09写道:

> Daniele Palmas  writes:
> > Il giorno lun 10 dic 2018 alle ore 14:25 Bjørn Mork  ha
> scritto:
> >>
> >> As for Qualcomm based modems:  Haven't yet seen any docs for the PCIe
> >> interface there either.  So I'll assume it is similar to the Intel one.
> >
> > related to Qualcomm I guess this development
> >
> >
> http://archive.lwn.net:8080/linux-kernel/1524795811-21399-1-git-send-email-sd...@codeaurora.org/
> >
> > should be related, but unfortunately it seems that the attempt for
> > upstream inclusion stopped.
>
> Thanks for the pointer!  Really interesting and encouraging.
>
>
> Bjørn
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-09 Thread Bjørn Mork
Daniele Palmas  writes:
> Il giorno lun 10 dic 2018 alle ore 14:25 Bjørn Mork  ha 
> scritto:
>>
>> As for Qualcomm based modems:  Haven't yet seen any docs for the PCIe
>> interface there either.  So I'll assume it is similar to the Intel one.
>
> related to Qualcomm I guess this development
>
> http://archive.lwn.net:8080/linux-kernel/1524795811-21399-1-git-send-email-sd...@codeaurora.org/
>
> should be related, but unfortunately it seems that the attempt for
> upstream inclusion stopped.

Thanks for the pointer!  Really interesting and encouraging.


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2019-03-08 Thread Daniele Palmas
Hi Bjørn,

Il giorno lun 10 dic 2018 alle ore 14:25 Bjørn Mork  ha scritto:
>
> As for Qualcomm based modems:  Haven't yet seen any docs for the PCIe
> interface there either.  So I'll assume it is similar to the Intel one.

related to Qualcomm I guess this development

http://archive.lwn.net:8080/linux-kernel/1524795811-21399-1-git-send-email-sd...@codeaurora.org/

should be related, but unfortunately it seems that the attempt for
upstream inclusion stopped.

Regards,
Daniele
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: Planning to add a PCIe(not in USB protocol) device

2018-12-11 Thread Bjørn Mork
I believe we would be best off with a "fake" USB MBIM device, like the
Windows driver creates.  This would ensure immediate support in
ModemManager, as well as other Linux userspace implementations (oFono,
umbim etc).

There is already an NCM gadget in the kernel.  Creating a basic MBIM
gadget should not be too hard (maybe it already exists out of mainline
somewhere?).. And this would be reusable code for any PCIe or shared
memory or SPI or whatever modem.  The dummy_hcd driver will then let you
use this gadget on the local host without any USB device controller
hardware, creating a new USB bus with this MBIM device.

But a layered implemetation does makes most sense IMHO. So having a PCIe
driver exposing the modem data and control channels directly would be a
good start.  The MBIM gadget hook API into this driver should be as
generic as possible.

Lots of strong opinions and little code.  That's all I've got to offer,
I'm afraid :-)  As usual, the decision is in the hands of the
implementor. 



Bjørn

王道之  writes:

>  Yes, as Ben said the PCIe on L860 seems going backward. But on the
> laptop side, when the laptop use L850,  the latpop would use PCIe when the
> OS is Windows, but the laptop would use MBIM when the OS is Unix. In this
> reason, the laptop vendor want to use PCIe no matter the OS is.
>  And once the PCIe is supported, other labtop vendors basic on Intle
> platform would come to use it. You know the Intel FAE do not support the
> MBIM device problem. Personally, I think MBIM is better, but consider the
> users of Intel platform, the support for PCIe seems important too.
>  Any advice about the plan or develop are welcome.
>
> Cheers!
> Quincy Chen
>
> Ben Chan  于2018年12月11日周二 下午1:16写道:
>
>> I wonder why MBIM-enumerated-over-PCIe (L860) is preferred over
>> MBIM-over-USB3 (L850). Perhaps the theoretical achievable data rate
>> over PCIe?
>>
>> Despite the MBIM enumeration, having a vendor specific host interface
>> does feel going backward as Bjørn said.  IMHO, the industry should
>> really move towards standard interface protocols like MBIM instead of
>> legacy protocols like AT, or worse, proprietary protocols.  On
>> Chromium OS, we don't even install the fibocom plugin but simply rely
>> on the generic plugin with MBIM to support L850 :)
>>
>> - Ben
>>
>> On Mon, Dec 10, 2018 at 6:25 PM 王道之  wrote:
>> >
>> > Hey Aleksander
>> >  The device is basic on the Intel 7560 chip, or L860 in fibocom that
>> difference the L850 with PCIe in MBIM protocol.
>> >  I am not sure there need a PCIe lib or yet, as now I can use lspci
>> found the device, and there is a net port with the drive offered by Intel.
>> And the drive would be open source later time.
>> >  You add the device L850 of Fibocom in the ModemManager early time,
>> and now the Fibocom want to add the L860 by itself, and I work for Fibocom.
>> So I am going to add a PCIe L860 in the ModemManager.
>> > As I planned, I am going to add the L860 in the plugin, then init
>> the device ports(this may need a lib?), then init the modem with AT commd.
>> >  About the L860 there is a net port, divided in several ports by
>> VLAN id. Here is some description:
>> >  The host driver maps each channel exposed by the modem to an
>> interface for application to exercise communication over such channels. For
>> network devices, each IP session  (0  to 7) is mapped to INM network
>> interfaces (INM0 to INM7). Thus "/PCIE/IOSM/IPS/0" will be mapped to INM0,
>> "/PCIE/IOSM/IPS/1" will be mapped to "/PCIE/IOSM/IPS/1" and so on.
>> Similarly, "/PCIE/IOSM/CTRL/0" is mapped to RPC device,
>> "/PCIE/IOSM/TRACE/0" to trace, "/PCIE/IOSM/CTRL/0" and "/PCIE/IOSM/CTRL/2"
>> to IAT devices and so  on. These  are  internals to PCIe communication and
>> are transparent  to user-space application.
>> >
>> > The IOSM host driver exposes the interfaces as a VLAN devices (except
>> for  flashing  device). Following table lists the interfaces  exposed  by
>> the host driver. Please  note  that,  not every interface is supported by
>> the modem. The host driver allows opening of  an  interface only if it is
>> supported on the modem side.
>> >
>> >
>> > Cheers!
>> >
>> > Quincy Chen
>> >
>> >
>> > Aleksander Morgado  于2018年12月10日周一 下午4:54写道:
>> >>
>> >> Hey,
>> >>
>> >> > I am going to add a PCIe not in USB protocol modem device in the
>> Modemmanager. In order to better integrate into the current architecture of
>> Modemmanager, any development advice?
>> >> > As I planned, I am going to add the new PCIe device in the
>> plugins folder,but I am not sure where to add the PCIe lib just like the
>> libqmi or the libmbim.
>> >> > By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)
>> at the device "Option GT 3G+ EMEA" in the supported devices list , Is  that
>> mean the device use the PCI protocol? If in that way, I can refer to when I
>> develop.
>> >> >
>> >>
>> >> Is this PCIe library a new one that you're writing?

Re: Planning to add a PCIe(not in USB protocol) device

2018-12-11 Thread 王道之
 Yes, as Ben said the PCIe on L860 seems going backward. But on the
laptop side, when the laptop use L850,  the latpop would use PCIe when the
OS is Windows, but the laptop would use MBIM when the OS is Unix. In this
reason, the laptop vendor want to use PCIe no matter the OS is.
 And once the PCIe is supported, other labtop vendors basic on Intle
platform would come to use it. You know the Intel FAE do not support the
MBIM device problem. Personally, I think MBIM is better, but consider the
users of Intel platform, the support for PCIe seems important too.
 Any advice about the plan or develop are welcome.

Cheers!
Quincy Chen

Ben Chan  于2018年12月11日周二 下午1:16写道:

> I wonder why MBIM-enumerated-over-PCIe (L860) is preferred over
> MBIM-over-USB3 (L850). Perhaps the theoretical achievable data rate
> over PCIe?
>
> Despite the MBIM enumeration, having a vendor specific host interface
> does feel going backward as Bjørn said.  IMHO, the industry should
> really move towards standard interface protocols like MBIM instead of
> legacy protocols like AT, or worse, proprietary protocols.  On
> Chromium OS, we don't even install the fibocom plugin but simply rely
> on the generic plugin with MBIM to support L850 :)
>
> - Ben
>
> On Mon, Dec 10, 2018 at 6:25 PM 王道之  wrote:
> >
> > Hey Aleksander
> >  The device is basic on the Intel 7560 chip, or L860 in fibocom that
> difference the L850 with PCIe in MBIM protocol.
> >  I am not sure there need a PCIe lib or yet, as now I can use lspci
> found the device, and there is a net port with the drive offered by Intel.
> And the drive would be open source later time.
> >  You add the device L850 of Fibocom in the ModemManager early time,
> and now the Fibocom want to add the L860 by itself, and I work for Fibocom.
> So I am going to add a PCIe L860 in the ModemManager.
> > As I planned, I am going to add the L860 in the plugin, then init
> the device ports(this may need a lib?), then init the modem with AT commd.
> >  About the L860 there is a net port, divided in several ports by
> VLAN id. Here is some description:
> >  The host driver maps each channel exposed by the modem to an
> interface for application to exercise communication over such channels. For
> network devices, each IP session  (0  to 7) is mapped to INM network
> interfaces (INM0 to INM7). Thus "/PCIE/IOSM/IPS/0" will be mapped to INM0,
> "/PCIE/IOSM/IPS/1" will be mapped to "/PCIE/IOSM/IPS/1" and so on.
> Similarly, "/PCIE/IOSM/CTRL/0" is mapped to RPC device,
> "/PCIE/IOSM/TRACE/0" to trace, "/PCIE/IOSM/CTRL/0" and "/PCIE/IOSM/CTRL/2"
> to IAT devices and so  on. These  are  internals to PCIe communication and
> are transparent  to user-space application.
> >
> > The IOSM host driver exposes the interfaces as a VLAN devices (except
> for  flashing  device). Following table lists the interfaces  exposed  by
> the host driver. Please  note  that,  not every interface is supported by
> the modem. The host driver allows opening of  an  interface only if it is
> supported on the modem side.
> >
> >
> > Cheers!
> >
> > Quincy Chen
> >
> >
> > Aleksander Morgado  于2018年12月10日周一 下午4:54写道:
> >>
> >> Hey,
> >>
> >> > I am going to add a PCIe not in USB protocol modem device in the
> Modemmanager. In order to better integrate into the current architecture of
> Modemmanager, any development advice?
> >> > As I planned, I am going to add the new PCIe device in the
> plugins folder,but I am not sure where to add the PCIe lib just like the
> libqmi or the libmbim.
> >> > By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)
> at the device "Option GT 3G+ EMEA" in the supported devices list , Is  that
> mean the device use the PCI protocol? If in that way, I can refer to when I
> develop.
> >> >
> >>
> >> Is this PCIe library a new one that you're writing?
> >> What device is this?
> >>
> >> Cheers!
> >>
> >> --
> >> Aleksander
> >> https://aleksander.es
> >
> > ___
> > ModemManager-devel mailing list
> > ModemManager-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread Ben Chan
I wonder why MBIM-enumerated-over-PCIe (L860) is preferred over
MBIM-over-USB3 (L850). Perhaps the theoretical achievable data rate
over PCIe?

Despite the MBIM enumeration, having a vendor specific host interface
does feel going backward as Bjørn said.  IMHO, the industry should
really move towards standard interface protocols like MBIM instead of
legacy protocols like AT, or worse, proprietary protocols.  On
Chromium OS, we don't even install the fibocom plugin but simply rely
on the generic plugin with MBIM to support L850 :)

- Ben

On Mon, Dec 10, 2018 at 6:25 PM 王道之  wrote:
>
> Hey Aleksander
>  The device is basic on the Intel 7560 chip, or L860 in fibocom that 
> difference the L850 with PCIe in MBIM protocol.
>  I am not sure there need a PCIe lib or yet, as now I can use lspci found 
> the device, and there is a net port with the drive offered by Intel. And the 
> drive would be open source later time.
>  You add the device L850 of Fibocom in the ModemManager early time, and 
> now the Fibocom want to add the L860 by itself, and I work for Fibocom. So I 
> am going to add a PCIe L860 in the ModemManager.
> As I planned, I am going to add the L860 in the plugin, then init the 
> device ports(this may need a lib?), then init the modem with AT commd.
>  About the L860 there is a net port, divided in several ports by VLAN id. 
> Here is some description:
>  The host driver maps each channel exposed by the modem to an interface 
> for application to exercise communication over such channels. For network 
> devices, each IP session  (0  to 7) is mapped to INM network interfaces (INM0 
> to INM7). Thus "/PCIE/IOSM/IPS/0" will be mapped to INM0, "/PCIE/IOSM/IPS/1" 
> will be mapped to "/PCIE/IOSM/IPS/1" and so on. Similarly, 
> "/PCIE/IOSM/CTRL/0" is mapped to RPC device, "/PCIE/IOSM/TRACE/0" to trace, 
> "/PCIE/IOSM/CTRL/0" and "/PCIE/IOSM/CTRL/2" to IAT devices and so  on. These  
> are  internals to PCIe communication and are transparent  to user-space 
> application.
>
> The IOSM host driver exposes the interfaces as a VLAN devices (except  for  
> flashing  device). Following table lists the interfaces  exposed  by  the 
> host driver. Please  note  that,  not every interface is supported by the 
> modem. The host driver allows opening of  an  interface only if it is 
> supported on the modem side.
>
>
> Cheers!
>
> Quincy Chen
>
>
> Aleksander Morgado  于2018年12月10日周一 下午4:54写道:
>>
>> Hey,
>>
>> > I am going to add a PCIe not in USB protocol modem device in the 
>> > Modemmanager. In order to better integrate into the current architecture 
>> > of Modemmanager, any development advice?
>> > As I planned, I am going to add the new PCIe device in the plugins 
>> > folder,but I am not sure where to add the PCIe lib just like the libqmi or 
>> > the libmbim.
>> > By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)  at 
>> > the device "Option GT 3G+ EMEA" in the supported devices list , Is  that 
>> > mean the device use the PCI protocol? If in that way, I can refer to when 
>> > I develop.
>> >
>>
>> Is this PCIe library a new one that you're writing?
>> What device is this?
>>
>> Cheers!
>>
>> --
>> Aleksander
>> https://aleksander.es
>
> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread 王道之
Hey Aleksander
 The device is basic on the Intel 7560 chip, or L860 in fibocom that
difference the L850 with PCIe in MBIM protocol.
 I am not sure there need a PCIe lib or yet, as now I can use lspci
found the device, and there is a net port with the drive offered by Intel.
And the drive would be open source later time.
 You add the device L850 of Fibocom in the ModemManager early time, and
now the Fibocom want to add the L860 by itself, and I work for Fibocom. So
I am going to add a PCIe L860 in the ModemManager.
As I planned, I am going to add the L860 in the plugin, then init the
device ports(this may need a lib?), then init the modem with AT commd.
 About the L860 there is a net port, divided in several ports by VLAN
id. Here is some description:
 *The host driver maps each channel exposed by the modem to an
interface for application to exercise communication over such channels. For
network devices, each IP session  (0  to 7) is mapped to INM network
interfaces (INM0 to INM7). Thus "/PCIE/IOSM/IPS/0" will be mapped to INM0,
"/PCIE/IOSM/IPS/1" will be mapped to "/PCIE/IOSM/IPS/1" and so on.
Similarly, "/PCIE/IOSM/CTRL/0" is mapped to RPC device,
"/PCIE/IOSM/TRACE/0" to trace, "/PCIE/IOSM/CTRL/0" and "/PCIE/IOSM/CTRL/2"
to IAT devices and so  on. These  are  internals to PCIe communication and
are transparent  to user-space application.*

*The IOSM host driver exposes the interfaces as a VLAN devices (except
for  flashing  device). Following table lists the interfaces  exposed  by
the host driver. Please  note  that,  not every interface is supported by
the modem. The host driver allows opening of  an  interface only if it is
supported on the modem side.*


Cheers!

Quincy Chen

Aleksander Morgado  于2018年12月10日周一 下午4:54写道:

> Hey,
>
> > I am going to add a PCIe not in USB protocol modem device in the
> Modemmanager. In order to better integrate into the current architecture of
> Modemmanager, any development advice?
> > As I planned, I am going to add the new PCIe device in the plugins
> folder,but I am not sure where to add the PCIe lib just like the libqmi or
> the libmbim.
> > By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)  at
> the device "Option GT 3G+ EMEA" in the supported devices list , Is  that
> mean the device use the PCI protocol? If in that way, I can refer to when I
> develop.
> >
>
> Is this PCIe library a new one that you're writing?
> What device is this?
>
> Cheers!
>
> --
> Aleksander
> https://aleksander.es
>
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread Bjørn Mork
王道之  writes:

> By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)  at the
> device "Option GT 3G+ EMEA" in the supported devices list , Is  that mean
> the device use the PCI protocol? If in that way, I can refer to when I
> develop.

Don't know anything about this card. But looking at the driver, it
appears to be a serial device from the time Cardbus was the only way you
could add a semi-internal plugin module to a laptop.  And Cardbus means
PCI interface only.

If you are thinking about support for modern LTE modems with PCIe
interface, then I doubt the nozomi driver is relevant at all.  But do
look at the driver [1] and decide for yourself.

FWIW, I took a brief look at the Windows PCI driver for the Fibocom
L850-GL and it does not look promising at all.  I was hoping that the
PCIe interface was something we could recognize as a USB controller, but
it is not.  Or at least it is not recognizable to me.  Instead the
driver uses the Windows UDE enviroment [2] to emulate a USB MBIM device.
And looking closer at the driver, it appears to emulate absolutely every
aspect of the device, without offloading much at all (if anything) to
the firmware.

Some of the functions found in the driver (using strings - I don't
decompile stuff like this :-):

MbimSendEncapsulateHandler
MbimGetEncapsulateHandler
MbimQueueReadRequest
MbimHandleReadRequest
MbimInitializeRingBuffers
MbimFreeRingBuffers
MbimReadIoCb
MbimWriteIoCb
MbimInterruptRequestHandler
UrbEvtInterruptRequest
UrbEvtBulkOutRequest
UrbCompleteRequest
UrbEvtControlRequestStop
UrbEvtInterruptRequestStop
UrbEvtBulkInRequestStop
UrbEvtBulkOutRequestStop
UrbEvtBulkOutRequestCancel
UrbForwardPendingRequestsToIpc
UsbReadDescriptorsAndPlugIn
UsbDisconnectAll
UsbDisconnect
_UsbEndpointReset
UsbDeviceEvtDefaultEndpointAdd
SetupUsbEndpoint
UsbDeviceEvtEndpointAdd
UsbDeviceEvtEndpointsConfigure
UsbDeviceEvtWdfDeviceQueryUsbCapability
UsbDeviceEvtLinkPowerEntry
UsbDeviceEvtLinkPowerExit
UsbDeviceEvtSetFunctionSuspendAndWake
ReleaseUtaFunction
ReleaseMbimFunction
ReleaseUsbDevice
ReleaseUsbFunction
SetupUsbDeviceFunctions
AllocateUsbDeviceContext
SetupUsbDevice
UdeRetrieveControlQueue
RetrieveUsbFnContextFromInterfaceId
RetrieveUsbFnContextFromEndpoint
CdcBulkInRequestHandler
CdcBulkOutRequestHandler
UsbGetDescriptorHandler
UsbDeviceStandardRequestHandler
UsbGetDeviceVendorDescriptorHandler
UsbInterfaceStandardRequestHandler
UsbInterfaceVendorRequestHandler
UsbEndpointStandardRequestHandler
UsbEndpointVendorRequestHandler
UsbDeviceVendorRequestHandler
CdcControlRequestHandler
CdcInterruptRequestHandler
CdcCompleteRequestFromPassiveWorkItem
CdcInterruptCompletedCb
CdcResponseAvailableCb
CdcControlCompletedCb
AcmSendEncapsulateHandler


Implementing something similar in Linux without using the code from
Intel is going to be a lot of hard work.  And it's not going to be an
easy task if you have to reverse engineer the firmware API too. Which it
seems we have to, given Intels complete silence on the docs topic...

Note that there isn't any "UDE" API in Linux yet.  But that's the
smallest problem here.  Adding one based on code from the USB-over-IP
and/or dummy hcd-driver is easy compared to the remaining tasks.

As for Qualcomm based modems:  Haven't yet seen any docs for the PCIe
interface there either.  So I'll assume it is similar to the Intel one.
But that does of course not mean that the firmware APIs will be anything
close to similar. These PCIe interfaces makes the modem host interfaces
completely proprietary again, and we're back to the state before
Microsoft made MBIM mandatory.

Still curious about what you are planning to support, though.  And what
kind of backing you have from modem chipset vendors. So please keep us
updated with as much info as you are allowed to share.


Bjørn

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/nozomi.c
[2] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/developing-windows-drivers-for-emulated-usb-host-controllers-and-devices
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread Aleksander Morgado
Hey,

> I am going to add a PCIe not in USB protocol modem device in the 
> Modemmanager. In order to better integrate into the current architecture of 
> Modemmanager, any development advice?
> As I planned, I am going to add the new PCIe device in the plugins 
> folder,but I am not sure where to add the PCIe lib just like the libqmi or 
> the libmbim.
> By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)  at the 
> device "Option GT 3G+ EMEA" in the supported devices list , Is  that mean the 
> device use the PCI protocol? If in that way, I can refer to when I develop.
>

Is this PCIe library a new one that you're writing?
What device is this?

Cheers!

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread 王道之
Hey all
I am going to add a PCIe not in USB protocol modem device in the
Modemmanager. In order to better integrate into the current architecture of
Modemmanager, any development advice?
As I planned, I am going to add the new PCIe device in
the plugins folder,but I am not sure where to add the PCIe lib just like
the libqmi or the libmbim.
By the way, I found the comment  Nozomi, Card-Bus PCI (not USB)  at the
device "Option GT 3G+ EMEA" in the supported devices list , Is  that mean
the device use the PCI protocol? If in that way, I can refer to when I
develop.

Regargs!
Quincy Chen
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel