Skip to contentSkip to conversation

Add MHI bus support and driver for T99W175 5G modem

PATCH In review Jarvis Jiang 4 participants 6 messages Mar 16, 2021 – Mar 18, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add MHI bus support and driver for T99W175 5G modem

T99W175 using MBIM or RmNet over PCIe interface with MHI protocol support.
Ported from IPQ8072 platform, including MHI, MBIM, RmNet

Supporting below PCI devices:

PCI_DEVICE(0x17cb, 0x0300)
PCI_DEVICE(0x17cb, 0x0301)
PCI_DEVICE(0x17cb, 0x0302)
PCI_DEVICE(0x17cb, 0x0303)
PCI_DEVICE(0x17cb, 0x0304)
PCI_DEVICE(0x17cb, 0x0305)
PCI_DEVICE(0x17cb, 0x0306)
PCI_DEVICE(0x105b, 0xe0ab)
PCI_DEVICE(0x105b, 0xe0b0)
PCI_DEVICE(0x105b, 0xe0b1)
PCI_DEVICE(0x105b, 0xe0b3)
PCI_DEVICE(0x1269, 0x00b3)
PCI_DEVICE(0x03f0, 0x0a6c)

---
 MAINTAINERS                                   |   16 +
 drivers/bus/Kconfig                           |    1 +
 drivers/bus/Makefile                          |    3 +
 drivers/bus/mhi/Kconfig                       |   27 +
 drivers/bus/mhi/Makefile                      |    9 +
 drivers/bus/mhi/controllers/Kconfig           |   13 +
 drivers/bus/mhi/controllers/Makefile          |    2 +
 drivers/bus/mhi/controllers/mhi_arch_qti.c    |  275 ++
 drivers/bus/mhi/controllers/mhi_qti.c         |  970 +++++++
 drivers/bus/mhi/controllers/mhi_qti.h         |   44 +
 drivers/bus/mhi/core/Makefile                 |    2 +
 drivers/bus/mhi/core/mhi_boot.c               |  590 +++++
 drivers/bus/mhi/core/mhi_dtr.c                |  223 ++
 drivers/bus/mhi/core/mhi_init.c               | 1901 ++++++++++++++
 drivers/bus/mhi/core/mhi_internal.h           |  826 ++++++
 drivers/bus/mhi/core/mhi_main.c               | 2261 +++++++++++++++++
 drivers/bus/mhi/core/mhi_pm.c                 | 1158 +++++++++
 drivers/bus/mhi/devices/Kconfig               |   43 +
 drivers/bus/mhi/devices/Makefile              |    3 +
 drivers/bus/mhi/devices/mhi_netdev.c          | 1830 +++++++++++++
 drivers/bus/mhi/devices/mhi_satellite.c       | 1155 +++++++++
 drivers/bus/mhi/devices/mhi_uci.c             |  802 ++++++
 drivers/net/ethernet/qualcomm/rmnet/Makefile  |    2 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.c    |  131 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.h    |  110 +-
 .../qualcomm/rmnet/rmnet_descriptor.c         | 1225 +++++++++
 .../qualcomm/rmnet/rmnet_descriptor.h         |  152 ++
 .../ethernet/qualcomm/rmnet/rmnet_handlers.c  |  321 ++-
 .../ethernet/qualcomm/rmnet/rmnet_handlers.h  |   27 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_map.h   |  238 +-
 .../qualcomm/rmnet/rmnet_map_command.c        |  304 ++-
 .../ethernet/qualcomm/rmnet/rmnet_map_data.c  | 1029 +++++++-
 .../ethernet/qualcomm/rmnet/rmnet_private.h   |   19 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_trace.h |  250 ++
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   |  101 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h   |   16 +-
 include/linux/ipc_logging.h                   |  291 +++
 include/linux/mhi.h                           |  743 ++++++
 include/linux/mod_devicetable.h               |   22 +-
 include/linux/msm-bus.h                       |  214 ++
 include/linux/msm_pcie.h                      |  173 ++
 include/linux/netdevice.h                     |   18 +-
 include/uapi/linux/if_link.h                  |    4 +
 include/uapi/linux/msm_rmnet.h                |  170 ++
 mm/memblock.c                                 |    2 +
 net/core/dev.c                                |  192 +-
 46 files changed, 17700 insertions(+), 208 deletions(-)
 create mode 100644 drivers/bus/mhi/Kconfig
 create mode 100644 drivers/bus/mhi/Makefile
 create mode 100644 drivers/bus/mhi/controllers/Kconfig
 create mode 100644 drivers/bus/mhi/controllers/Makefile
 create mode 100644 drivers/bus/mhi/controllers/mhi_arch_qti.c
 create mode 100644 drivers/bus/mhi/controllers/mhi_qti.c
 create mode 100644 drivers/bus/mhi/controllers/mhi_qti.h
 create mode 100644 drivers/bus/mhi/core/Makefile
 create mode 100644 drivers/bus/mhi/core/mhi_boot.c
 create mode 100644 drivers/bus/mhi/core/mhi_dtr.c
 create mode 100644 drivers/bus/mhi/core/mhi_init.c
 create mode 100644 drivers/bus/mhi/core/mhi_internal.h
 create mode 100644 drivers/bus/mhi/core/mhi_main.c
 create mode 100644 drivers/bus/mhi/core/mhi_pm.c
 create mode 100644 drivers/bus/mhi/devices/Kconfig
 create mode 100644 drivers/bus/mhi/devices/Makefile
 create mode 100644 drivers/bus/mhi/devices/mhi_netdev.c
 create mode 100644 drivers/bus/mhi/devices/mhi_satellite.c
 create mode 100644 drivers/bus/mhi/devices/mhi_uci.c
 create mode 100644 drivers/net/ethernet/qualcomm/rmnet/rmnet_descriptor.c
 create mode 100644 drivers/net/ethernet/qualcomm/rmnet/rmnet_descriptor.h
 create mode 100644 drivers/net/ethernet/qualcomm/rmnet/rmnet_trace.h
 create mode 100644 include/linux/ipc_logging.h
 create mode 100644 include/linux/mhi.h
 create mode 100644 include/linux/msm-bus.h
 create mode 100644 include/linux/msm_pcie.h
 create mode 100644 include/uapi/linux/msm_rmnet.h
MAINTAINERS +16 -0
index 9d3a5c54a41d..79f61526a4c0 100644
@@ -6413,6 +6413,22 @@ S:	Odd Fixes
 L:	[email protected]
 F:	drivers/block/floppy.c
 
+FOXCONN 5G MODEM DRIVER
+M:	Jarvis Jiang <[email protected]>
+S:	Orphan
+F:	drivers/bus/mhi/
+F:	drivers/net/ethernet/qualcomm/rmnet/
+F:	include/linux/ipc_logging.h
+F:	include/linux/mhi.h
+F:	include/linux/mod_devicetable.h
+F:	include/linux/msm-bus.h
+F:	include/linux/msm_pcie.h
+F:	include/linux/netdevice.h
+F:	include/uapi/linux/if_link.h
+F:	include/uapi/linux/msm_rmnet.h
+F:	mm/memblock.c
+F:	net/core/dev.c
+
 FPGA MANAGER FRAMEWORK
 M:	Moritz Fischer <[email protected]>
 L:	[email protected]
drivers/bus/Kconfig +1 -0
index 6b331061d34b..53a5ae6fd284 100644
@@ -192,5 +192,6 @@ config DA8XX_MSTPRI
 	  peripherals.
 
 source "drivers/bus/fsl-mc/Kconfig"
+source "drivers/bus/mhi/Kconfig"
 
 endmenu
drivers/bus/Makefile +3 -0
index 16b43d3468c6..b5b3e219ba8a 100644
@@ -33,3 +33,6 @@ obj-$(CONFIG_UNIPHIER_SYSTEM_BUS)	+= uniphier-system-bus.o
 obj-$(CONFIG_VEXPRESS_CONFIG)	+= vexpress-config.o
 
 obj-$(CONFIG_DA8XX_MSTPRI)	+= da8xx-mstpri.o
+
+# MHI
+obj-$(CONFIG_MHI_BUS)		+= mhi/
drivers/bus/mhi/Kconfig new file +27 -0
new file mode 100644
index 000000000000..0beaa862e054
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# MHI bus
+#
+# Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
+#
+
+config MHI_BUS
+	tristate "Modem Host Interface (MHI) bus"
+	help
+	  Bus driver for MHI protocol. Modem Host Interface (MHI) is a
+	  communication protocol used by the host processors to control
+	  and communicate with modem devices over a high speed peripheral
+	  bus or shared memory.
+
+config MHI_DEBUG
+	 bool "MHI debug support"
+	 depends on MHI_BUS
+	 help
+	   Say yes here to enable debugging support in the MHI transport
+	   and individual MHI client drivers. This option will impact
+	   throughput as individual MHI packets and state transitions
+	   will be logged.
+
+source "drivers/bus/mhi/controllers/Kconfig"
+source "drivers/bus/mhi/devices/Kconfig"
+
drivers/bus/mhi/Makefile new file +9 -0
new file mode 100644
index 000000000000..eb9a6f62a65e
@@ -0,0 +1,9 @@
+# Makefile for the MHI stack
+#
+
+# core layer
+obj-y += core/
+
+obj-y += controllers/
+obj-y += devices/
+
drivers/bus/mhi/controllers/Kconfig new file +13 -0
new file mode 100644
index 000000000000..e18b38b25e8e
@@ -0,0 +1,13 @@
+menu "MHI controllers"
+
+config MHI_QTI
+       tristate "MHI QTI"
+       depends on MHI_BUS
+       help
+	  If you say yes to this option, MHI bus support for QTI modem chipsets
+	  will be enabled. QTI PCIe based modems uses MHI as the communication
+	  protocol. MHI control driver is the bus master for such modems. As the
+	  bus master driver, it oversees power management operations such as
+	  suspend, resume, powering on and off the device.
+
+endmenu
drivers/bus/mhi/controllers/Makefile new file +2 -0
new file mode 100644
index 000000000000..7a4954861c6a
@@ -0,0 +1,2 @@
+obj-$(CONFIG_MHI_QTI) += mhi_qti_m.o
+mhi_qti_m-y += mhi_qti.o mhi_arch_qti.o
drivers/bus/mhi/controllers/mhi_arch_qti.c new file +275 -0

275 lines not on this page · raw message

drivers/bus/mhi/controllers/mhi_qti.c new file +970 -0

970 lines not on this page · raw message

drivers/bus/mhi/controllers/mhi_qti.h new file +44 -0

44 lines not on this page · raw message

drivers/bus/mhi/core/Makefile new file +2 -0
new file mode 100644
index 000000000000..b1c81f2c9ac0
@@ -0,0 +1,2 @@
+obj-$(CONFIG_MHI_BUS) += mhi.o
+mhi-y := mhi_init.o mhi_main.o mhi_pm.o mhi_boot.o mhi_dtr.o
drivers/bus/mhi/core/mhi_boot.c new file +590 -0

590 lines not on this page · raw message

drivers/bus/mhi/core/mhi_dtr.c new file +223 -0

223 lines not on this page · raw message

drivers/bus/mhi/core/mhi_init.c new file +1901 -0

811 lines not on this page · raw message

drivers/bus/mhi/core/mhi_internal.h new file +826 -0

826 lines not on this page · raw message

drivers/bus/mhi/core/mhi_main.c new file +2261 -0

2,261 lines not on this page · raw message

drivers/bus/mhi/core/mhi_pm.c new file +1158 -0

1,158 lines not on this page · raw message

drivers/bus/mhi/devices/Kconfig new file +43 -0

43 lines not on this page · raw message

drivers/bus/mhi/devices/Makefile new file +3 -0
new file mode 100644
index 000000000000..e720069fd033

Lines of this file are not shown. View the raw message.

drivers/bus/mhi/devices/mhi_netdev.c new file +1830 -0

1,830 lines not on this page · raw message

drivers/bus/mhi/devices/mhi_satellite.c new file +1155 -0

1,155 lines not on this page · raw message

drivers/bus/mhi/devices/mhi_uci.c new file +802 -0

802 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/Makefile +1 -1
index 8252e40bf570..64aec483046a 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +108 -23

131 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +108 -2

110 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_descriptor.c new file +1225 -0

1,225 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_descriptor.h new file +152 -0

152 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +288 -33

321 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.h +24 -3
index c4571dc3239d..c61bbe1543de 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h +233 -5

238 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c +298 -6

304 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c +1007 -22

1,029 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h +18 -1
index e1337f164faa..b31d3a889720 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qualcomm/rmnet/rmnet_trace.h new file +250 -0

250 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +88 -13

101 lines not on this page · raw message

drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h +13 -3
index 54cbaf3c3bc4..5d78d3512ead 100644

Lines of this file are not shown. View the raw message.

include/linux/ipc_logging.h new file +291 -0

291 lines not on this page · raw message

include/linux/mhi.h new file +743 -0

743 lines not on this page · raw message

include/linux/mod_devicetable.h +20 -2
index 5714fd35a83c..eda8e11fabf6 100644

Lines of this file are not shown. View the raw message.

include/linux/msm-bus.h new file +214 -0

214 lines not on this page · raw message

include/linux/msm_pcie.h new file +173 -0

173 lines not on this page · raw message

include/linux/netdevice.h +13 -5
index c20f190b4c18..3602ee3c8039 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/if_link.h +4 -0
index 4a8c02cafa9a..6fa81e2db70f 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/msm_rmnet.h new file +170 -0

170 lines not on this page · raw message

mm/memblock.c +2 -0
index c4b16cae2bc9..ad0312d7fe8e 100644

Lines of this file are not shown. View the raw message.

net/core/dev.c +103 -89

192 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.25.1

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 61 lines · Jarvis Jiang

T99W175 using MBIM or RmNet over PCIe interface with MHI protocol support.
Ported from IPQ8072 platform, including MHI, MBIM, RmNet

Supporting below PCI devices:

PCI_DEVICE(0x17cb, 0x0300)
PCI_DEVICE(0x17cb, 0x0301)
PCI_DEVICE(0x17cb, 0x0302)
PCI_DEVICE(0x17cb, 0x0303)
PCI_DEVICE(0x17cb, 0x0304)
PCI_DEVICE(0x17cb, 0x0305)
PCI_DEVICE(0x17cb, 0x0306)
PCI_DEVICE(0x105b, 0xe0ab)
PCI_DEVICE(0x105b, 0xe0b0)
PCI_DEVICE(0x105b, 0xe0b1)
PCI_DEVICE(0x105b, 0xe0b3)
PCI_DEVICE(0x1269, 0x00b3)
PCI_DEVICE(0x03f0, 0x0a6c)

---
 MAINTAINERS                                   |   16 +
 drivers/bus/Kconfig                           |    1 +
 drivers/bus/Makefile                          |    3 +
 drivers/bus/mhi/Kconfig                       |   27 +
 drivers/bus/mhi/Makefile                      |    9 +
 drivers/bus/mhi/controllers/Kconfig           |   13 +
 drivers/bus/mhi/controllers/Makefile          |    2 +
 drivers/bus/mhi/controllers/mhi_arch_qti.c    |  275 ++
 drivers/bus/mhi/controllers/mhi_qti.c         |  970 +++++++
 drivers/bus/mhi/controllers/mhi_qti.h         |   44 +
 drivers/bus/mhi/core/Makefile                 |    2 +
 drivers/bus/mhi/core/mhi_boot.c               |  590 +++++
 drivers/bus/mhi/core/mhi_dtr.c                |  223 ++
 drivers/bus/mhi/core/mhi_init.c               | 1901 ++++++++++++++
 drivers/bus/mhi/core/mhi_internal.h           |  826 ++++++
 drivers/bus/mhi/core/mhi_main.c               | 2261 +++++++++++++++++
 drivers/bus/mhi/core/mhi_pm.c                 | 1158 +++++++++
 drivers/bus/mhi/devices/Kconfig               |   43 +
 drivers/bus/mhi/devices/Makefile              |    3 +
 drivers/bus/mhi/devices/mhi_netdev.c          | 1830 +++++++++++++
 drivers/bus/mhi/devices/mhi_satellite.c       | 1155 +++++++++
 drivers/bus/mhi/devices/mhi_uci.c             |  802 ++++++
 drivers/net/ethernet/qualcomm/rmnet/Makefile  |    2 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.c    |  131 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.h    |  110 +-
 .../qualcomm/rmnet/rmnet_descriptor.c         | 1225 +++++++++
 .../qualcomm/rmnet/rmnet_descriptor.h         |  152 ++
 .../ethernet/qualcomm/rmnet/rmnet_handlers.c  |  321 ++-
 .../ethernet/qualcomm/rmnet/rmnet_handlers.h  |   27 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_map.h   |  238 +-
 .../qualcomm/rmnet/rmnet_map_command.c        |  304 ++-
 .../ethernet/qualcomm/rmnet/rmnet_map_data.c  | 1029 +++++++-
 .../ethernet/qualcomm/rmnet/rmnet_private.h   |   19 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_trace.h |  250 ++
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   |  101 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h   |   16 +-
 include/linux/ipc_logging.h                   |  291 +++
 include/linux/mhi.h                           |  743 ++++++
 include/linux/mod_devicetable.h               |   22 +-
Quoted 8 lines
 include/linux/msm-bus.h                       |  214 ++
 include/linux/msm_pcie.h                      |  173 ++
 include/linux/netdevice.h                     |   18 +-
 include/uapi/linux/if_link.h                  |    4 +
 include/uapi/linux/msm_rmnet.h                |  170 ++
 mm/memblock.c                                 |    2 +
 net/core/dev.c                                |  192 +-
 46 files changed, 17700 insertions(+), 208 deletions(-)

This is way too much for a single patch. Please split your changes into a series of patches, with one logical change per patch. For instance, you can start with adding skeleton infrastructure for MHI, then add particular implementations for it, and on top you can add device drivers that rely on MHI core.

Signature · 2 lines
Sincerely yours,
Mike.
maintainer
#3 lore raw
In reply to Jarvis Jiang
Quoted 1 line · On Tue, 16 Mar 2021 05:42:37 -0700 Jarvis Jiang wrote:
 drivers/bus/mhi/devices/mhi_netdev.c          | 1830 +++++++++++++

There's already a drivers/net/mhi/

Please make sure the drivers live in their respective subsystem.

Virtio drivers don't sit under drivers/virtio, and most certainly not under drivers/bus/virtio...

Quoted 2 lines
 drivers/bus/mhi/devices/mhi_satellite.c       | 1155 +++++++++
 drivers/bus/mhi/devices/mhi_uci.c             |  802 ++++++

Ugh, can you clarify what's the source of this code dump and if you're coordinating with others working on Qualcomm drivers?

author
#2 lore raw
In reply to Mike Rapoport

I will divide the changes into a series of patches according to your suggestion, thank you.

Thanks,
Jarvis

Quoted 81 lines · Mike Rapoport <[email protected]> 于2021年3月16日周二 下午9:30写道:
Quoted 61 lines · Jarvis Jiang

T99W175 using MBIM or RmNet over PCIe interface with MHI protocol support.
Ported from IPQ8072 platform, including MHI, MBIM, RmNet

Supporting below PCI devices:

PCI_DEVICE(0x17cb, 0x0300)
PCI_DEVICE(0x17cb, 0x0301)
PCI_DEVICE(0x17cb, 0x0302)
PCI_DEVICE(0x17cb, 0x0303)
PCI_DEVICE(0x17cb, 0x0304)
PCI_DEVICE(0x17cb, 0x0305)
PCI_DEVICE(0x17cb, 0x0306)
PCI_DEVICE(0x105b, 0xe0ab)
PCI_DEVICE(0x105b, 0xe0b0)
PCI_DEVICE(0x105b, 0xe0b1)
PCI_DEVICE(0x105b, 0xe0b3)
PCI_DEVICE(0x1269, 0x00b3)
PCI_DEVICE(0x03f0, 0x0a6c)

---
 MAINTAINERS                                   |   16 +
 drivers/bus/Kconfig                           |    1 +
 drivers/bus/Makefile                          |    3 +
 drivers/bus/mhi/Kconfig                       |   27 +
 drivers/bus/mhi/Makefile                      |    9 +
 drivers/bus/mhi/controllers/Kconfig           |   13 +
 drivers/bus/mhi/controllers/Makefile          |    2 +
 drivers/bus/mhi/controllers/mhi_arch_qti.c    |  275 ++
 drivers/bus/mhi/controllers/mhi_qti.c         |  970 +++++++
 drivers/bus/mhi/controllers/mhi_qti.h         |   44 +
 drivers/bus/mhi/core/Makefile                 |    2 +
 drivers/bus/mhi/core/mhi_boot.c               |  590 +++++
 drivers/bus/mhi/core/mhi_dtr.c                |  223 ++
 drivers/bus/mhi/core/mhi_init.c               | 1901 ++++++++++++++
 drivers/bus/mhi/core/mhi_internal.h           |  826 ++++++
 drivers/bus/mhi/core/mhi_main.c               | 2261 +++++++++++++++++
 drivers/bus/mhi/core/mhi_pm.c                 | 1158 +++++++++
 drivers/bus/mhi/devices/Kconfig               |   43 +
 drivers/bus/mhi/devices/Makefile              |    3 +
 drivers/bus/mhi/devices/mhi_netdev.c          | 1830 +++++++++++++
 drivers/bus/mhi/devices/mhi_satellite.c       | 1155 +++++++++
 drivers/bus/mhi/devices/mhi_uci.c             |  802 ++++++
 drivers/net/ethernet/qualcomm/rmnet/Makefile  |    2 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.c    |  131 +-
 .../ethernet/qualcomm/rmnet/rmnet_config.h    |  110 +-
 .../qualcomm/rmnet/rmnet_descriptor.c         | 1225 +++++++++
 .../qualcomm/rmnet/rmnet_descriptor.h         |  152 ++
 .../ethernet/qualcomm/rmnet/rmnet_handlers.c  |  321 ++-
 .../ethernet/qualcomm/rmnet/rmnet_handlers.h  |   27 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_map.h   |  238 +-
 .../qualcomm/rmnet/rmnet_map_command.c        |  304 ++-
 .../ethernet/qualcomm/rmnet/rmnet_map_data.c  | 1029 +++++++-
 .../ethernet/qualcomm/rmnet/rmnet_private.h   |   19 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_trace.h |  250 ++
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   |  101 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h   |   16 +-
 include/linux/ipc_logging.h                   |  291 +++
 include/linux/mhi.h                           |  743 ++++++
 include/linux/mod_devicetable.h               |   22 +-
Quoted 8 lines
 include/linux/msm-bus.h                       |  214 ++
 include/linux/msm_pcie.h                      |  173 ++
 include/linux/netdevice.h                     |   18 +-
 include/uapi/linux/if_link.h                  |    4 +
 include/uapi/linux/msm_rmnet.h                |  170 ++
 mm/memblock.c                                 |    2 +
 net/core/dev.c                                |  192 +-
 46 files changed, 17700 insertions(+), 208 deletions(-)

This is way too much for a single patch. Please split your changes into a series of patches, with one logical change per patch. For instance, you can start with adding skeleton infrastructure for MHI, then add particular implementations for it, and on top you can add device drivers that rely on MHI core.

--
Sincerely yours,
Mike.

author
#4 lore raw
In reply to Jakub Kicinski
Quoted 1 line

There's already a drivers/net/mhi/

It seems the latest kernel supports mhi driver, but there is no mhi driver on the 5.4.44 kernel, I want to add it to 5.4.44, is that ok?

Quoted 1 line

Virtio drivers don't sit under drivers/virtio, and most certainly not

under drivers/bus/virtio
Thanks, however, I will put files into a more suitable location.

Quoted 1 line

Ugh, can you clarify what's the source of this code dump and if you're

coordinating with others working on Qualcomm drivers?
The source code is ported from IPQ8072 arm platform, including MHI, MBIM, RmNet.
No, I have no cooperation with the people working on Qualcomm drivers.

Thanks,
Jarvis

Quoted 16 lines · Jakub Kicinski <[email protected]> 于2021年3月17日周三 上午5:37写道:
Quoted 1 line · On Tue, 16 Mar 2021 05:42:37 -0700 Jarvis Jiang wrote:
 drivers/bus/mhi/devices/mhi_netdev.c          | 1830 +++++++++++++

There's already a drivers/net/mhi/

Please make sure the drivers live in their respective subsystem.

Virtio drivers don't sit under drivers/virtio, and most certainly not under drivers/bus/virtio...

Quoted 2 lines
 drivers/bus/mhi/devices/mhi_satellite.c       | 1155 +++++++++
 drivers/bus/mhi/devices/mhi_uci.c             |  802 ++++++

Ugh, can you clarify what's the source of this code dump and if you're coordinating with others working on Qualcomm drivers?

#5 lore raw
In reply to Jarvis Jiang
Quoted 21 lines · Jarvis Jiang

T99W175 using MBIM or RmNet over PCIe interface with MHI protocol support.
Ported from IPQ8072 platform, including MHI, MBIM, RmNet

Supporting below PCI devices:

PCI_DEVICE(0x17cb, 0x0300)
PCI_DEVICE(0x17cb, 0x0301)
PCI_DEVICE(0x17cb, 0x0302)
PCI_DEVICE(0x17cb, 0x0303)
PCI_DEVICE(0x17cb, 0x0304)
PCI_DEVICE(0x17cb, 0x0305)
PCI_DEVICE(0x17cb, 0x0306)
PCI_DEVICE(0x105b, 0xe0ab)
PCI_DEVICE(0x105b, 0xe0b0)
PCI_DEVICE(0x105b, 0xe0b1)
PCI_DEVICE(0x105b, 0xe0b3)
PCI_DEVICE(0x1269, 0x00b3)
PCI_DEVICE(0x03f0, 0x0a6c)

<...>

Quoted 10 lines
MAINTAINERS +10 -0
+FOXCONN 5G MODEM DRIVER
+M:	Jarvis Jiang <[email protected]>
+S:	Orphan
+F:	drivers/bus/mhi/
+F:	drivers/net/ethernet/qualcomm/rmnet/
+F:	include/linux/ipc_logging.h
+F:	include/linux/mhi.h
+F:	include/linux/mod_devicetable.h
+F:	include/linux/msm-bus.h
+F:	include/linux/msm_pcie.h

<...>

MAINTAINERS S: Odd Fixes · line 6430

Quoted 5 lines
MAINTAINERS +5 -0
+F:	include/linux/netdevice.h
+F:	include/uapi/linux/if_link.h
+F:	include/uapi/linux/msm_rmnet.h
+F:	mm/memblock.c
+F:	net/core/dev.c

That's quite a statement.

Thanks