linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID
@ 2022-04-11 13:34 Manivannan Sadhasivam
  2022-04-12 10:30 ` Daniele Palmas
  2022-04-23 12:23 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-11 13:34 UTC (permalink / raw)
  To: mhi
  Cc: quic_hemantk, quic_bbhatt, linux-arm-msm, linux-kernel,
	loic.poulain, dnlplm, Manivannan Sadhasivam

Sorting this way helps in identifying the products of vendors. There is no
sorting required for VID and the new VID should be added as the last entry.

Let's also add a note clarifying this.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---

Changes in v2:

* Fixup the 0x0306 entry by moving it after subid

 drivers/bus/mhi/host/pci_generic.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 541ced27d941..8858f3bf4f04 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -446,20 +446,21 @@ static const struct mhi_pci_dev_info mhi_sierra_em919x_info = {
 	.sideband_wake = false,
 };
 
+/* Keep the list sorted based on the PID. New VID should be added as the last entry */
 static const struct pci_device_id mhi_pci_id_table[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
+		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
 	/* EM919x (sdx55), use the same vid:pid as qcom-sdx55m */
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, 0x18d7, 0x0200),
 		.driver_data = (kernel_ulong_t) &mhi_sierra_em919x_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0306),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx55_info },
-	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
-		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
+	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
+		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
 	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
 	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
 		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
-	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
-		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
 	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
 	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
 		.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID
  2022-04-11 13:34 [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID Manivannan Sadhasivam
@ 2022-04-12 10:30 ` Daniele Palmas
  2022-04-23 12:23 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Daniele Palmas @ 2022-04-12 10:30 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: mhi, quic_hemantk, quic_bbhatt, linux-arm-msm, linux-kernel,
	Loic Poulain

Hi Mani,

Il giorno lun 11 apr 2022 alle ore 15:34 Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> ha scritto:
>
> Sorting this way helps in identifying the products of vendors. There is no
> sorting required for VID and the new VID should be added as the last entry.
>
> Let's also add a note clarifying this.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>

Reviewed-by: Daniele Palmas <dnlplm@gmail.com>

I will wait for this change to be merged, then rebase the FN980 one.

Thanks,
Daniele

> Changes in v2:
>
> * Fixup the 0x0306 entry by moving it after subid
>
>  drivers/bus/mhi/host/pci_generic.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 541ced27d941..8858f3bf4f04 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -446,20 +446,21 @@ static const struct mhi_pci_dev_info mhi_sierra_em919x_info = {
>         .sideband_wake = false,
>  };
>
> +/* Keep the list sorted based on the PID. New VID should be added as the last entry */
>  static const struct pci_device_id mhi_pci_id_table[] = {
> +       { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> +               .driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
>         /* EM919x (sdx55), use the same vid:pid as qcom-sdx55m */
>         { PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, 0x18d7, 0x0200),
>                 .driver_data = (kernel_ulong_t) &mhi_sierra_em919x_info },
>         { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0306),
>                 .driver_data = (kernel_ulong_t) &mhi_qcom_sdx55_info },
> -       { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> -               .driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
> +       { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
> +               .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
>         { PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
>                 .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
>         { PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
>                 .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
> -       { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
> -               .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
>         /* T99W175 (sdx55), Both for eSIM and Non-eSIM */
>         { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
>                 .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID
  2022-04-11 13:34 [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID Manivannan Sadhasivam
  2022-04-12 10:30 ` Daniele Palmas
@ 2022-04-23 12:23 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-23 12:23 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: mhi, quic_hemantk, quic_bbhatt, linux-arm-msm, linux-kernel,
	loic.poulain, dnlplm

On Mon, Apr 11, 2022 at 07:04:28PM +0530, Manivannan Sadhasivam wrote:
> Sorting this way helps in identifying the products of vendors. There is no
> sorting required for VID and the new VID should be added as the last entry.
> 
> Let's also add a note clarifying this.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Applied to mhi-next!

Thanks,
Mani

> ---
> 
> Changes in v2:
> 
> * Fixup the 0x0306 entry by moving it after subid
> 
>  drivers/bus/mhi/host/pci_generic.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 541ced27d941..8858f3bf4f04 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -446,20 +446,21 @@ static const struct mhi_pci_dev_info mhi_sierra_em919x_info = {
>  	.sideband_wake = false,
>  };
>  
> +/* Keep the list sorted based on the PID. New VID should be added as the last entry */
>  static const struct pci_device_id mhi_pci_id_table[] = {
> +	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> +		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
>  	/* EM919x (sdx55), use the same vid:pid as qcom-sdx55m */
>  	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, 0x18d7, 0x0200),
>  		.driver_data = (kernel_ulong_t) &mhi_sierra_em919x_info },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0306),
>  		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx55_info },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> -		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
> +		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
>  	{ PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */
>  		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
>  	{ PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */
>  		.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
> -		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
>  	/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
>  	{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
>  		.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-23 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 13:34 [PATCH v2] bus: mhi: host: pci_generic: Sort mhi_pci_id_table based on the PID Manivannan Sadhasivam
2022-04-12 10:30 ` Daniele Palmas
2022-04-23 12:23 ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).