diff mbox series

[net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links

Message ID 20210106100755.56800-1-stephan@gerhold.net (mailing list archive)
State Accepted
Commit afba9dc1f3a5390475006061c0bdc5ad4915878e
Delegated to: Netdev Maintainers
Headers show
Series [net] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Stephan Gerhold Jan. 6, 2021, 10:07 a.m. UTC
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(+)

Comments

Jakub Kicinski Jan. 8, 2021, 2:46 a.m. UTC | #1
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?
patchwork-bot+netdevbpf@kernel.org Jan. 9, 2021, 2:50 a.m. UTC | #2
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
Alex Elder Jan. 11, 2021, 2:10 p.m. UTC | #3
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
diff mbox series

Patch

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;