Skip to contentSkip to conversation

PCI: Add vendor ID for QUECTEL

PATCH In review Slark Xiao 4 participants 7 messages Nov 1, 2022

Subsystems (3)
lore
Share & tools
lore

Slark Xiao

author
#0 lore raw

PATCH v3 1/1 PCI: Add vendor ID for QUECTEL

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +2 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
+#define PCI_VENDOR_ID_QUECTEL		0x1eac
+
 #define PCI_VENDOR_ID_TEHUTI		0x1fc9
 #define PCI_DEVICE_ID_TEHUTI_3009	0x3009
 #define PCI_DEVICE_ID_TEHUTI_3010	0x3010
Signature · 1 line
2.34.1
#1 lore raw
Quoted 38 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644

include/linux/pci_ids.h line 2588

Quoted 4 lines
include/linux/pci_ids.h +1 -0
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

thanks,

greg k-h

author
#2 lore raw
Quoted 42 lines · Greg KH
Quoted 41 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
Quoted 8 lines

include/linux/pci_ids.h line 2588

Quoted 1 line
include/linux/pci_ids.h +1 -0
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

thanks,

greg k-h

Hi Greg,
Actually I didn't see this notice before committing this patch. I even discussed
it with the maintainer for several times and nobody show me this rule. I have a concern, some IOT module vendors, like QUECTEL, CINTERION(THALES), SIERRA,ROLLING and so on, they only produce IOT modules without other hardware with PCIe interface, and they applied for their own VID. But they can't get a their own VENDOR MARCO? This seems unreasonable.
This change should be harmless and make the code neat.
This is my opinion.

Thanks
Slark Xiao

#3 lore raw
Quoted 67 lines · Slark Xiao
Quoted 42 lines · Greg KH
Quoted 41 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
Quoted 8 lines

include/linux/pci_ids.h line 2588

Quoted 1 line
include/linux/pci_ids.h +1 -0
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

thanks,

greg k-h

Quoted 9 lines

Hi Greg,
Actually I didn't see this notice before committing this patch. I even discussed
it with the maintainer for several times and nobody show me this rule. I have a concern, some IOT module vendors, like QUECTEL, CINTERION(THALES), SIERRA,ROLLING and so on, they only produce IOT modules without other hardware with PCIe interface, and they applied for their own VID. But they can't get a their own VENDOR MARCO? This seems unreasonable.
This change should be harmless and make the code neat.
This is my opinion.

It causes a _LOT_ of churn and merge issues when everyone is adding new entries to a single file. Which is why, 15+ years ago, we made the decision that if a vendor or device id is only needed in one file, then it should not be added to the pci_ids.h file.

No need to change that now, please just put the vendor id in the single driver that it is needed in.

thanks,

greg k-h

author
#4 lore raw
Quoted 69 lines · Greg KH
Quoted 53 lines · Slark Xiao
Quoted 42 lines · Greg KH
Quoted 41 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
Quoted 8 lines

include/linux/pci_ids.h line 2588

Quoted 1 line
include/linux/pci_ids.h +1 -0
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

thanks,

greg k-h

Quoted 9 lines

Hi Greg,
Actually I didn't see this notice before committing this patch. I even discussed
it with the maintainer for several times and nobody show me this rule. I have a concern, some IOT module vendors, like QUECTEL, CINTERION(THALES), SIERRA,ROLLING and so on, they only produce IOT modules without other hardware with PCIe interface, and they applied for their own VID. But they can't get a their own VENDOR MARCO? This seems unreasonable.
This change should be harmless and make the code neat.
This is my opinion.

It causes a _LOT_ of churn and merge issues when everyone is adding new entries to a single file. Which is why, 15+ years ago, we made the decision that if a vendor or device id is only needed in one file, then it should not be added to the pci_ids.h file.

Quoted 6 lines

No need to change that now, please just put the vendor id in the single driver that it is needed in.

thanks,

greg k-h

Hi Greg,
Thanks for your explanation.

Hi Mani,
Is there a need to update these vendor ids as macro in
pci_generic.c?

Thanks.

#5 lore raw
Quoted 80 lines · Slark Xiao
Quoted 74 lines · Greg KH
Quoted 53 lines · Slark Xiao
Quoted 42 lines · Greg KH
Quoted 41 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
Quoted 8 lines

include/linux/pci_ids.h line 2588

Quoted 1 line
include/linux/pci_ids.h +1 -0
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

thanks,

greg k-h

Quoted 9 lines

Hi Greg,
Actually I didn't see this notice before committing this patch. I even discussed
it with the maintainer for several times and nobody show me this rule. I have a concern, some IOT module vendors, like QUECTEL, CINTERION(THALES), SIERRA,ROLLING and so on, they only produce IOT modules without other hardware with PCIe interface, and they applied for their own VID. But they can't get a their own VENDOR MARCO? This seems unreasonable.
This change should be harmless and make the code neat.
This is my opinion.

It causes a _LOT_ of churn and merge issues when everyone is adding new entries to a single file. Which is why, 15+ years ago, we made the decision that if a vendor or device id is only needed in one file, then it should not be added to the pci_ids.h file.

No need to change that now, please just put the vendor id in the single driver that it is needed in.

thanks,

Quoted 8 lines
Quoted 1 line

greg k-h

Hi Greg,
Thanks for your explanation.

Hi Mani,
Is there a need to update these vendor ids as macro in
pci_generic.c?

It is not really needed but for convenience you could add a macro in pci_generic.c itself.

Thanks,
Mani

Quoted 1 line

Thanks.

Signature · 1 line
மணிவண்ணன் சதாசிவம்
#6 lore raw
In reply to Slark Xiao
Quoted 48 lines · Slark Xiao
Quoted 42 lines · Greg KH
Quoted 41 lines · Slark Xiao

n MHI driver, there are some companies' product still do not have their own PCI vendor macro. So we add it here to make the code neat. Ref ID could be found in link https://pcisig.com/membership/member-companies.

---
v3: Separate different vendors into different patch.

v2: Update vendor ID to the right location sorted by numeric value.

---
 drivers/bus/mhi/host/pci_generic.c | 6 +++---
 include/linux/pci_ids.h            | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/bus/mhi/host/pci_generic.c +3 -3
index caa4ce28cf9e..81ae9c49ce2a 100644
@@ -555,11 +555,11 @@ static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
-	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+	{ PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
include/linux/pci_ids.h +0 -0
index b362d90eb9b0..3c91461bcfe4 100644
@@ -2585,6 +2585,8 @@
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
Quoted 4 lines

include/linux/pci_ids.h line 2588

Quoted 1 line
include/linux/pci_ids.h +1 -0
+#define PCI_VENDOR_ID_QUECTEL		0x1eac

Why did you ignore the comment at the top of this file saying that new entries are not needed to be added, especially for just one user?

Quoted 8 lines

Actually I didn't see this notice before committing this patch. I even discussed
it with the maintainer for several times and nobody show me this rule. I have a concern, some IOT module vendors, like QUECTEL, CINTERION(THALES), SIERRA,ROLLING and so on, they only produce IOT modules without other hardware with PCIe interface, and they applied for their own VID. But they can't get a their own VENDOR MARCO? This seems unreasonable.
This change should be harmless and make the code neat.
This is my opinion.

Sorry, this is my fault. I have merged or acked several vendor ID additions recently, but I don't really backport changes like Greg does, so I'm not as sensitized to the churn and merge issues.

Bjorn