mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
2558e7b443
Qualcomm NSS-DP is as its name says Qualcomms ethernet driver for the NSS subsystem (Networking subsystem) built-into various Qualcomm SoCs. It has 2 modes of operation: * Without NSS FW and rest of code required for offloading This is the one that we will use as the amount of kernel patching required for NSS offloading and the fact that its not upstreamable at all makes it unusable for us. Driver in this mode is rather basic, it currently only offers NAPI GRO (Added by us as part of the fixup) and basically relies on the powerfull CPU to get good throughput. * With NSS FW and rest of code required for offloading In this mode, driver just registers the interfaces and hooks them into NSS-ECM to allow offloading. This mode is not viable for use in OpenWrt due to reasons already described above. This driver is required for ipq807x to have wired networking until a better one is available, so lets add the fixed-up version for 5.15 for now. Signed-off-by: Robert Marko <robimarko@gmail.com>
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From cef7873a2d77df13ee702d902ed4e06b2248904b Mon Sep 17 00:00:00 2001
|
|
Message-Id: <cef7873a2d77df13ee702d902ed4e06b2248904b.1620066716.git.baruch@tkos.co.il>
|
|
In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
|
References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
|
From: Baruch Siach <baruch@tkos.co.il>
|
|
Date: Mon, 3 May 2021 20:17:22 +0300
|
|
Subject: [PATCH 2/3] nss_dp_main: make phy mode code compatible with newer
|
|
kernels
|
|
|
|
---
|
|
include/nss_dp_dev.h | 4 ++--
|
|
nss_dp_main.c | 4 ++++
|
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
--- a/include/nss_dp_dev.h
|
|
+++ b/include/nss_dp_dev.h
|
|
@@ -22,7 +22,7 @@
|
|
#include <linux/etherdevice.h>
|
|
#include <linux/netdevice.h>
|
|
#include <linux/platform_device.h>
|
|
-#include <linux/switch.h>
|
|
+#include <linux/phy.h>
|
|
#include <linux/version.h>
|
|
|
|
#include "nss_dp_api_if.h"
|
|
@@ -99,7 +99,7 @@ struct nss_dp_dev {
|
|
/* Phy related stuff */
|
|
struct phy_device *phydev; /* Phy device */
|
|
struct mii_bus *miibus; /* MII bus */
|
|
- uint32_t phy_mii_type; /* RGMII/SGMII/QSGMII */
|
|
+ phy_interface_t phy_mii_type; /* RGMII/SGMII/QSGMII */
|
|
uint32_t phy_mdio_addr; /* Mdio address */
|
|
bool link_poll; /* Link polling enable? */
|
|
uint32_t forced_speed; /* Forced speed? */
|
|
--- a/nss_dp_main.c
|
|
+++ b/nss_dp_main.c
|
|
@@ -584,7 +584,11 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
hal_pdata->netdev = netdev;
|
|
hal_pdata->macid = dp_priv->macid;
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
|
|
dp_priv->phy_mii_type = of_get_phy_mode(np);
|
|
+#else
|
|
+ of_get_phy_mode(np, &dp_priv->phy_mii_type);
|
|
+#endif
|
|
dp_priv->link_poll = of_property_read_bool(np, "qcom,link-poll");
|
|
if (of_property_read_u32(np, "qcom,phy-mdio-addr",
|
|
&dp_priv->phy_mdio_addr) && dp_priv->link_poll) {
|