All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-next] ice: Extend auxbus device naming
@ 2024-04-18 11:03 ` Sergey Temerkhanov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Temerkhanov @ 2024-04-18 11:03 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev, Sergey Temerkhanov, Przemek Kitszel

Include segment/domain number in the device name to distinguish
between PCI devices located on different root complexes in
multi-segment configurations

Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 0f17fc1181d2..54fe1931d598 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2893,6 +2893,7 @@ ice_ptp_auxbus_create_id_table(struct ice_pf *pf, const char *name)
 static int ice_ptp_register_auxbus_driver(struct ice_pf *pf)
 {
 	struct auxiliary_driver *aux_driver;
+	struct pci_dev *pdev = pf->pdev;
 	struct ice_ptp *ptp;
 	struct device *dev;
 	char *name;
@@ -2903,8 +2904,9 @@ static int ice_ptp_register_auxbus_driver(struct ice_pf *pf)
 	aux_driver = &ptp->ports_owner.aux_driver;
 	INIT_LIST_HEAD(&ptp->ports_owner.ports);
 	mutex_init(&ptp->ports_owner.lock);
-	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_clk%u",
-			      pf->pdev->bus->number, PCI_SLOT(pf->pdev->devfn),
+	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_%u_clk%u",
+			      pci_domain_nr(pdev->bus), pdev->bus->number,
+			      PCI_SLOT(pdev->devfn),
 			      ice_get_ptp_src_clock_index(&pf->hw));
 	if (!name)
 		return -ENOMEM;
@@ -3106,6 +3108,7 @@ static void ice_ptp_release_auxbus_device(struct device *dev)
 static int ice_ptp_create_auxbus_device(struct ice_pf *pf)
 {
 	struct auxiliary_device *aux_dev;
+	struct pci_dev *pdev = pf->pdev;
 	struct ice_ptp *ptp;
 	struct device *dev;
 	char *name;
@@ -3118,8 +3121,9 @@ static int ice_ptp_create_auxbus_device(struct ice_pf *pf)
 
 	aux_dev = &ptp->port.aux_dev;
 
-	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_clk%u",
-			      pf->pdev->bus->number, PCI_SLOT(pf->pdev->devfn),
+	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_%u_clk%u",
+			      pci_domain_nr(pdev->bus), pdev->bus->number,
+			      PCI_SLOT(pdev->devfn),
 			      ice_get_ptp_src_clock_index(&pf->hw));
 	if (!name)
 		return -ENOMEM;
-- 
2.35.3


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

* [Intel-wired-lan] [PATCH iwl-next] ice: Extend auxbus device naming
@ 2024-04-18 11:03 ` Sergey Temerkhanov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Temerkhanov @ 2024-04-18 11:03 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: Sergey Temerkhanov, netdev, Przemek Kitszel

Include segment/domain number in the device name to distinguish
between PCI devices located on different root complexes in
multi-segment configurations

Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 0f17fc1181d2..54fe1931d598 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2893,6 +2893,7 @@ ice_ptp_auxbus_create_id_table(struct ice_pf *pf, const char *name)
 static int ice_ptp_register_auxbus_driver(struct ice_pf *pf)
 {
 	struct auxiliary_driver *aux_driver;
+	struct pci_dev *pdev = pf->pdev;
 	struct ice_ptp *ptp;
 	struct device *dev;
 	char *name;
@@ -2903,8 +2904,9 @@ static int ice_ptp_register_auxbus_driver(struct ice_pf *pf)
 	aux_driver = &ptp->ports_owner.aux_driver;
 	INIT_LIST_HEAD(&ptp->ports_owner.ports);
 	mutex_init(&ptp->ports_owner.lock);
-	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_clk%u",
-			      pf->pdev->bus->number, PCI_SLOT(pf->pdev->devfn),
+	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_%u_clk%u",
+			      pci_domain_nr(pdev->bus), pdev->bus->number,
+			      PCI_SLOT(pdev->devfn),
 			      ice_get_ptp_src_clock_index(&pf->hw));
 	if (!name)
 		return -ENOMEM;
@@ -3106,6 +3108,7 @@ static void ice_ptp_release_auxbus_device(struct device *dev)
 static int ice_ptp_create_auxbus_device(struct ice_pf *pf)
 {
 	struct auxiliary_device *aux_dev;
+	struct pci_dev *pdev = pf->pdev;
 	struct ice_ptp *ptp;
 	struct device *dev;
 	char *name;
@@ -3118,8 +3121,9 @@ static int ice_ptp_create_auxbus_device(struct ice_pf *pf)
 
 	aux_dev = &ptp->port.aux_dev;
 
-	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_clk%u",
-			      pf->pdev->bus->number, PCI_SLOT(pf->pdev->devfn),
+	name = devm_kasprintf(dev, GFP_KERNEL, "ptp_aux_dev_%u_%u_%u_clk%u",
+			      pci_domain_nr(pdev->bus), pdev->bus->number,
+			      PCI_SLOT(pdev->devfn),
 			      ice_get_ptp_src_clock_index(&pf->hw));
 	if (!name)
 		return -ENOMEM;
-- 
2.35.3


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

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: Extend auxbus device naming
  2024-04-18 11:03 ` [Intel-wired-lan] " Sergey Temerkhanov
@ 2024-04-18 15:07   ` Paul Menzel
  -1 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2024-04-18 15:07 UTC (permalink / raw)
  To: Sergey Temerkhanov; +Cc: netdev, intel-wired-lan, Przemek Kitszel

Dear Sergey,


Thank you for your patch.

Am 18.04.24 um 13:03 schrieb Sergey Temerkhanov:
> Include segment/domain number in the device name to distinguish
> between PCI devices located on different root complexes in
> multi-segment configurations

Can you please paste the old and new name in the commit message?

> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_ptp.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)

[…]


Kind regards,

Paul

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

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: Extend auxbus device naming
@ 2024-04-18 15:07   ` Paul Menzel
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2024-04-18 15:07 UTC (permalink / raw)
  To: Sergey Temerkhanov; +Cc: intel-wired-lan, netdev, Przemek Kitszel

Dear Sergey,


Thank you for your patch.

Am 18.04.24 um 13:03 schrieb Sergey Temerkhanov:
> Include segment/domain number in the device name to distinguish
> between PCI devices located on different root complexes in
> multi-segment configurations

Can you please paste the old and new name in the commit message?

> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_ptp.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)

[…]


Kind regards,

Paul

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

end of thread, other threads:[~2024-04-18 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 11:03 [PATCH iwl-next] ice: Extend auxbus device naming Sergey Temerkhanov
2024-04-18 11:03 ` [Intel-wired-lan] " Sergey Temerkhanov
2024-04-18 15:07 ` Paul Menzel
2024-04-18 15:07   ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.