netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links
@ 2021-01-06 10:07 Stephan Gerhold
  2021-01-08  2:46 ` Jakub Kicinski
  2021-01-09  2:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Stephan Gerhold @ 2021-01-06 10:07 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: netdev, aleksander, andrewlassalle, Stephan Gerhold, Alex Elder

At the moment it is quite hard to identify the network interface
provided by IPA in userspace components: The network interface is
created as virtual device, without any link to the IPA device.
The interface name ("rmnet_ipa%d") is the only indication that the
network interface belongs to IPA, but this is not very reliable.

Add SET_NETDEV_DEV() to associate the network interface with the
IPA parent device. This allows userspace services like ModemManager
to properly identify that this network interface is provided by IPA
and belongs to the modem.

Cc: Alex Elder <elder@kernel.org>
Fixes: a646d6ec9098 ("soc: qcom: ipa: modem and microcontroller")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 drivers/net/ipa/ipa_modem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
index e34fe2d77324..9b08eb823984 100644
--- a/drivers/net/ipa/ipa_modem.c
+++ b/drivers/net/ipa/ipa_modem.c
@@ -216,6 +216,7 @@ int ipa_modem_start(struct ipa *ipa)
 	ipa->name_map[IPA_ENDPOINT_AP_MODEM_TX]->netdev = netdev;
 	ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]->netdev = netdev;
 
+	SET_NETDEV_DEV(netdev, &ipa->pdev->dev);
 	priv = netdev_priv(netdev);
 	priv->ipa = ipa;
 
-- 
2.30.0


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

* Re: [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links
  2021-01-06 10:07 [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links Stephan Gerhold
@ 2021-01-08  2:46 ` Jakub Kicinski
  2021-01-11 14:10   ` Alex Elder
  2021-01-09  2:50 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2021-01-08  2:46 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: David S. Miller, netdev, aleksander, andrewlassalle, Alex Elder

On Wed,  6 Jan 2021 11:07:55 +0100 Stephan Gerhold wrote:
> At the moment it is quite hard to identify the network interface
> provided by IPA in userspace components: The network interface is
> created as virtual device, without any link to the IPA device.
> The interface name ("rmnet_ipa%d") is the only indication that the
> network interface belongs to IPA, but this is not very reliable.
> 
> Add SET_NETDEV_DEV() to associate the network interface with the
> IPA parent device. This allows userspace services like ModemManager
> to properly identify that this network interface is provided by IPA
> and belongs to the modem.
> 
> Cc: Alex Elder <elder@kernel.org>
> Fixes: a646d6ec9098 ("soc: qcom: ipa: modem and microcontroller")
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Alex, can we get an ack?

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

* Re: [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links
  2021-01-06 10:07 [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links Stephan Gerhold
  2021-01-08  2:46 ` Jakub Kicinski
@ 2021-01-09  2:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-09  2:50 UTC (permalink / raw)
  To: Stephan Gerhold; +Cc: davem, kuba, netdev, aleksander, andrewlassalle, elder

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed,  6 Jan 2021 11:07:55 +0100 you wrote:
> At the moment it is quite hard to identify the network interface
> provided by IPA in userspace components: The network interface is
> created as virtual device, without any link to the IPA device.
> The interface name ("rmnet_ipa%d") is the only indication that the
> network interface belongs to IPA, but this is not very reliable.
> 
> Add SET_NETDEV_DEV() to associate the network interface with the
> IPA parent device. This allows userspace services like ModemManager
> to properly identify that this network interface is provided by IPA
> and belongs to the modem.
> 
> [...]

Here is the summary with links:
  - [net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links
    https://git.kernel.org/netdev/net/c/afba9dc1f3a5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links
  2021-01-08  2:46 ` Jakub Kicinski
@ 2021-01-11 14:10   ` Alex Elder
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2021-01-11 14:10 UTC (permalink / raw)
  To: Jakub Kicinski, Stephan Gerhold
  Cc: David S. Miller, netdev, aleksander, andrewlassalle, Alex Elder

On 1/7/21 8:46 PM, Jakub Kicinski wrote:
> On Wed,  6 Jan 2021 11:07:55 +0100 Stephan Gerhold wrote:
>> At the moment it is quite hard to identify the network interface
>> provided by IPA in userspace components: The network interface is
>> created as virtual device, without any link to the IPA device.
>> The interface name ("rmnet_ipa%d") is the only indication that the
>> network interface belongs to IPA, but this is not very reliable.
>>
>> Add SET_NETDEV_DEV() to associate the network interface with the
>> IPA parent device. This allows userspace services like ModemManager
>> to properly identify that this network interface is provided by IPA
>> and belongs to the modem.
>>
>> Cc: Alex Elder <elder@kernel.org>
>> Fixes: a646d6ec9098 ("soc: qcom: ipa: modem and microcontroller")
>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> 
> Alex, can we get an ack?

Too late, but this looks good.  Thank you for applying it.
I don't always spot messages not "To:" me.  I still need to
improve my mail filtering.  Sorry about that.

					-Alex


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

end of thread, other threads:[~2021-01-11 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 10:07 [PATCH net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links Stephan Gerhold
2021-01-08  2:46 ` Jakub Kicinski
2021-01-11 14:10   ` Alex Elder
2021-01-09  2:50 ` patchwork-bot+netdevbpf

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).