Use the QMI service IDs from the QMI header
Subsystems (9)
v2 cover Use the QMI service IDs from the QMI header
The different subsystems implementing the QMI service protocol are using their own definition of the service id. It is not a problem but it results on having those duplicated with different names but the same value and without consistency in their name.
The QMI service IDs are defined in the qmi.h header file. Use those instead of defining the IDs in the protocol implementation file. It will result in unifying and providing a consistent way to represent the supported protocols.
This series is based on the immutable branch [1] containing the QMI service id definitions along with some drivers using them.
How a patch can be merged ?
* Add the Ack tag and let it go through the QCom's tree
OR
* Apply the patch on top of the immutable branch [1]
[1] https://lore.kernel.org/all/abdkE2qWX5Amf5Jo@baldur/
Changelog:
v2:
* Added Reviewed-by tags
* Removed patches picked up by Bjorn
* Rebase on top of the immutable branch from QCom's tree
* Fixed up short description prefix for wifi changes
v1:
* Initial post
---
Daniel Lezcano (4):
net: ipa: Use the unified QMI service ID instead of defining it
locally
wifi: ath: Use the unified QMI service ID instead of defining it
locally
slimbus: qcom-ngd-ctrl: Use the unified QMI service ID instead of
defining it locally
ALSA: usb-audio: qcom: Use the unified QMI service ID instead of
defining it locally
drivers/net/ipa/ipa_qmi.c | 6 ++---- drivers/net/wireless/ath/ath10k/qmi.c | 2 +- drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h | 1 - drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/qmi.h | 1 - drivers/net/wireless/ath/ath12k/qmi.c | 2 +- drivers/net/wireless/ath/ath12k/qmi.h | 1 - drivers/slimbus/qcom-ngd-ctrl.c | 5 ++--- sound/usb/qcom/qc_audio_offload.c | 2 +- sound/usb/qcom/usb_audio_qmi_v01.h | 1 - 10 files changed, 8 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0
PATCH v2 1/4 net: ipa: Use the unified QMI service ID instead of defining it locally
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in qmi.h and remove the locally defined macro.
--- drivers/net/ipa/ipa_qmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ipa/ipa_qmi.c +2 -4
@@ -66,11 +66,9 @@* determination of when things are "ready" */ -#define IPA_HOST_SERVICE_SVC_ID 0x31#define IPA_HOST_SVC_VERS 1#define IPA_HOST_SERVICE_INS_ID 1 -#define IPA_MODEM_SERVICE_SVC_ID 0x31#define IPA_MODEM_SERVICE_INS_ID 2#define IPA_MODEM_SVC_VERS 1
@@ -484,7 +482,7 @@ int ipa_qmi_setup(struct ipa *ipa)if (ret)return ret; - ret =qmi_add_server (&ipa_qmi->server_handle,IPA_HOST_SERVICE_SVC_ID , + ret =qmi_add_server (&ipa_qmi->server_handle,QMI_SERVICE_ID_IPA ,IPA_HOST_SVC_VERS ,IPA_HOST_SERVICE_INS_ID );if (ret) goto err_server_handle_release;
@@ -501,7 +499,7 @@ int ipa_qmi_setup(struct ipa *ipa)/* We need this ready before the service lookup is added */ INIT_WORK (&ipa_qmi->init_driver_work, ipa_client_init_driver_work); - ret =qmi_add_lookup (&ipa_qmi->client_handle,IPA_MODEM_SERVICE_SVC_ID , + ret =qmi_add_lookup (&ipa_qmi->client_handle,QMI_SERVICE_ID_IPA ,IPA_MODEM_SVC_VERS ,IPA_MODEM_SERVICE_INS_ID );if (ret) goto err_client_handle_release;
Signature · 1 line
2.43.0
Re: [PATCH v2 1/4] net: ipa: Use the unified QMI service ID instead of defining it locally
Quoted 6 lines · Daniel Lezcano
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in
qmi.hand remove the locally defined macro.Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
Looks good!
Quoted 38 lines
--- drivers/net/ipa/ipa_qmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/net/ipa/ipa_qmi.c +2
-4@@ -66,11 +66,9 @@* determination of when things are "ready" */ -#define IPA_HOST_SERVICE_SVC_ID 0x31#define IPA_HOST_SVC_VERS 1#define IPA_HOST_SERVICE_INS_ID 1 -#define IPA_MODEM_SERVICE_SVC_ID 0x31#define IPA_MODEM_SERVICE_INS_ID 2#define IPA_MODEM_SVC_VERS 1@@ -484,7 +482,7 @@ int ipa_qmi_setup(struct ipa *ipa)if (ret)return ret; - ret =qmi_add_server (&ipa_qmi->server_handle,IPA_HOST_SERVICE_SVC_ID , + ret =qmi_add_server (&ipa_qmi->server_handle,QMI_SERVICE_ID_IPA ,IPA_HOST_SVC_VERS ,IPA_HOST_SERVICE_INS_ID );if (ret) goto err_server_handle_release;@@ -501,7 +499,7 @@ int ipa_qmi_setup(struct ipa *ipa)/* We need this ready before the service lookup is added */ INIT_WORK (&ipa_qmi->init_driver_work, ipa_client_init_driver_work); - ret =qmi_add_lookup (&ipa_qmi->client_handle,IPA_MODEM_SERVICE_SVC_ID , + ret =qmi_add_lookup (&ipa_qmi->client_handle,QMI_SERVICE_ID_IPA ,IPA_MODEM_SVC_VERS ,IPA_MODEM_SERVICE_INS_ID );if (ret) goto err_client_handle_release;
PATCH v2 2/4 wifi: ath: Use the unified QMI service ID instead of defining it locally
In reply to Daniel LezcanoInstead of defining a local macro with a custom name for the QMI service identifier, use the one provided in qmi.h and remove the locally defined macro.
--- drivers/net/wireless/ath/ath10k/qmi.c | 2 +- drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h | 1 - drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/qmi.h | 1 - drivers/net/wireless/ath/ath12k/qmi.c | 2 +- drivers/net/wireless/ath/ath12k/qmi.h | 1 - 6 files changed, 3 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath10k/qmi.c +1 -1
@@ -1105,7 +1105,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)spin_lock_init (&qmi->event_lock);INIT_WORK (&qmi->event_work, ath10k_qmi_driver_event_work); - ret =qmi_add_lookup (&qmi->qmi_hdl,WLFW_SERVICE_ID_V01 , + ret =qmi_add_lookup (&qmi->qmi_hdl,QMI_SERVICE_ID_WLFW ,WLFW_SERVICE_VERS_V01 ,0 );if (ret) goto err_qmi_lookup;
drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h +0 -1
@@ -7,7 +7,6 @@#ifndef WCN3990_QMI_SVC_V01_H #define WCN3990_QMI_SVC_V01_H -#define WLFW_SERVICE_ID_V01 0x45#define WLFW_SERVICE_VERS_V01 0x01#define QMI_WLFW_BDF_DOWNLOAD_REQ_V01 0x0025
drivers/net/wireless/ath/ath11k/qmi.c +1 -1
@@ -3337,7 +3337,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)spin_lock_init (&ab->qmi.event_lock);INIT_WORK (&ab->qmi.event_work, ath11k_qmi_driver_event_work); - ret =qmi_add_lookup (&ab->qmi.handle,ATH11K_QMI_WLFW_SERVICE_ID_V01 , + ret =qmi_add_lookup (&ab->qmi.handle,QMI_SERVICE_ID_WLFW ,ATH11K_QMI_WLFW_SERVICE_VERS_V01 , ab->qmi.service_ins_id);if (ret <0 ) {
drivers/net/wireless/ath/ath11k/qmi.h +0 -1
@@ -15,7 +15,6 @@#define ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE 64#define ATH11K_QMI_CALDB_ADDRESS 0x4BA00000#define ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 128 -#define ATH11K_QMI_WLFW_SERVICE_ID_V01 0x45#define ATH11K_QMI_WLFW_SERVICE_VERS_V01 0x01#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01 0x02#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390 0x01
drivers/net/wireless/ath/ath12k/qmi.c +1 -1
@@ -4061,7 +4061,7 @@ int ath12k_qmi_init_service(struct ath12k_base *ab)spin_lock_init (&ab->qmi.event_lock);INIT_WORK (&ab->qmi.event_work, ath12k_qmi_driver_event_work); - ret =qmi_add_lookup (&ab->qmi.handle,ATH12K_QMI_WLFW_SERVICE_ID_V01 , + ret =qmi_add_lookup (&ab->qmi.handle,QMI_SERVICE_ID_WLFW ,ATH12K_QMI_WLFW_SERVICE_VERS_V01 , ab->qmi.service_ins_id);if (ret <0 ) {
drivers/net/wireless/ath/ath12k/qmi.h +0 -1
@@ -15,7 +15,6 @@#define ATH12K_QMI_MAX_BDF_FILE_NAME_SIZE 64#define ATH12K_QMI_CALDB_ADDRESS 0x4BA00000#define ATH12K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 128 -#define ATH12K_QMI_WLFW_SERVICE_ID_V01 0x45#define ATH12K_QMI_WLFW_SERVICE_VERS_V01 0x01#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01 0x02#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_WCN7850 0x1
Signature · 1 line
2.43.0
Re: [PATCH v2 2/4] wifi: ath: Use the unified QMI service ID instead of defining it locally
Quoted 6 lines · Daniel Lezcano
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in
qmi.hand remove the locally defined macro.Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
Bjorn,
Feel free to take this through your tree since I don't think it will conflict with anything in mine and it will take time for the definition to propagate back to my tree via the normal workflow (which I would prefer over merging the immutable branch).
Re: [PATCH v2 2/4] wifi: ath: Use the unified QMI service ID instead of defining it locally
Quoted 8 lines · Jeff Johnson
Quoted 6 lines · Daniel Lezcano
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in
qmi.hand remove the locally defined macro.Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
Quoted 7 lines
Bjorn,
Feel free to take this through your tree since I don't think it will conflict with anything in mine and it will take time for the definition to propagate back to my tree via the normal workflow (which I would prefer over merging the immutable branch).Acked-by Jeff Johnson <[email protected]>
Now NAK...
The definitions have now propagated back to my tree, so I'll now take this patch through my tree.
/jeff
PATCH v2 3/4 slimbus: qcom-ngd-ctrl: Use the unified QMI service ID instead of defining it locally
In reply to Daniel LezcanoInstead of defining a local macro with a custom name for the QMI service identifier, use the one provided in qmi.h and remove the locally defined macro.
--- drivers/slimbus/qcom-ngd-ctrl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/slimbus/qcom-ngd-ctrl.c +2 -3
@@ -48,7 +48,6 @@ NGD_INT_RX_MSG_RCVD)/* Slimbus QMI service */ -#define SLIMBUS_QMI_SVC_ID 0x0301#define SLIMBUS_QMI_SVC_V1 1#define SLIMBUS_QMI_INS_ID 0#define SLIMBUS_QMI_SELECT_INSTANCE_REQ_V01 0x0020
@@ -1408,8 +1407,8 @@ static int qcom_slim_ngd_qmi_svc_event_init(struct qcom_slim_ngd_ctrl *ctrl)return ret; } - ret =qmi_add_lookup (&qmi->svc_event_hdl,SLIMBUS_QMI_SVC_ID , -SLIMBUS_QMI_SVC_V1 ,SLIMBUS_QMI_INS_ID ); + ret =qmi_add_lookup (&qmi->svc_event_hdl,QMI_SERVICE_ID_SLIMBUS , +SLIMBUS_QMI_SVC_V1 ,SLIMBUS_QMI_INS_ID );if (ret <0 ) {dev_err (ctrl->dev,"qmi_add_lookup failed: %d\n" , ret);qmi_handle_release (&qmi->svc_event_hdl);
Signature · 1 line
2.43.0
PATCH v2 4/4 ALSA: usb-audio: qcom: Use the unified QMI service ID instead of defining it locally
In reply to Daniel LezcanoInstead of defining a local macro with a custom name for the QMI service identifier, use the one provided in qmi.h and remove the locally defined macro.
--- sound/usb/qcom/qc_audio_offload.c | 2 +- sound/usb/qcom/usb_audio_qmi_v01.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
sound/usb/qcom/qc_audio_offload.c +1 -1
@@ -1927,7 +1927,7 @@ static int qc_usb_audio_probe(struct auxiliary_device *auxdev,QMI_UAUDIO_STREAM_REQ_MSG_V01_MAX_MSG_LEN , &uaudio_svc_ops_options, &uaudio_stream_req_handlers); - ret =qmi_add_server (svc->uaudio_svc_hdl,UAUDIO_STREAM_SERVICE_ID_V01 , + ret =qmi_add_server (svc->uaudio_svc_hdl,QMI_SERVICE_ID_USB_AUDIO_STREAM ,UAUDIO_STREAM_SERVICE_VERS_V01 ,0 ); uaudio_svc = svc;
sound/usb/qcom/usb_audio_qmi_v01.h +0 -1
@@ -6,7 +6,6 @@#ifndef USB_QMI_V01_H #define USB_QMI_V01_H -#define UAUDIO_STREAM_SERVICE_ID_V01 0x41D#define UAUDIO_STREAM_SERVICE_VERS_V01 0x01#define QMI_UAUDIO_STREAM_RESP_V01 0x0001
Signature · 1 line
2.43.0
Re: [PATCH v2 4/4] ALSA: usb-audio: qcom: Use the unified QMI service ID instead of defining it locally
Quoted 7 lines · Daniel Lezcano
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in
qmi.hand remove the locally defined macro.Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
For the sound bits,
thanks,
Takashi
Re: [PATCH v2 4/4] ALSA: usb-audio: qcom: Use the unified QMI service ID instead of defining it locally
Hi Bjorn,
Quoted 7 lines · Takashi Iwai
Quoted 5 lines · Daniel Lezcano
Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in
qmi.hand remove the locally defined macro.
Quoted 6 lines
Quoted 2 lines
Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>For the sound bits,
Reviewed-by Takashi Iwai <[email protected]>
This one can be picked up for qcom/for-next
Thanks
-- Daniel
Jakub Kicinski
maintainerQuoted 4 lines · On Mon, 16 Mar 2026 18:14:10 +0100 Daniel Lezcano wrote:
This series is based on the immutable branch [1] containing the QMI service id definitions along with some drivers using them.
How a patch can be merged ?
Wait for the dependency to appear in respective trees after the merge window then repost the patches individually. I'm starting to get annoyed with all this cross-tree QMI/MHI noise.
Quoted 9 lines · Jakub Kicinski
Quoted 4 lines · On Mon, 16 Mar 2026 18:14:10 +0100 Daniel Lezcano wrote:
This series is based on the immutable branch [1] containing the QMI service id definitions along with some drivers using them.
How a patch can be merged ?
Wait for the dependency to appear in respective trees after the merge window then repost the patches individually. I'm starting to get annoyed with all this cross-tree QMI/MHI noise.
An ack is simpler for everyone, especially when they are trivial
Quoted 5 lines · Daniel Lezcano
Quoted 4 lines · Jakub Kicinski
Quoted 3 lines · On Mon, 16 Mar 2026 18:14:10 +0100 Daniel Lezcano wrote:
This series is based on the immutable branch [1] containing the QMI service id definitions along with some drivers using them.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
How a patch can be merged ?
Wait for the dependency to appear in respective trees after the merge window then repost the patches individually. I'm starting to get annoyed with all this cross-tree QMI/MHI noise.
An ack is simpler for everyone, especially when they are trivial
Why isn't this 4 different patches, all for different branches/trees as there does not seem to be any dependencies here?
confused,
greg k-h
Hi Greg,
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Daniel Lezcano
Quoted 9 lines · Jakub Kicinski
Quoted 4 lines · On Mon, 16 Mar 2026 18:14:10 +0100 Daniel Lezcano wrote:
This series is based on the immutable branch [1] containing the QMI service id definitions along with some drivers using them.
How a patch can be merged ?
Wait for the dependency to appear in respective trees after the merge window then repost the patches individually. I'm starting to get annoyed with all this cross-tree QMI/MHI noise.
Quoted 6 lines
Quoted 1 line
An ack is simpler for everyone, especially when they are trivial
Why isn't this 4 different patches, all for different branches/trees as there does not seem to be any dependencies here?
confused,
The dependency is on the definitions posted in v1 in patch1/8 [1]
The first version of this series was bigger. The definitions were in the first patch of the initial series. It has been picked up by Bjorn in the corresponding tree along with 4 other patches for subsystems he is in charge of and let the other patches left.
He put in place an immutable branch for those who want to pick the corresponding patch in their tree [2]
I sent this v2 with a subject prefix fixed and a pointer to the immutable branch. So people can just ack the patch or use the branch if they want to pick it through their tree.
-- Daniel
Jeff Johnson
AppliedRe: (subset) [PATCH v2 0/4] Use the QMI service IDs from the QMI header
In reply to Daniel LezcanoQuoted 11 lines · Daniel Lezcano
The different subsystems implementing the QMI service protocol are using their own definition of the service id. It is not a problem but it results on having those duplicated with different names but the same value and without consistency in their name.
The QMI service IDs are defined in the
qmi.hheader file. Use those instead of defining the IDs in the protocol implementation file. It will result in unifying and providing a consistent way to represent the supported protocols.[...]
Applied, thanks!
[2/4] wifi: ath: Use the unified QMI service ID instead of defining it locally
commit: 0e39eea57626e545c596734c0d250c1735f1a7e5
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>
Re: (subset) [PATCH v2 0/4] Use the QMI service IDs from the QMI header
In reply to Daniel LezcanoQuoted 11 lines · Daniel Lezcano
The different subsystems implementing the QMI service protocol are using their own definition of the service id. It is not a problem but it results on having those duplicated with different names but the same value and without consistency in their name.
The QMI service IDs are defined in the
qmi.hheader file. Use those instead of defining the IDs in the protocol implementation file. It will result in unifying and providing a consistent way to represent the supported protocols.[...]
Applied, thanks!
[3/4] slimbus: qcom-ngd-ctrl: Use the unified QMI service ID instead of defining it locally
commit: 05f3f5984121e1956867b309c76a750c1d4c9682
Best regards,
Signature · 1 line
Srinivas Kandagatla <[email protected]>