Skip to content

Conversation

@wangzhimin1179
Copy link
Contributor

飞腾D3000网卡驱动:phytium-mac

Li Wencheng and others added 2 commits May 27, 2024 17:10
This patch document the DT bindings for the Phytium MAC 1.0 and 2.0
controller.

Signed-off-by: Li Wencheng <liwencheng@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Zhimin <wangzhimin1179@phytium.com.cn>
This patch provides support for Phytium GMAC controller driver.

Signed-off-by: Song Wenting <songwenting@phytium.com.cn>
Signed-off-by: Li Wencheng <liwencheng@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Zhimin <wangzhimin1179@phytium.com.cn>
Signed-off-by: wangzhimin1179 <wangzhimin1179@phytium.com.cn>
@deepin-ci-robot
Copy link

Hi @wangzhimin1179. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign utsweetyfish for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff opsiff merged commit f837b44 into deepin-community:linux-6.6.y Jun 19, 2024
opsiff added a commit that referenced this pull request Jun 19, 2024
As f837b44 introduce ethernet driver phytmac for D3000 (#222),
enable config CONFIG_PHYTMAC{,_PLATFORM,PCI}=m.
opsiff added a commit that referenced this pull request Jun 19, 2024
As f837b44 introduce ethernet driver phytmac for D3000 (#222),
enable config CONFIG_PHYTMAC{,_PLATFORM,PCI}=m.
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Apr 27, 2025
As f837b44 introduce ethernet driver phytmac for D3000 (deepin-community#222),
enable config CONFIG_PHYTMAC{,_PLATFORM,PCI}=m.
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
This patch provides support for Phytium GMAC controller driver.

Signed-off-by: Song Wenting <songwenting@phytium.com.cn>
Signed-off-by: Li Wencheng <liwencheng@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Zhimin <wangzhimin1179@phytium.com.cn>
Signed-off-by: wangzhimin1179 <wangzhimin1179@phytium.com.cn>
Link: deepin-community#222
(cherry picked from commit 7bfe5a3)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	drivers/net/ethernet/Makefile
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
Add missing <linux/platform_device.h> include.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: deepin-community#222
(cherry picked from commit a139ef2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
Declare multiple functions as static functions to suppress warnings about
missing prototypes.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: deepin-community#222
(cherry picked from commit 170fc21)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
Fix a compilation error:

drivers/net/ethernet/phytium/phytmac_platform.c: In function ‘phytmac_plat_probe’:
drivers/net/ethernet/phytium/phytmac_platform.c:98:55: error: ‘np’ undeclared (first use in this function); did you mean ‘up’?
   98 |                 match = of_match_node(phytmac_dt_ids, np);
      |                                                       ^~
      |                                                       up

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: deepin-community#222
(cherry picked from commit d5c0881)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
Populate the supported interfaces bitmap and MAC capabilities mask for
    the phytium driver and remove the old validate implementation.
Link:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc0a75eb037539f68f7117a632673a75e39d8d6b

Signed-off-by: Wentao Guan <otgwt@outlook.com>
Link: deepin-community#222
(cherry picked from commit 3c77632)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
… void

0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

drivers/net/ethernet/phytium/phytmac_platform.c:243:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  243 |         .remove = phytmac_plat_remove,
      |                   ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/phytium/phytmac_platform.c:243:19: note: (near initialization for ‘phytmac_driver.<anonymous>.remove’)

Link: deepin-community#222
(cherry picked from commit 89a5ac2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
2111375: net: Add struct kernel_ethtool_ts_info
cause build error, so convert ethtool_ts_info to kernel_ethtool_ts_info

Log:
drivers/net/ethernet/phytium/phytmac_ethtool.c: In function ‘phytmac_get_ts_info’:
drivers/net/ethernet/phytium/phytmac_ethtool.c:204:45: error: passing argument 2 of ‘ethtool_op_get_ts_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  204 |         return ethtool_op_get_ts_info(ndev, info);
      |                                             ^~~~
      |                                             |
      |                                             struct ethtool_ts_info *
In file included from drivers/net/ethernet/phytium/phytmac_ethtool.c:3:
./include/linux/ethtool.h:1205:59: note: expected ‘struct kernel_ethtool_ts_info *’ but argument is of type ‘struct ethtool_ts_info *’
 1205 |                            struct kernel_ethtool_ts_info *eti);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/net/ethernet/phytium/phytmac_ethtool.c: At top level:
drivers/net/ethernet/phytium/phytmac_ethtool.c:522:43: error: initialization of ‘int (*)(struct net_device *, struct kernel_ethtool_ts_info *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_ts_info *)’ [-Werror=incompatible-pointer-types]
  522 |         .get_ts_info                    = phytmac_get_ts_info,
      |                                           ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/phytium/phytmac_ethtool.c:522:43: note: (near initialization for ‘phytmac_ethtool_ops.get_ts_info’)
cc1: all warnings being treated as errors

Link: deepin-community#222
(cherry picked from commit f20cf65)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
As f837b44 introduce ethernet driver phytmac for D3000 (deepin-community#222),
enable config CONFIG_PHYTMAC{,_PLATFORM,PCI}=m.

Link: deepin-community#289
(cherry picked from commit f4e0bf0)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
deepin inclusion
category: bugfix

[ drop pcim_iounmap_regions for v6.18, see ebf7547 ("mtip32xx: Remove unnecessary pcim_iounmap_regions() calls") ]
Link: deepin-community#222
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
deepin inclusion
category: bugfix

[ drop pcim_iounmap_regions for v6.18, see ebf7547 ("mtip32xx: Remove unnecessary pcim_iounmap_regions() calls") ]
Link: deepin-community#222
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
This patch provides support for Phytium GMAC controller driver.

Signed-off-by: Song Wenting <songwenting@phytium.com.cn>
Signed-off-by: Li Wencheng <liwencheng@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Zhimin <wangzhimin1179@phytium.com.cn>
Signed-off-by: wangzhimin1179 <wangzhimin1179@phytium.com.cn>
Link: #222
(cherry picked from commit 7bfe5a3)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	drivers/net/ethernet/Makefile
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
Add missing <linux/platform_device.h> include.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: #222
(cherry picked from commit a139ef2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
Declare multiple functions as static functions to suppress warnings about
missing prototypes.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: #222
(cherry picked from commit 170fc21)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
Fix a compilation error:

drivers/net/ethernet/phytium/phytmac_platform.c: In function ‘phytmac_plat_probe’:
drivers/net/ethernet/phytium/phytmac_platform.c:98:55: error: ‘np’ undeclared (first use in this function); did you mean ‘up’?
   98 |                 match = of_match_node(phytmac_dt_ids, np);
      |                                                       ^~
      |                                                       up

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: #222
(cherry picked from commit d5c0881)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
Populate the supported interfaces bitmap and MAC capabilities mask for
    the phytium driver and remove the old validate implementation.
Link:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc0a75eb037539f68f7117a632673a75e39d8d6b

Signed-off-by: Wentao Guan <otgwt@outlook.com>
Link: #222
(cherry picked from commit 3c77632)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
… void

0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

drivers/net/ethernet/phytium/phytmac_platform.c:243:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  243 |         .remove = phytmac_plat_remove,
      |                   ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/phytium/phytmac_platform.c:243:19: note: (near initialization for ‘phytmac_driver.<anonymous>.remove’)

Link: #222
(cherry picked from commit 89a5ac2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
2111375: net: Add struct kernel_ethtool_ts_info
cause build error, so convert ethtool_ts_info to kernel_ethtool_ts_info

Log:
drivers/net/ethernet/phytium/phytmac_ethtool.c: In function ‘phytmac_get_ts_info’:
drivers/net/ethernet/phytium/phytmac_ethtool.c:204:45: error: passing argument 2 of ‘ethtool_op_get_ts_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  204 |         return ethtool_op_get_ts_info(ndev, info);
      |                                             ^~~~
      |                                             |
      |                                             struct ethtool_ts_info *
In file included from drivers/net/ethernet/phytium/phytmac_ethtool.c:3:
./include/linux/ethtool.h:1205:59: note: expected ‘struct kernel_ethtool_ts_info *’ but argument is of type ‘struct ethtool_ts_info *’
 1205 |                            struct kernel_ethtool_ts_info *eti);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/net/ethernet/phytium/phytmac_ethtool.c: At top level:
drivers/net/ethernet/phytium/phytmac_ethtool.c:522:43: error: initialization of ‘int (*)(struct net_device *, struct kernel_ethtool_ts_info *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_ts_info *)’ [-Werror=incompatible-pointer-types]
  522 |         .get_ts_info                    = phytmac_get_ts_info,
      |                                           ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/phytium/phytmac_ethtool.c:522:43: note: (near initialization for ‘phytmac_ethtool_ops.get_ts_info’)
cc1: all warnings being treated as errors

Link: #222
(cherry picked from commit f20cf65)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
As f837b44 introduce ethernet driver phytmac for D3000 (#222),
enable config CONFIG_PHYTMAC{,_PLATFORM,PCI}=m.

Link: #289
(cherry picked from commit f4e0bf0)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
deepin inclusion
category: bugfix

[ drop pcim_iounmap_regions for v6.18, see ebf7547 ("mtip32xx: Remove unnecessary pcim_iounmap_regions() calls") ]
Link: #222
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants