mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2025-12-17 09:16:59 +00:00
qualcommax: 6.12 nss support
This commit is contained in:
parent
bfe94963ec
commit
07c94fcc4f
@ -1,4 +1,4 @@
|
||||
src-git nss_packages https://github.com/qosmio/nss-packages.git
|
||||
src-git nss_packages https://github.com/LiBwrt/nss-packages.git
|
||||
src-git sqm_scripts_nss https://github.com/qosmio/sqm-scripts-nss.git
|
||||
src-git packages https://github.com/immortalwrt/packages.git
|
||||
src-git luci https://github.com/immortalwrt/luci.git
|
||||
|
||||
105
package/kernel/nat46/patches/122-fix_for_kernel_6.12.patch
Normal file
105
package/kernel/nat46/patches/122-fix_for_kernel_6.12.patch
Normal file
@ -0,0 +1,105 @@
|
||||
--- a/nat46/modules/nat46-netdev.c
|
||||
+++ b/nat46/modules/nat46-netdev.c
|
||||
@@ -171,12 +171,12 @@ static void nat46_netdev_setup(struct ne
|
||||
dev->hard_header_len = 0;
|
||||
dev->addr_len = 0;
|
||||
dev->mtu = 16384; /* iptables does reassembly. Rather than using ETH_DATA_LEN, let's try to get as much mileage as we can with the Linux stack */
|
||||
- dev->features = NETIF_F_NETNS_LOCAL;
|
||||
+ dev->netns_local = true;
|
||||
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
|
||||
dev->priv_flags_ext = IFF_EXT_MAPT;
|
||||
}
|
||||
|
||||
-int nat46_netdev_create(struct net *net, char *basename, struct net_device **dev)
|
||||
+static int nat46_netdev_create(struct net *net, char *basename, struct net_device **dev)
|
||||
{
|
||||
int ret = 0;
|
||||
char *devname = NULL;
|
||||
@@ -237,7 +237,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-void nat46_netdev_destroy(struct net_device *dev)
|
||||
+static void nat46_netdev_destroy(struct net_device *dev)
|
||||
{
|
||||
dev->flags &= ~IFF_UP;
|
||||
netif_stop_queue(dev);
|
||||
@@ -274,7 +274,7 @@ static struct net_device *find_dev(struc
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- read_lock(&dev_base_lock);
|
||||
+ //read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if((0 == strcmp(dev->name, name)) && is_nat46(dev)) {
|
||||
@@ -286,7 +286,7 @@ static struct net_device *find_dev(struc
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
+ //read_unlock(&dev_base_lock);
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ int nat46_remove(struct net *net, char *
|
||||
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m) {
|
||||
struct net_device *dev;
|
||||
- read_lock(&dev_base_lock);
|
||||
+ //read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if(is_nat46(dev)) {
|
||||
@@ -411,7 +411,7 @@ void nat64_show_all_configs(struct net *
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
+ //read_unlock(&dev_base_lock);
|
||||
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ void nat46_destroy_all(struct net *net)
|
||||
struct net_device *dev;
|
||||
struct net_device *nat46dev;
|
||||
do {
|
||||
- read_lock(&dev_base_lock);
|
||||
+ //read_lock(&dev_base_lock);
|
||||
nat46dev = NULL;
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
@@ -428,7 +428,7 @@ void nat46_destroy_all(struct net *net)
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
+ //read_unlock(&dev_base_lock);
|
||||
if(nat46dev) {
|
||||
nat46_netdev_destroy(nat46dev);
|
||||
}
|
||||
--- a/nat46/modules/nat46-core.c
|
||||
+++ b/nat46/modules/nat46-core.c
|
||||
@@ -16,6 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+//#include <cstring>
|
||||
#include <net/route.h>
|
||||
#include <net/ipv6_frag.h>
|
||||
#include <linux/version.h>
|
||||
@@ -213,10 +214,10 @@ void nat46_sort_rule_array(nat46_instanc
|
||||
int nelem = nat46->npairs;
|
||||
nat46_xlate_rulepair_t *array = NULL;
|
||||
|
||||
- memcpy(nat46->sorted_ipv4_local_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
- memcpy(nat46->sorted_ipv4_remote_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
- memcpy(nat46->sorted_ipv6_local_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
- memcpy(nat46->sorted_ipv6_remote_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
+ memmove(nat46->sorted_ipv4_local_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
+ memmove(nat46->sorted_ipv4_remote_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
+ memmove(nat46->sorted_ipv6_local_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
+ memmove(nat46->sorted_ipv6_remote_pairs, nat46->pairs, nelem * sizeof(nat46_xlate_rulepair_t));
|
||||
|
||||
array = &nat46->sorted_ipv4_local_pairs[0];
|
||||
for (i = 0; i < nelem - 1; i++) {
|
||||
@ -8,31 +8,22 @@ KERNELNAME:=Image
|
||||
CPU_TYPE:=cortex-a53
|
||||
SUBTARGETS:=ipq807x ipq60xx ipq50xx
|
||||
|
||||
KERNEL_PATCHVER:=6.6
|
||||
KERNEL_PATCHVER:=6.12
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
DEFAULT_PACKAGES += \
|
||||
autocore automount cpufreq e2fsprogs f2fsck mkf2fs losetup luci uboot-envtools wpad-openssl \
|
||||
autocore automount e2fsprogs f2fsck mkf2fs losetup luci uboot-envtools wpad-openssl \
|
||||
kmod-dsa kmod-dsa-qca8k kmod-fs-ext4 kmod-fs-f2fs kmod-gpio-button-hotplug kmod-leds-gpio \
|
||||
kmod-ath11k kmod-ath11k-ahb kmod-ath11k-pci kmod-phy-aquantia kmod-phy-marvell kmod-phy-qca83xx \
|
||||
kmod-usb3 kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-qca-nss-dp \
|
||||
kmod-qca-nss-crypto kmod-qca-nss-ecm kmod-qca-nss-drv \
|
||||
kmod-qca-nss-ecm kmod-qca-nss-drv \
|
||||
kmod-qca-nss-drv-bridge-mgr \
|
||||
kmod-qca-nss-drv-eogremgr \
|
||||
kmod-qca-nss-drv-gre \
|
||||
kmod-qca-nss-drv-igs \
|
||||
kmod-qca-nss-drv-l2tpv2 \
|
||||
kmod-qca-nss-drv-lag-mgr \
|
||||
kmod-qca-nss-drv-map-t \
|
||||
kmod-qca-nss-drv-match \
|
||||
kmod-qca-nss-drv-mirror \
|
||||
kmod-qca-nss-drv-pppoe \
|
||||
kmod-qca-nss-drv-pptp \
|
||||
kmod-qca-nss-drv-qdisc \
|
||||
kmod-qca-nss-drv-tun6rd \
|
||||
kmod-qca-nss-drv-tunipip6 \
|
||||
kmod-qca-nss-drv-vlan-mgr \
|
||||
kmod-qca-nss-drv-vxlanmgr \
|
||||
kmod-qca-nss-drv-wifi-meshmgr \
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@ -11,11 +11,13 @@ CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PKEY_BITS=3
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_WANTS_EXECMEM_LATE=y
|
||||
CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_ARCH_WANTS_THP_SWAP=y
|
||||
CONFIG_ARM64=y
|
||||
@ -28,15 +30,16 @@ CONFIG_ARM64_ERRATUM_2067961=y
|
||||
CONFIG_ARM64_ERRATUM_2077057=y
|
||||
CONFIG_ARM64_ERRATUM_2658417=y
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_PLATFORM_DEVICES=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
# CONFIG_ARM64_VA_BITS_52 is not set
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
|
||||
@ -47,14 +50,15 @@ CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
# CONFIG_ARM_MHU_V3 is not set
|
||||
CONFIG_ARM_PSCI_CPUIDLE=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
|
||||
CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_AUXILIARY_BUS=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
@ -64,11 +68,18 @@ CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
|
||||
CONFIG_CAVIUM_TX2_ERRATUM_219=y
|
||||
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
# CONFIG_CLK_QCM2290_GPUCC is not set
|
||||
# CONFIG_CLK_X1E80100_CAMCC is not set
|
||||
# CONFIG_CLK_X1E80100_DISPCC is not set
|
||||
# CONFIG_CLK_X1E80100_GCC is not set
|
||||
# CONFIG_CLK_X1E80100_GPUCC is not set
|
||||
# CONFIG_CLK_X1E80100_TCSRCC is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_QCOM=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
# CONFIG_COMPRESSED_INSTALL is not set
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_COREDUMP=y
|
||||
@ -133,6 +144,7 @@ CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_NEED_SYNC=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DTC=y
|
||||
@ -157,6 +169,7 @@ CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_DEVICES=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
@ -188,6 +201,7 @@ CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HWSPINLOCK_QCOM=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
@ -197,6 +211,9 @@ CONFIG_I2C_QUP=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INTERCONNECT=y
|
||||
CONFIG_INTERCONNECT_CLK=y
|
||||
# CONFIG_INTERCONNECT_QCOM is not set
|
||||
# CONFIG_IPQ5018_PHY is not set
|
||||
CONFIG_IPQ_APSS_6018=y
|
||||
CONFIG_IPQ_APSS_PLL=y
|
||||
@ -207,17 +224,20 @@ CONFIG_IPQ_APSS_PLL=y
|
||||
# CONFIG_IPQ_GCC_6018 is not set
|
||||
# CONFIG_IPQ_GCC_8074 is not set
|
||||
# CONFIG_IPQ_GCC_9574 is not set
|
||||
# CONFIG_IPQ_NSSCC_QCA8K is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MSI_LIB=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_KPSS_XCC is not set
|
||||
CONFIG_LEDS_TLC591XX=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LRU_GEN_WALKS_MMU=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MAILBOX=y
|
||||
@ -237,7 +257,6 @@ CONFIG_MMC_CQHCI=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_MSM=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
@ -265,7 +284,6 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
# CONFIG_NETKIT is not set
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
@ -275,6 +293,7 @@ CONFIG_NLS=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
# CONFIG_NSM is not set
|
||||
CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
@ -309,6 +328,7 @@ CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_PCIE_QCOM_COMMON=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
@ -362,6 +382,7 @@ CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_SDM670 is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
# CONFIG_PINCTRL_SDX75 is not set
|
||||
# CONFIG_PINCTRL_SM4450 is not set
|
||||
# CONFIG_PINCTRL_SM6350 is not set
|
||||
# CONFIG_PINCTRL_SM6375 is not set
|
||||
# CONFIG_PINCTRL_SM7150 is not set
|
||||
@ -369,6 +390,8 @@ CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_SM8250 is not set
|
||||
# CONFIG_PINCTRL_SM8450 is not set
|
||||
# CONFIG_PINCTRL_SM8550 is not set
|
||||
# CONFIG_PINCTRL_SM8650 is not set
|
||||
# CONFIG_PINCTRL_X1E80100 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_OPP=y
|
||||
@ -376,7 +399,6 @@ CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_POWER_RESET_MSM is not set
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QCA807X_PHY=y
|
||||
@ -393,12 +415,14 @@ CONFIG_QCOM_BAM_DMA=y
|
||||
# CONFIG_QCOM_CLK_APCS_MSM8916 is not set
|
||||
# CONFIG_QCOM_COMMAND_DB is not set
|
||||
# CONFIG_QCOM_CPR is not set
|
||||
# CONFIG_QCOM_CPUCP_MBOX is not set
|
||||
# CONFIG_QCOM_EBI2 is not set
|
||||
# CONFIG_QCOM_FASTRPC is not set
|
||||
# CONFIG_QCOM_GENI_SE is not set
|
||||
# CONFIG_QCOM_GSBI is not set
|
||||
# CONFIG_QCOM_HFPLL is not set
|
||||
# CONFIG_QCOM_ICC_BWMON is not set
|
||||
# CONFIG_QCOM_IPA is not set
|
||||
# CONFIG_QCOM_IPCC is not set
|
||||
# CONFIG_QCOM_LLCC is not set
|
||||
CONFIG_QCOM_MDT_LOADER=y
|
||||
@ -413,13 +437,13 @@ CONFIG_QCOM_Q6V5_COMMON=y
|
||||
# CONFIG_QCOM_Q6V5_MSS is not set
|
||||
# CONFIG_QCOM_Q6V5_PAS is not set
|
||||
CONFIG_QCOM_Q6V5_WCSS=y
|
||||
# CONFIG_QCOM_QSEECOM is not set
|
||||
# CONFIG_QCOM_RAMP_CTRL is not set
|
||||
# CONFIG_QCOM_RMTFS_MEM is not set
|
||||
# CONFIG_QCOM_RPMH is not set
|
||||
# CONFIG_QCOM_RPM_MASTER_STATS is not set
|
||||
CONFIG_QCOM_RPROC_COMMON=y
|
||||
CONFIG_QCOM_SCM=y
|
||||
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
|
||||
# CONFIG_QCOM_SMD_RPM is not set
|
||||
CONFIG_QCOM_SMEM=y
|
||||
CONFIG_QCOM_SMEM_STATE=y
|
||||
@ -430,12 +454,16 @@ CONFIG_QCOM_SOCINFO=y
|
||||
# CONFIG_QCOM_STATS is not set
|
||||
# CONFIG_QCOM_SYSMON is not set
|
||||
CONFIG_QCOM_TSENS=y
|
||||
CONFIG_QCOM_TZMEM=y
|
||||
CONFIG_QCOM_TZMEM_MODE_GENERIC=y
|
||||
# CONFIG_QCOM_TZMEM_MODE_SHMBRIDGE is not set
|
||||
# CONFIG_QCOM_WCNSS_CTRL is not set
|
||||
# CONFIG_QCOM_WCNSS_PIL is not set
|
||||
CONFIG_QCOM_WDT=y
|
||||
# CONFIG_QCS_GCC_404 is not set
|
||||
# CONFIG_QCS_Q6SSTOP_404 is not set
|
||||
# CONFIG_QCS_TURING_404 is not set
|
||||
# CONFIG_QDU_ECPRICC_1000 is not set
|
||||
# CONFIG_QDU_GCC_1000 is not set
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
@ -473,14 +501,15 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
# CONFIG_SA_GCC_8775P is not set
|
||||
# CONFIG_SA_GPUCC_8775P is not set
|
||||
# CONFIG_SCHED_CORE is not set
|
||||
CONFIG_SCHED_HW_PRESSURE=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_SCHED_THERMAL_PRESSURE=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SC_CAMCC_7280 is not set
|
||||
# CONFIG_SC_CAMCC_8280XP is not set
|
||||
# CONFIG_SC_DISPCC_7180 is not set
|
||||
# CONFIG_SC_DISPCC_8280XP is not set
|
||||
# CONFIG_SC_GCC_7180 is not set
|
||||
@ -490,7 +519,6 @@ CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SC_LPASSCC_8280XP is not set
|
||||
# CONFIG_SC_LPASS_CORECC_7180 is not set
|
||||
# CONFIG_SC_LPASS_CORECC_7280 is not set
|
||||
# CONFIG_SC_MSS_7180 is not set
|
||||
# CONFIG_SC_VIDEOCC_7180 is not set
|
||||
# CONFIG_SDM_CAMCC_845 is not set
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
@ -506,18 +534,22 @@ CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SKB_RECYCLER=y
|
||||
# CONFIG_SKB_RECYCLER_MULTI_CPU is not set
|
||||
# CONFIG_SKB_RECYCLER_PREALLOC is not set
|
||||
CONFIG_SKB_RECYCLE_SIZE=2304
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_SM_CAMCC_4450 is not set
|
||||
# CONFIG_SM_CAMCC_6350 is not set
|
||||
# CONFIG_SM_CAMCC_7150 is not set
|
||||
# CONFIG_SM_CAMCC_8150 is not set
|
||||
# CONFIG_SM_CAMCC_8450 is not set
|
||||
# CONFIG_SM_CAMCC_8550 is not set
|
||||
# CONFIG_SM_CAMCC_8650 is not set
|
||||
# CONFIG_SM_GCC_4450 is not set
|
||||
# CONFIG_SM_GCC_7150 is not set
|
||||
# CONFIG_SM_GCC_8150 is not set
|
||||
# CONFIG_SM_GCC_8250 is not set
|
||||
# CONFIG_SM_GCC_8450 is not set
|
||||
# CONFIG_SM_GCC_8550 is not set
|
||||
# CONFIG_SM_GCC_8650 is not set
|
||||
# CONFIG_SM_GPUCC_4450 is not set
|
||||
# CONFIG_SM_GPUCC_6115 is not set
|
||||
# CONFIG_SM_GPUCC_6125 is not set
|
||||
# CONFIG_SM_GPUCC_6350 is not set
|
||||
@ -527,12 +559,14 @@ CONFIG_SMP=y
|
||||
# CONFIG_SM_GPUCC_8350 is not set
|
||||
# CONFIG_SM_GPUCC_8450 is not set
|
||||
# CONFIG_SM_GPUCC_8550 is not set
|
||||
# CONFIG_SM_GPUCC_8650 is not set
|
||||
# CONFIG_SM_TCSRCC_8550 is not set
|
||||
# CONFIG_SM_TCSRCC_8650 is not set
|
||||
# CONFIG_SM_VIDEOCC_7150 is not set
|
||||
# CONFIG_SM_VIDEOCC_8150 is not set
|
||||
# CONFIG_SM_VIDEOCC_8250 is not set
|
||||
# CONFIG_SM_VIDEOCC_8350 is not set
|
||||
# CONFIG_SM_VIDEOCC_8450 is not set
|
||||
# CONFIG_SM_VIDEOCC_8550 is not set
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BUS=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
@ -546,10 +580,13 @@ CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
# CONFIG_SPI_QPIC_SNAND is not set
|
||||
CONFIG_SPI_QUP=y
|
||||
CONFIG_SPLIT_PMD_PTLOCKS=y
|
||||
CONFIG_SPLIT_PTE_PTLOCKS=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
# CONFIG_TEST_FPU is not set
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
@ -569,9 +606,12 @@ CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USER_STACKTRACE_SUPPORT=y
|
||||
CONFIG_VDSO_GETRANDOM=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_ANCHOR=y
|
||||
# CONFIG_VIRTIO_BLK is not set
|
||||
# CONFIG_VIRTIO_DEBUG is not set
|
||||
# CONFIG_VIRTIO_NET is not set
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_WANT_DEV_COREDUMP=y
|
||||
@ -21,43 +21,19 @@
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "skbuff_debug.h"
|
||||
#define CPU_NAME_SIZE 7
|
||||
|
||||
static struct proc_dir_entry *proc_net_skbrecycler;
|
||||
static struct proc_dir_entry *proc_net_skbrecycler_per_cpu;
|
||||
|
||||
static DEFINE_PER_CPU(struct sk_buff_head, recycle_list);
|
||||
static int skb_recycler_max_skbs_core[NR_CPUS];
|
||||
static int skb_recycle_max_skbs = SKB_RECYCLE_MAX_SKBS;
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
static DEFINE_PER_CPU(struct sk_buff_head, recycle_spare_list);
|
||||
static int skb_recycler_max_spare_skbs_core[NR_CPUS];
|
||||
static struct global_recycler glob_recycler;
|
||||
static int skb_recycle_spare_max_skbs = SKB_RECYCLE_SPARE_MAX_SKBS;
|
||||
#endif
|
||||
|
||||
static int skb_recycling_enable = 1;
|
||||
|
||||
/**
|
||||
* skb_recycler_clear_flags - Clear skb flags
|
||||
* @skb: skb pointer
|
||||
*
|
||||
* This API clears the skb recycler flags here to make sure that all fast path
|
||||
* and DS related skb flags are being reset.
|
||||
*
|
||||
* Return: Void
|
||||
*/
|
||||
void skb_recycler_clear_flags(struct sk_buff *skb)
|
||||
{
|
||||
skb->fast_xmit = 0;
|
||||
skb->is_from_recycler = 0;
|
||||
skb->fast_recycled = 0;
|
||||
skb->recycled_for_ds = 0;
|
||||
skb->fast_qdisc = 0;
|
||||
skb->int_pri = 0;
|
||||
}
|
||||
|
||||
inline struct sk_buff *skb_recycler_alloc(struct net_device *dev,
|
||||
unsigned int length, bool reset_skb)
|
||||
{
|
||||
@ -131,8 +107,6 @@ inline struct sk_buff *skb_recycler_alloc(struct net_device *dev,
|
||||
|
||||
if (likely(skb)) {
|
||||
struct skb_shared_info *shinfo;
|
||||
bool is_fast_recycled = skb->fast_recycled;
|
||||
bool recycled_for_ds = skb->recycled_for_ds;
|
||||
|
||||
/* We're about to write a large amount to the skb to
|
||||
* zero most of the structure so prefetch the start
|
||||
@ -144,31 +118,20 @@ inline struct sk_buff *skb_recycler_alloc(struct net_device *dev,
|
||||
* (by DS rings), and the buffer is found to be recycled by
|
||||
* DS previously
|
||||
*/
|
||||
if (reset_skb || !recycled_for_ds) {
|
||||
if (!is_fast_recycled) {
|
||||
|
||||
shinfo = skb_shinfo(skb);
|
||||
prefetchw(shinfo);
|
||||
zero_struct(shinfo, offsetof(struct skb_shared_info, dataref));
|
||||
atomic_set(&shinfo->dataref, 1);
|
||||
}
|
||||
zero_struct(skb, offsetof(struct sk_buff, tail));
|
||||
refcount_set(&skb->users, 1);
|
||||
skb->mac_header = (typeof(skb->mac_header))~0U;
|
||||
skb->transport_header = (typeof(skb->transport_header))~0U;
|
||||
}
|
||||
zero_struct(shinfo, offsetof(struct skb_shared_info, dataref));
|
||||
atomic_set(&shinfo->dataref, 1);
|
||||
|
||||
skb->data = skb->head + NET_SKB_PAD;
|
||||
skb_reset_tail_pointer(skb);
|
||||
skb->dev = dev;
|
||||
|
||||
skb->is_from_recycler = 1;
|
||||
/* Restore fast_recycled flag */
|
||||
if (is_fast_recycled) {
|
||||
skb->fast_recycled = 1;
|
||||
}
|
||||
if (likely(recycled_for_ds)) {
|
||||
skb->recycled_for_ds = 1;
|
||||
}
|
||||
} else {
|
||||
skb->dev = dev;
|
||||
}
|
||||
|
||||
return skb;
|
||||
@ -179,10 +142,6 @@ inline bool skb_recycler_consume(struct sk_buff *skb)
|
||||
unsigned long flags;
|
||||
struct sk_buff_head *h;
|
||||
struct sk_buff *ln = NULL;
|
||||
int max_skbs;
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
int max_spare_skbs;
|
||||
#endif
|
||||
|
||||
/* Consume the skbs if the skb_recycling_enable */
|
||||
if (unlikely(!skb_recycling_enable)) {
|
||||
@ -197,11 +156,10 @@ inline bool skb_recycler_consume(struct sk_buff *skb)
|
||||
/* If we can, then it will be much faster for us to recycle this one
|
||||
* later than to allocate a new one from scratch.
|
||||
*/
|
||||
max_skbs = skb_recycler_max_skbs_core[get_cpu_index()];
|
||||
h = &get_cpu_var(recycle_list);
|
||||
local_irq_save(flags);
|
||||
/* Attempt to enqueue the CPU hot recycle list first */
|
||||
if (likely(skb_queue_len(h) < max_skbs)) {
|
||||
if (likely(skb_queue_len(h) < skb_recycle_max_skbs)) {
|
||||
ln = skb_peek(h);
|
||||
/* Recalculate the sum for peek of list as next and prev
|
||||
* pointers of skb->next will be updated in __skb_queue_head
|
||||
@ -215,14 +173,13 @@ inline bool skb_recycler_consume(struct sk_buff *skb)
|
||||
return true;
|
||||
}
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
max_spare_skbs = skb_recycler_max_spare_skbs_core[get_cpu_index()];
|
||||
h = this_cpu_ptr(&recycle_spare_list);
|
||||
|
||||
/* The CPU hot recycle list was full; if the spare list is also full,
|
||||
* attempt to move the spare list to the global list for other CPUs to
|
||||
* use.
|
||||
*/
|
||||
if (unlikely(skb_queue_len(h) >= max_spare_skbs)) {
|
||||
if (unlikely(skb_queue_len(h) >= skb_recycle_spare_max_skbs)) {
|
||||
u8 cur_tail, next_tail;
|
||||
|
||||
spin_lock(&glob_recycler.lock);
|
||||
@ -303,7 +260,7 @@ inline bool skb_recycler_consume_list_fast(struct sk_buff_head *skb_list)
|
||||
skb_queue_walk_safe(skb_list, skb, next) {
|
||||
if (skb) {
|
||||
__skb_unlink(skb, skb_list);
|
||||
consume_skb(skb);
|
||||
skb_recycler_consume(skb);
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,11 +271,6 @@ inline bool skb_recycler_consume_list_fast(struct sk_buff_head *skb_list)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct sk_buff_head *h;
|
||||
int max_skbs;
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
int max_spare_skbs;
|
||||
#endif
|
||||
max_skbs = skb_recycler_max_skbs_core[get_cpu_index()];
|
||||
|
||||
/* Allocate the recycled skbs if the skb_recycling_enable */
|
||||
if (unlikely(!skb_recycling_enable)) {
|
||||
@ -328,58 +280,13 @@ inline bool skb_recycler_consume_list_fast(struct sk_buff_head *skb_list)
|
||||
h = &get_cpu_var(recycle_list);
|
||||
local_irq_save(flags);
|
||||
/* Attempt to enqueue the CPU hot recycle list first */
|
||||
if (likely(skb_queue_len(h) < max_skbs)) {
|
||||
if (likely(skb_queue_len(h) < skb_recycle_max_skbs)) {
|
||||
skb_queue_splice(skb_list,h);
|
||||
local_irq_restore(flags);
|
||||
preempt_enable();
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
max_spare_skbs = skb_recycler_max_spare_skbs_core[get_cpu_index()];
|
||||
h = this_cpu_ptr(&recycle_spare_list);
|
||||
|
||||
/* The CPU hot recycle list was full; if the spare list is also full,
|
||||
* attempt to move the spare list to the global list for other CPUs to
|
||||
* use.
|
||||
*/
|
||||
if (unlikely(skb_queue_len(h) >= max_spare_skbs)) {
|
||||
u8 cur_tail, next_tail;
|
||||
|
||||
spin_lock(&glob_recycler.lock);
|
||||
cur_tail = glob_recycler.tail;
|
||||
next_tail = (cur_tail + 1) & SKB_RECYCLE_MAX_SHARED_POOLS_MASK;
|
||||
if (next_tail != glob_recycler.head) {
|
||||
struct sk_buff_head *p = &glob_recycler.pool[cur_tail];
|
||||
|
||||
/* Move SKBs from CPU pool to Global pool*/
|
||||
skb_queue_splice_init(h, p);
|
||||
|
||||
/* Done with global list init */
|
||||
glob_recycler.tail = next_tail;
|
||||
spin_unlock(&glob_recycler.lock);
|
||||
|
||||
/* We have now cleared room in the spare;
|
||||
* Initialize and enqueue skb into spare
|
||||
*/
|
||||
skb_queue_splice_init(skb_list, h);
|
||||
|
||||
local_irq_restore(flags);
|
||||
preempt_enable();
|
||||
return true;
|
||||
}
|
||||
/* We still have a full spare because the global is also full */
|
||||
spin_unlock(&glob_recycler.lock);
|
||||
} else {
|
||||
/* We have room in the spare list; enqueue to spare list */
|
||||
skb_queue_splice_init(skb_list, h);
|
||||
|
||||
local_irq_restore(flags);
|
||||
preempt_enable();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
local_irq_restore(flags);
|
||||
preempt_enable();
|
||||
|
||||
@ -397,7 +304,13 @@ static void skb_recycler_free_skb(struct sk_buff_head *list)
|
||||
skbuff_debugobj_activate(skb);
|
||||
next = skb->next;
|
||||
__skb_unlink(skb, list);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
|
||||
skb_release_data(skb, SKB_CONSUMED);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)
|
||||
skb_release_data(skb, SKB_CONSUMED, false);
|
||||
#else
|
||||
skb_release_data(skb);
|
||||
#endif
|
||||
kfree_skbmem(skb);
|
||||
/*
|
||||
* Update the skb->sum for next due to skb_link operation
|
||||
@ -443,32 +356,6 @@ static int __init skb_prealloc_init_list(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* skb_max_skbs_per_cpu_write_all
|
||||
* overwrite the max skbs for each CPUs.
|
||||
*/
|
||||
static void skb_max_skbs_per_cpu_write_all(unsigned int max_skbs)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
skb_recycler_max_skbs_core[cpu] = max_skbs;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
/* skb_max_spare_skbs_per_cpu_write_all
|
||||
* overwrite the max spare skbs for each CPUs.
|
||||
*/
|
||||
static void skb_max_spare_skbs_per_cpu_write_all(unsigned int max_spare_skbs)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
skb_recycler_max_spare_skbs_core[cpu] = max_spare_skbs;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* procfs: count
|
||||
* Show skb counts
|
||||
*/
|
||||
@ -616,10 +503,8 @@ static ssize_t proc_skb_max_skbs_write(struct file *file,
|
||||
if (copy_from_user(buffer, buf, count) != 0)
|
||||
return -EFAULT;
|
||||
ret = kstrtoint(strstrip(buffer), 10, &max);
|
||||
if (ret == 0 && max >= 0) {
|
||||
if (ret == 0 && max >= 0)
|
||||
skb_recycle_max_skbs = max;
|
||||
skb_max_skbs_per_cpu_write_all(max);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
@ -664,10 +549,8 @@ proc_skb_max_spare_skbs_write(struct file *file,
|
||||
if (copy_from_user(buffer, buf, count) != 0)
|
||||
return -EFAULT;
|
||||
ret = kstrtoint(strstrip(buffer), 10, &max);
|
||||
if (ret == 0 && max >= 0) {
|
||||
if (ret == 0 && max >= 0)
|
||||
skb_recycle_spare_max_skbs = max;
|
||||
skb_max_spare_skbs_per_cpu_write_all(max);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
@ -720,149 +603,8 @@ static const struct proc_ops proc_skb_recycle_enable_fops = {
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
union void_int {
|
||||
void *ptr;
|
||||
int num;
|
||||
};
|
||||
|
||||
/* procfs: count_per_cpu
|
||||
* Show counts per cpu
|
||||
*/
|
||||
static int proc_skb_count_per_cpu_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
int len;
|
||||
union void_int cpu = (union void_int)seq->private;
|
||||
|
||||
len = skb_queue_len(&per_cpu(recycle_list, cpu.num));
|
||||
seq_printf(seq, "recycle_list[%d]: %d\n", cpu.num, len);
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
len = skb_queue_len(&per_cpu(recycle_spare_list, cpu.num));
|
||||
seq_printf(seq, "recycle_spare_list[%d]: %d\n", cpu.num, len);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int proc_skb_count_per_cpu_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, proc_skb_count_per_cpu_show, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops proc_skb_count_per_cpu_fops = {
|
||||
.proc_open = proc_skb_count_per_cpu_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_release = single_release,
|
||||
.proc_lseek = seq_lseek,
|
||||
};
|
||||
|
||||
static int skb_recycler_per_cpu_show(struct seq_file *seq, void *v, bool is_spare_skb)
|
||||
{
|
||||
union void_int cpu = (union void_int)seq->private;
|
||||
|
||||
if (is_spare_skb) {
|
||||
seq_printf(seq, "%d\n", skb_recycler_max_spare_skbs_core[cpu.num]);
|
||||
} else {
|
||||
seq_printf(seq, "%d\n", skb_recycler_max_skbs_core[cpu.num]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t skb_recycler_per_cpu_write(struct file *file,
|
||||
const char __user *buf,
|
||||
size_t count,
|
||||
loff_t *ppos, bool is_spare_skb)
|
||||
{
|
||||
int ret;
|
||||
int max;
|
||||
char buffer[13];
|
||||
union void_int cpu;
|
||||
struct seq_file *seq;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
if (count > sizeof(buffer) - 1)
|
||||
count = sizeof(buffer) - 1;
|
||||
if (copy_from_user(buffer, buf, count) != 0)
|
||||
return -EFAULT;
|
||||
ret = kstrtoint(strstrip(buffer), 10, &max);
|
||||
if (ret == 0 && max >= 0) {
|
||||
seq = file->private_data;
|
||||
cpu = (union void_int)seq->private;
|
||||
|
||||
if (is_spare_skb) {
|
||||
skb_recycler_max_spare_skbs_core[cpu.num] = max;
|
||||
} else {
|
||||
skb_recycler_max_skbs_core[cpu.num] = max;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
/* procfs: max_spare_skbs_per_cpu
|
||||
* Show max spare skbs per cpu
|
||||
*/
|
||||
static int proc_skb_max_spare_skbs_per_cpu_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
return skb_recycler_per_cpu_show(seq, v, true);
|
||||
}
|
||||
|
||||
static int proc_skb_max_spare_skbs_per_cpu_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, proc_skb_max_spare_skbs_per_cpu_show, pde_data(inode));
|
||||
}
|
||||
|
||||
static ssize_t proc_skb_max_spare_skbs_per_cpu_write(struct file *file,
|
||||
const char __user *buf,
|
||||
size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return skb_recycler_per_cpu_write(file, buf, count, ppos, true);
|
||||
}
|
||||
|
||||
static const struct proc_ops proc_skb_max_spare_skbs_per_cpu_fops = {
|
||||
.proc_open = proc_skb_max_spare_skbs_per_cpu_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_write = proc_skb_max_spare_skbs_per_cpu_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* procfs: max_skbs_per_cpu
|
||||
* Show max skbs per cpu
|
||||
*/
|
||||
static int proc_skb_max_skbs_per_cpu_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
return skb_recycler_per_cpu_show(seq, v, false);
|
||||
}
|
||||
|
||||
static int proc_skb_max_skbs_per_cpu_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, proc_skb_max_skbs_per_cpu_show, pde_data(inode));
|
||||
}
|
||||
|
||||
static ssize_t proc_skb_max_skbs_per_cpu_write(struct file *file,
|
||||
const char __user *buf,
|
||||
size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return skb_recycler_per_cpu_write(file, buf, count, ppos, false);
|
||||
}
|
||||
|
||||
static const struct proc_ops proc_skb_max_skbs_per_cpu_fops = {
|
||||
.proc_open = proc_skb_max_skbs_per_cpu_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_write = proc_skb_max_skbs_per_cpu_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static void skb_recycler_init_procfs(void)
|
||||
{
|
||||
int cpu;
|
||||
union void_int icpu;
|
||||
char cpu_name[CPU_NAME_SIZE];
|
||||
|
||||
proc_net_skbrecycler = proc_mkdir("skb_recycler", init_net.proc_net);
|
||||
if (!proc_net_skbrecycler) {
|
||||
pr_err("cannot create skb_recycle proc dir");
|
||||
@ -901,27 +643,6 @@ static void skb_recycler_init_procfs(void)
|
||||
&proc_skb_recycle_enable_fops))
|
||||
pr_err("cannot create proc net skb_recycle enable\n");
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
icpu.num = cpu;
|
||||
snprintf(cpu_name, CPU_NAME_SIZE, "cpu%d", cpu);
|
||||
proc_net_skbrecycler_per_cpu = proc_mkdir(cpu_name, proc_net_skbrecycler);
|
||||
if (!proc_net_skbrecycler_per_cpu) {
|
||||
pr_err("cannot create cpu%d dir\n", cpu);
|
||||
return;
|
||||
}
|
||||
if (!proc_create_data("max_skb", S_IRUGO | S_IWUGO,
|
||||
proc_net_skbrecycler_per_cpu, &proc_skb_max_skbs_per_cpu_fops, icpu.ptr))
|
||||
pr_err("cannot create proc net skb_recycle max_skbs\n");
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
if (!proc_create_data("max_spare_skb", S_IRUGO | S_IWUGO,
|
||||
proc_net_skbrecycler_per_cpu, &proc_skb_max_spare_skbs_per_cpu_fops, icpu.ptr))
|
||||
pr_err("cannot create proc net skb_recycle max_spare_skbs\n");
|
||||
#endif
|
||||
if (!proc_create_data("count", S_IWUGO, proc_net_skbrecycler_per_cpu,
|
||||
&proc_skb_count_per_cpu_fops, icpu.ptr))
|
||||
pr_err("cannot create proc net skb_recycle held\n");
|
||||
}
|
||||
}
|
||||
|
||||
void __init skb_recycler_init(void)
|
||||
@ -933,13 +654,11 @@ void __init skb_recycler_init(void)
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
skb_queue_head_init(&per_cpu(recycle_list, cpu));
|
||||
skb_recycler_max_skbs_core[cpu] = 1024;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
for_each_possible_cpu(cpu) {
|
||||
skb_queue_head_init(&per_cpu(recycle_spare_list, cpu));
|
||||
skb_recycler_max_spare_skbs_core[cpu] = 256;
|
||||
}
|
||||
|
||||
spin_lock_init(&glob_recycler.lock);
|
||||
@ -961,11 +680,12 @@ void __init skb_recycler_init(void)
|
||||
|
||||
void skb_recycler_print_all_lists(void)
|
||||
{
|
||||
|
||||
unsigned long flags;
|
||||
int cpu;
|
||||
struct sk_buff_head *h;
|
||||
#ifdef CONFIG_SKB_RECYCLER_MULTI_CPU
|
||||
int i;
|
||||
struct sk_buff_head *h;
|
||||
int cpu;
|
||||
|
||||
cpu = get_cpu();
|
||||
spin_lock_irqsave(&glob_recycler.lock, flags);
|
||||
@ -986,11 +706,12 @@ void skb_recycler_print_all_lists(void)
|
||||
|
||||
preempt_disable();
|
||||
local_irq_save(flags);
|
||||
h = &per_cpu(recycle_list, cpu);
|
||||
skbuff_debugobj_print_skb_list(h->next, "Recycle List", cpu);
|
||||
h = &get_cpu_var(recycle_list);
|
||||
//skbuff_debugobj_print_skb_list(h->next, "Recycle List", cpu);
|
||||
|
||||
local_irq_restore(flags);
|
||||
preempt_enable();
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKB_FAST_RECYCLABLE_DEBUG_ENABLE
|
||||
@ -1010,7 +731,7 @@ static inline bool consume_skb_can_fast_recycle_debug(const struct sk_buff *skb,
|
||||
WARN(1, "skb_debug: irqs_disabled for skb = 0x%p \n", skb);
|
||||
return false;
|
||||
}
|
||||
if (unlikely(skb_zcopy(skb))) {
|
||||
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY)) {
|
||||
WARN(1, "skb_debug: ZEROCOPY flag set for skb = 0x%p \n", skb);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@ -24,7 +24,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
@ -43,6 +43,9 @@
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/if.h>
|
||||
|
||||
#ifndef CONFIG_SKB_RECYCLE_SIZE
|
||||
#define CONFIG_SKB_RECYCLE_SIZE 2304
|
||||
#endif
|
||||
#define SKB_RECYCLE_SIZE CONFIG_SKB_RECYCLE_SIZE
|
||||
#define SKB_RECYCLE_MIN_SIZE SKB_RECYCLE_SIZE
|
||||
#define SKB_RECYCLE_MAX_SIZE SKB_RECYCLE_SIZE
|
||||
@ -72,19 +75,6 @@ struct global_recycler {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static __always_inline int get_cpu_index(void)
|
||||
{
|
||||
int cpu_index = smp_processor_id();
|
||||
return cpu_index;
|
||||
}
|
||||
#else
|
||||
int get_cpu_index(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static __always_inline void zero_struct(void *v, int size)
|
||||
{
|
||||
u32 *s = (u32 *)v;
|
||||
@ -172,10 +162,8 @@ static inline bool consume_skb_can_recycle(const struct sk_buff *skb,
|
||||
if (unlikely(skb_pfmemalloc(skb)))
|
||||
return false;
|
||||
|
||||
#ifdef CONFIG_SKB_EXTENSIONS
|
||||
if (skb->active_extensions)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
cache-size = <0x80000>;
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
|
||||
@@ -30,47 +30,47 @@
|
||||
@@ -31,47 +31,47 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@ -182,7 +182,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
compatible = "cache";
|
||||
cache-level = <2>;
|
||||
cache-unified;
|
||||
@@ -993,10 +993,10 @@
|
||||
@@ -1015,10 +1015,10 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_alert>;
|
||||
@ -250,7 +250,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
cache-unified;
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
|
||||
@@ -33,12 +33,12 @@
|
||||
@@ -34,12 +34,12 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@ -265,7 +265,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
|
||||
clock-names = "cpu";
|
||||
operating-points-v2 = <&cpu_opp_table>;
|
||||
@@ -46,12 +46,12 @@
|
||||
@@ -47,12 +47,12 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
@ -280,7 +280,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
|
||||
clock-names = "cpu";
|
||||
operating-points-v2 = <&cpu_opp_table>;
|
||||
@@ -59,12 +59,12 @@
|
||||
@@ -60,12 +60,12 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
@ -295,7 +295,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
|
||||
clock-names = "cpu";
|
||||
operating-points-v2 = <&cpu_opp_table>;
|
||||
@@ -72,12 +72,12 @@
|
||||
@@ -73,12 +73,12 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
@ -310,7 +310,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
|
||||
clock-names = "cpu";
|
||||
operating-points-v2 = <&cpu_opp_table>;
|
||||
@@ -85,7 +85,7 @@
|
||||
@@ -86,7 +86,7 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
@ -319,7 +319,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
compatible = "cache";
|
||||
cache-level = <2>;
|
||||
cache-unified;
|
||||
@@ -845,10 +845,10 @@
|
||||
@@ -863,10 +863,10 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu0_alert>;
|
||||
@ -334,7 +334,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -875,10 +875,10 @@
|
||||
@@ -891,10 +891,10 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu1_alert>;
|
||||
@ -349,7 +349,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -905,10 +905,10 @@
|
||||
@@ -919,10 +919,10 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu2_alert>;
|
||||
@ -364,7 +364,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -935,10 +935,10 @@
|
||||
@@ -947,10 +947,10 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu3_alert>;
|
||||
@ -24,7 +24,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <850000>;
|
||||
+ opp-supported-hw = <0xf>;
|
||||
+ opp-supported-hw = <0x4>;
|
||||
+ clock-latency-ns = <200000>;
|
||||
+ };
|
||||
+
|
||||
@ -24,7 +24,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
+ opp-1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <937500>;
|
||||
+ opp-supported-hw = <0xf>;
|
||||
+ opp-supported-hw = <0x2>;
|
||||
+ clock-latency-ns = <200000>;
|
||||
+ };
|
||||
+
|
||||
@ -18,15 +18,28 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
3 files changed, 36 insertions(+), 15 deletions(-)
|
||||
create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
-#include "ipq6018.dtsi"
|
||||
+#include "ipq6018-mp5496.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. IPQ6018/AP-CP01-C1";
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,35 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
+/*
|
||||
+ * ipq6018-mp5496.dtsi describes common properties (e.g. regulators) that
|
||||
+ * apply to most devices that make use of the IPQ6018 SoC and MP5496 PMIC.
|
||||
+ */
|
||||
+
|
||||
+#include "ipq6018.dtsi"
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&ipq6018_s2>;
|
||||
+};
|
||||
@ -90,7 +103,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
@@ -184,16 +180,6 @@
|
||||
rpm_requests: rpm-requests {
|
||||
compatible = "qcom,rpm-ipq6018";
|
||||
compatible = "qcom,rpm-ipq6018", "qcom,glink-smd-rpm";
|
||||
qcom,glink-channels = "rpm_requests";
|
||||
-
|
||||
- regulators {
|
||||
@ -16,8 +16,8 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
@@ -5,26 +5,26 @@
|
||||
*/
|
||||
@@ -7,26 +7,26 @@
|
||||
#include "ipq6018.dtsi"
|
||||
|
||||
&cpu0 {
|
||||
- cpu-supply = <&ipq6018_s2>;
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi
|
||||
@@ -29,5 +29,14 @@
|
||||
@@ -31,5 +31,14 @@
|
||||
regulator-max-microvolt = <1062500>;
|
||||
regulator-always-on;
|
||||
};
|
||||
@ -21,7 +21,7 @@ Link: https://patch.msgid.link/20250326-ipq5018-pcie-v7-4-e1828fef06c9@outlook.c
|
||||
|
||||
--- a/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
@@ -1580,6 +1580,7 @@ static const struct of_device_id qcom_pc
|
||||
@@ -1827,6 +1827,7 @@ static const struct of_device_id qcom_pc
|
||||
{ .compatible = "qcom,pcie-apq8064", .data = &cfg_2_1_0 },
|
||||
{ .compatible = "qcom,pcie-apq8084", .data = &cfg_1_0_0 },
|
||||
{ .compatible = "qcom,pcie-ipq4019", .data = &cfg_2_4_0 },
|
||||
@ -0,0 +1,60 @@
|
||||
From ad2d07f71739351eeea1d8a120c0918e2c4b265f Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 22 Dec 2021 12:23:34 +0100
|
||||
Subject: [PATCH] arm64: dts: ipq8074: add reserved memory nodes
|
||||
|
||||
IPQ8074 has multiple reserved memory ranges, if they are not defined
|
||||
then weird things tend to happen, board hangs and resets when PCI or
|
||||
WLAN is used etc.
|
||||
|
||||
So, to avoid all of that add the reserved memory nodes from the downstream
|
||||
5.4 kernel from QCA.
|
||||
This is their default layout meant for devices with 1GB of RAM, but
|
||||
devices with lower ammounts can override the Q6 node.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 35 +++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
@@ -86,6 +86,16 @@
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
+ nss@40000000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x40000000 0x0 0x01000000>;
|
||||
+ };
|
||||
+
|
||||
+ tzapp_region: tzapp@4a400000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x4a400000 0x0 0x00200000>;
|
||||
+ };
|
||||
+
|
||||
bootloader@4a600000 {
|
||||
reg = <0x0 0x4a600000 0x0 0x400000>;
|
||||
no-map;
|
||||
@@ -108,6 +118,21 @@
|
||||
reg = <0x0 0x4ac00000 0x0 0x400000>;
|
||||
no-map;
|
||||
};
|
||||
+
|
||||
+ q6_region: wcnss@4b000000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x4b000000 0x0 0x05f00000>;
|
||||
+ };
|
||||
+
|
||||
+ q6_etr_region: q6_etr_dump@50f00000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x50f00000 0x0 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ m3_dump_region: m3_dump@51000000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x51000000 0x0 0x100000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
firmware {
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
@@ -760,7 +760,7 @@
|
||||
@@ -759,7 +759,7 @@
|
||||
reg = <0x0b000000 0x1000>, <0x0b002000 0x1000>;
|
||||
ranges = <0 0xb00a000 0xffd>;
|
||||
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
compatible = "arm,gic-v2m-frame";
|
||||
msi-controller;
|
||||
reg = <0x0 0xffd>;
|
||||
@@ -873,8 +873,7 @@
|
||||
@@ -872,8 +872,7 @@
|
||||
ranges = <0x81000000 0x0 0x00000000 0x10200000 0x0 0x10000>, /* I/O */
|
||||
<0x82000000 0x0 0x10220000 0x10220000 0x0 0xfde0000>; /* MEM */
|
||||
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0x7>;
|
||||
interrupt-map = <0 0 0 1 &intc 0 0 142
|
||||
@@ -945,8 +944,7 @@
|
||||
@@ -944,8 +943,7 @@
|
||||
ranges = <0x81000000 0x0 0x00000000 0x20200000 0x0 0x10000>, /* I/O */
|
||||
<0x82000000 0x0 0x20220000 0x20220000 0x0 0xfde0000>; /* MEM */
|
||||
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
struct regulator *cx_supply;
|
||||
struct qcom_sysmon *sysmon;
|
||||
|
||||
@@ -151,6 +139,21 @@ struct q6v5_wcss {
|
||||
@@ -152,6 +140,21 @@ struct q6v5_wcss {
|
||||
struct qcom_rproc_ssr ssr_subdev;
|
||||
};
|
||||
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
static int q6v5_wcss_reset(struct q6v5_wcss *wcss)
|
||||
{
|
||||
int ret;
|
||||
@@ -240,6 +243,12 @@ static int q6v5_wcss_start(struct rproc
|
||||
@@ -241,6 +244,12 @@ static int q6v5_wcss_start(struct rproc
|
||||
struct q6v5_wcss *wcss = rproc->priv;
|
||||
int ret;
|
||||
|
||||
@ -78,7 +78,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
qcom_q6v5_prepare(&wcss->q6v5);
|
||||
|
||||
/* Release Q6 and WCSS reset */
|
||||
@@ -733,6 +742,7 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
@@ -734,6 +743,7 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
qcom_q6v5_unprepare(&wcss->q6v5);
|
||||
|
||||
return 0;
|
||||
@@ -899,7 +909,21 @@ static int q6v5_alloc_memory_region(stru
|
||||
@@ -900,7 +910,21 @@ static int q6v5_alloc_memory_region(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -989,7 +1013,7 @@ static int q6v5_wcss_init_clock(struct q
|
||||
@@ -990,7 +1014,7 @@ static int q6v5_wcss_init_clock(struct q
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -118,25 +118,25 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
{
|
||||
wcss->cx_supply = devm_regulator_get(wcss->dev, "cx");
|
||||
if (IS_ERR(wcss->cx_supply))
|
||||
@@ -1033,12 +1057,14 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1034,12 +1058,14 @@ static int q6v5_wcss_probe(struct platfo
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
return ret;
|
||||
|
||||
- if (wcss->version == WCSS_QCS404) {
|
||||
- ret = q6v5_wcss_init_clock(wcss);
|
||||
+ if (desc->init_clock) {
|
||||
+ ret = desc->init_clock(wcss);
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
- ret = q6v5_wcss_init_regulator(wcss);
|
||||
+ if (desc->init_regulator) {
|
||||
+ ret = desc->init_regulator(wcss);
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
return ret;
|
||||
}
|
||||
@@ -1084,6 +1110,7 @@ static void q6v5_wcss_remove(struct plat
|
||||
@@ -1081,6 +1107,7 @@ static void q6v5_wcss_remove(struct plat
|
||||
}
|
||||
|
||||
static const struct wcss_data wcss_ipq8074_res_init = {
|
||||
@ -144,7 +144,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
.firmware_name = "IPQ8074/q6_fw.mdt",
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
.aon_reset_required = true,
|
||||
@@ -1093,6 +1120,8 @@ static const struct wcss_data wcss_ipq80
|
||||
@@ -1090,6 +1117,8 @@ static const struct wcss_data wcss_ipq80
|
||||
};
|
||||
|
||||
static const struct wcss_data wcss_qcs404_res_init = {
|
||||
@ -39,8 +39,8 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
+ bool need_mem_protection;
|
||||
|
||||
struct qcom_rproc_glink glink_subdev;
|
||||
struct qcom_rproc_ssr ssr_subdev;
|
||||
@@ -152,6 +157,7 @@ struct wcss_data {
|
||||
struct qcom_rproc_pdm pdm_subdev;
|
||||
@@ -153,6 +158,7 @@ struct wcss_data {
|
||||
int ssctl_id;
|
||||
const struct rproc_ops *ops;
|
||||
bool requires_force_stop;
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
};
|
||||
|
||||
static int q6v5_wcss_reset(struct q6v5_wcss *wcss)
|
||||
@@ -251,6 +257,15 @@ static int q6v5_wcss_start(struct rproc
|
||||
@@ -252,6 +258,15 @@ static int q6v5_wcss_start(struct rproc
|
||||
|
||||
qcom_q6v5_prepare(&wcss->q6v5);
|
||||
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
/* Release Q6 and WCSS reset */
|
||||
ret = reset_control_deassert(wcss->wcss_reset);
|
||||
if (ret) {
|
||||
@@ -285,6 +300,7 @@ static int q6v5_wcss_start(struct rproc
|
||||
@@ -286,6 +301,7 @@ static int q6v5_wcss_start(struct rproc
|
||||
if (ret)
|
||||
goto wcss_q6_reset;
|
||||
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
ret = qcom_q6v5_wait_for_start(&wcss->q6v5, 5 * HZ);
|
||||
if (ret == -ETIMEDOUT)
|
||||
dev_err(wcss->dev, "start timed out\n");
|
||||
@@ -718,6 +734,15 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
@@ -719,6 +735,15 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
struct q6v5_wcss *wcss = rproc->priv;
|
||||
int ret;
|
||||
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
/* WCSS powerdown */
|
||||
if (wcss->requires_force_stop) {
|
||||
ret = qcom_q6v5_request_stop(&wcss->q6v5, NULL);
|
||||
@@ -742,6 +767,7 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
@@ -743,6 +768,7 @@ static int q6v5_wcss_stop(struct rproc *
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
clk_disable_unprepare(wcss->prng_clk);
|
||||
qcom_q6v5_unprepare(&wcss->q6v5);
|
||||
|
||||
@@ -765,9 +791,15 @@ static int q6v5_wcss_load(struct rproc *
|
||||
@@ -766,9 +792,15 @@ static int q6v5_wcss_load(struct rproc *
|
||||
struct q6v5_wcss *wcss = rproc->priv;
|
||||
int ret;
|
||||
|
||||
@ -115,17 +115,17 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1035,6 +1067,9 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1036,6 +1068,9 @@ static int q6v5_wcss_probe(struct platfo
|
||||
if (!desc)
|
||||
return -EINVAL;
|
||||
|
||||
+ if (desc->need_mem_protection && !qcom_scm_is_available())
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
rproc = rproc_alloc(&pdev->dev, pdev->name, desc->ops,
|
||||
rproc = devm_rproc_alloc(&pdev->dev, pdev->name, desc->ops,
|
||||
desc->firmware_name, sizeof(*wcss));
|
||||
if (!rproc) {
|
||||
@@ -1048,6 +1083,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1049,6 +1084,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
|
||||
wcss->version = desc->version;
|
||||
wcss->requires_force_stop = desc->requires_force_stop;
|
||||
@ -133,7 +133,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
|
||||
ret = q6v5_wcss_init_mmio(wcss, pdev);
|
||||
if (ret)
|
||||
@@ -1117,6 +1153,7 @@ static const struct wcss_data wcss_ipq80
|
||||
@@ -1114,6 +1150,7 @@ static const struct wcss_data wcss_ipq80
|
||||
.wcss_q6_reset_required = true,
|
||||
.ops = &q6v5_wcss_ipq8074_ops,
|
||||
.requires_force_stop = true,
|
||||
@ -24,8 +24,8 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
+ const char *m3_firmware_name;
|
||||
|
||||
struct qcom_rproc_glink glink_subdev;
|
||||
struct qcom_rproc_ssr ssr_subdev;
|
||||
@@ -147,7 +148,8 @@ struct q6v5_wcss {
|
||||
struct qcom_rproc_pdm pdm_subdev;
|
||||
@@ -148,7 +149,8 @@ struct q6v5_wcss {
|
||||
struct wcss_data {
|
||||
int (*init_clock)(struct q6v5_wcss *wcss);
|
||||
int (*init_regulator)(struct q6v5_wcss *wcss);
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
unsigned int crash_reason_smem;
|
||||
u32 version;
|
||||
bool aon_reset_required;
|
||||
@@ -789,8 +791,29 @@ static void *q6v5_wcss_da_to_va(struct r
|
||||
@@ -790,8 +792,29 @@ static void *q6v5_wcss_da_to_va(struct r
|
||||
static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw)
|
||||
{
|
||||
struct q6v5_wcss *wcss = rproc->priv;
|
||||
@ -65,16 +65,16 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
if (wcss->need_mem_protection)
|
||||
ret = qcom_mdt_load(wcss->dev, fw, rproc->firmware,
|
||||
WCNSS_PAS_ID, wcss->mem_region,
|
||||
@@ -1071,7 +1094,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1072,7 +1095,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
rproc = rproc_alloc(&pdev->dev, pdev->name, desc->ops,
|
||||
rproc = devm_rproc_alloc(&pdev->dev, pdev->name, desc->ops,
|
||||
- desc->firmware_name, sizeof(*wcss));
|
||||
+ desc->q6_firmware_name, sizeof(*wcss));
|
||||
if (!rproc) {
|
||||
dev_err(&pdev->dev, "failed to allocate rproc\n");
|
||||
return -ENOMEM;
|
||||
@@ -1084,6 +1107,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1085,6 +1108,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
wcss->version = desc->version;
|
||||
wcss->requires_force_stop = desc->requires_force_stop;
|
||||
wcss->need_mem_protection = desc->need_mem_protection;
|
||||
@ -82,7 +82,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
|
||||
ret = q6v5_wcss_init_mmio(wcss, pdev);
|
||||
if (ret)
|
||||
@@ -1147,7 +1171,8 @@ static void q6v5_wcss_remove(struct plat
|
||||
@@ -1144,7 +1168,8 @@ static void q6v5_wcss_remove(struct plat
|
||||
|
||||
static const struct wcss_data wcss_ipq8074_res_init = {
|
||||
.init_clock = ipq8074_init_clock,
|
||||
@ -92,7 +92,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
.aon_reset_required = true,
|
||||
.wcss_q6_reset_required = true,
|
||||
@@ -1160,7 +1185,7 @@ static const struct wcss_data wcss_qcs40
|
||||
@@ -1157,7 +1182,7 @@ static const struct wcss_data wcss_qcs40
|
||||
.init_clock = qcs404_init_clock,
|
||||
.init_regulator = qcs404_init_regulator,
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
@@ -1176,6 +1176,7 @@ static const struct wcss_data wcss_ipq80
|
||||
@@ -1173,6 +1173,7 @@ static const struct wcss_data wcss_ipq80
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
.aon_reset_required = true,
|
||||
.wcss_q6_reset_required = true,
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
||||
|
||||
#define WCNSS_PAS_ID 6
|
||||
|
||||
@@ -154,6 +154,7 @@ struct wcss_data {
|
||||
@@ -155,6 +155,7 @@ struct wcss_data {
|
||||
u32 version;
|
||||
bool aon_reset_required;
|
||||
bool wcss_q6_reset_required;
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
||||
const char *ssr_name;
|
||||
const char *sysmon_name;
|
||||
int ssctl_id;
|
||||
@@ -875,10 +876,13 @@ static int q6v5_wcss_init_reset(struct q
|
||||
@@ -876,10 +877,13 @@ static int q6v5_wcss_init_reset(struct q
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -928,9 +932,9 @@ static int q6v5_wcss_init_mmio(struct q6
|
||||
@@ -929,9 +933,9 @@ static int q6v5_wcss_init_mmio(struct q6
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1176,6 +1180,7 @@ static const struct wcss_data wcss_ipq80
|
||||
@@ -1173,6 +1177,7 @@ static const struct wcss_data wcss_ipq80
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
.aon_reset_required = true,
|
||||
.wcss_q6_reset_required = true,
|
||||
@ -69,7 +69,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
||||
.ssr_name = "q6wcss",
|
||||
.ops = &q6v5_wcss_ipq8074_ops,
|
||||
.requires_force_stop = true,
|
||||
@@ -1190,6 +1195,7 @@ static const struct wcss_data wcss_qcs40
|
||||
@@ -1187,6 +1192,7 @@ static const struct wcss_data wcss_qcs40
|
||||
.version = WCSS_QCS404,
|
||||
.aon_reset_required = false,
|
||||
.wcss_q6_reset_required = false,
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
@@ -161,6 +161,7 @@ struct wcss_data {
|
||||
@@ -162,6 +162,7 @@ struct wcss_data {
|
||||
const struct rproc_ops *ops;
|
||||
bool requires_force_stop;
|
||||
bool need_mem_protection;
|
||||
@ -22,15 +22,15 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
};
|
||||
|
||||
static int q6v5_wcss_reset(struct q6v5_wcss *wcss)
|
||||
@@ -1149,6 +1150,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
@@ -1151,6 +1152,7 @@ static int q6v5_wcss_probe(struct platfo
|
||||
desc->sysmon_name,
|
||||
desc->ssctl_id);
|
||||
|
||||
+ rproc->auto_boot = desc->need_auto_boot;
|
||||
ret = rproc_add(rproc);
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
@@ -1185,6 +1187,7 @@ static const struct wcss_data wcss_ipq80
|
||||
return ret;
|
||||
@@ -1182,6 +1184,7 @@ static const struct wcss_data wcss_ipq80
|
||||
.ops = &q6v5_wcss_ipq8074_ops,
|
||||
.requires_force_stop = true,
|
||||
.need_mem_protection = true,
|
||||
@ -38,7 +38,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
};
|
||||
|
||||
static const struct wcss_data wcss_qcs404_res_init = {
|
||||
@@ -1201,6 +1204,7 @@ static const struct wcss_data wcss_qcs40
|
||||
@@ -1198,6 +1201,7 @@ static const struct wcss_data wcss_qcs40
|
||||
.ssctl_id = 0x12,
|
||||
.ops = &q6v5_wcss_qcs404_ops,
|
||||
.requires_force_stop = false,
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
@@ -150,6 +150,32 @@
|
||||
@@ -142,6 +142,32 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
soc: soc@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -428,6 +454,11 @@
|
||||
@@ -415,6 +441,11 @@
|
||||
reg = <0x01937000 0x21000>;
|
||||
};
|
||||
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
spmi_bus: spmi@200f000 {
|
||||
compatible = "qcom,spmi-pmic-arb";
|
||||
reg = <0x0200f000 0x001000>,
|
||||
@@ -995,6 +1026,56 @@
|
||||
@@ -994,6 +1025,56 @@
|
||||
ranges;
|
||||
};
|
||||
};
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
@@ -1076,6 +1076,117 @@
|
||||
@@ -1075,6 +1075,117 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
|
||||
@@ -346,6 +346,106 @@
|
||||
@@ -326,6 +326,106 @@
|
||||
reg = <0x000a4000 0x2000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@ -0,0 +1,27 @@
|
||||
From 7e102b1eb2ca3eff7a6f33ebeab17825e6f70956 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Mon, 4 Nov 2024 22:01:24 +0100
|
||||
Subject: [PATCH] arm64: dts: qcom: ipq6018: add NSS reserved memory
|
||||
|
||||
It seems that despite NSS not being supported in OpenWrt the memory it
|
||||
usually uses needs to be reserved anyway for stability reasons.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
|
||||
@@ -194,6 +194,11 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
+ nss_region: memory@40000000 {
|
||||
+ reg = <0x0 0x40000000 0x0 0x01000000>;
|
||||
+ no-map;
|
||||
+ };
|
||||
+
|
||||
bootloader@4a100000 {
|
||||
reg = <0x0 0x4a100000 0x0 0x400000>;
|
||||
no-map;
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
|
||||
@@ -969,7 +969,7 @@ static int q6v5_alloc_memory_region(stru
|
||||
@@ -970,7 +970,7 @@ static int q6v5_alloc_memory_region(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1176,7 +1176,7 @@ static void q6v5_wcss_remove(struct plat
|
||||
@@ -1173,7 +1173,7 @@ static void q6v5_wcss_remove(struct plat
|
||||
}
|
||||
|
||||
static const struct wcss_data wcss_ipq8074_res_init = {
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
|
||||
.q6_firmware_name = "IPQ8074/q6_fw.mdt",
|
||||
.m3_firmware_name = "IPQ8074/m3_fw.mdt",
|
||||
.crash_reason_smem = WCSS_CRASH_REASON,
|
||||
@@ -1190,6 +1190,20 @@ static const struct wcss_data wcss_ipq80
|
||||
@@ -1187,6 +1187,20 @@ static const struct wcss_data wcss_ipq80
|
||||
.need_auto_boot = false,
|
||||
};
|
||||
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
|
||||
static const struct wcss_data wcss_qcs404_res_init = {
|
||||
.init_clock = qcs404_init_clock,
|
||||
.init_regulator = qcs404_init_regulator,
|
||||
@@ -1209,6 +1223,7 @@ static const struct wcss_data wcss_qcs40
|
||||
@@ -1206,6 +1220,7 @@ static const struct wcss_data wcss_qcs40
|
||||
|
||||
static const struct of_device_id q6v5_wcss_of_match[] = {
|
||||
{ .compatible = "qcom,ipq8074-wcss-pil", .data = &wcss_ipq8074_res_init },
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
|
||||
@@ -448,8 +448,21 @@
|
||||
@@ -417,8 +417,21 @@
|
||||
};
|
||||
|
||||
tcsr: syscon@1937000 {
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
|
||||
--- a/drivers/pwm/Kconfig
|
||||
+++ b/drivers/pwm/Kconfig
|
||||
@@ -282,6 +282,18 @@ config PWM_INTEL_LGM
|
||||
@@ -319,6 +319,18 @@ config PWM_INTEL_LGM
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called pwm-intel-lgm.
|
||||
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
depends on MFD_IQS62X || COMPILE_TEST
|
||||
--- a/drivers/pwm/Makefile
|
||||
+++ b/drivers/pwm/Makefile
|
||||
@@ -24,6 +24,7 @@ obj-$(CONFIG_PWM_IMX1) += pwm-imx1.o
|
||||
@@ -27,6 +27,7 @@ obj-$(CONFIG_PWM_IMX1) += pwm-imx1.o
|
||||
obj-$(CONFIG_PWM_IMX27) += pwm-imx27.o
|
||||
obj-$(CONFIG_PWM_IMX_TPM) += pwm-imx-tpm.o
|
||||
obj-$(CONFIG_PWM_INTEL_LGM) += pwm-intel-lgm.o
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
obj-$(CONFIG_PWM_KEEMBAY) += pwm-keembay.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/pwm/pwm-ipq.c
|
||||
@@ -0,0 +1,280 @@
|
||||
@@ -0,0 +1,261 @@
|
||||
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2016-2017, 2020 The Linux Foundation. All rights reserved.
|
||||
@ -96,14 +96,13 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
+#define IPQ_PWM_REG1_ENABLE BIT(31)
|
||||
+
|
||||
+struct ipq_pwm_chip {
|
||||
+ struct pwm_chip chip;
|
||||
+ struct clk *clk;
|
||||
+ void __iomem *mem;
|
||||
+};
|
||||
+
|
||||
+static struct ipq_pwm_chip *ipq_pwm_from_chip(struct pwm_chip *chip)
|
||||
+{
|
||||
+ return container_of(chip, struct ipq_pwm_chip, chip);
|
||||
+ return pwmchip_get_drvdata(chip);
|
||||
+}
|
||||
+
|
||||
+static unsigned int ipq_pwm_reg_read(struct pwm_device *pwm, unsigned int reg)
|
||||
@ -264,56 +263,39 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
+static const struct pwm_ops ipq_pwm_ops = {
|
||||
+ .apply = ipq_pwm_apply,
|
||||
+ .get_state = ipq_pwm_get_state,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int ipq_pwm_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct pwm_chip *chip;
|
||||
+ struct ipq_pwm_chip *pwm;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ pwm = devm_kzalloc(dev, sizeof(*pwm), GFP_KERNEL);
|
||||
+ if (!pwm)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, pwm);
|
||||
+ chip = devm_pwmchip_alloc(dev, 4, sizeof(*pwm));
|
||||
+ if (IS_ERR(chip))
|
||||
+ return PTR_ERR(chip);
|
||||
+ pwm = ipq_pwm_from_chip(chip);
|
||||
+
|
||||
+ pwm->mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
+ if (IS_ERR(pwm->mem))
|
||||
+ return dev_err_probe(dev, PTR_ERR(pwm->mem),
|
||||
+ "regs map failed");
|
||||
+
|
||||
+ pwm->clk = devm_clk_get(dev, NULL);
|
||||
+ pwm->clk = devm_clk_get_enabled(dev, NULL);
|
||||
+ if (IS_ERR(pwm->clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(pwm->clk),
|
||||
+ "failed to get clock");
|
||||
+
|
||||
+ ret = clk_prepare_enable(pwm->clk);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(dev, ret, "clock enable failed");
|
||||
+ chip->ops = &ipq_pwm_ops;
|
||||
+
|
||||
+ pwm->chip.dev = dev;
|
||||
+ pwm->chip.ops = &ipq_pwm_ops;
|
||||
+ pwm->chip.npwm = 4;
|
||||
+
|
||||
+ ret = pwmchip_add(&pwm->chip);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err_probe(dev, ret, "pwmchip_add() failed\n");
|
||||
+ clk_disable_unprepare(pwm->clk);
|
||||
+ }
|
||||
+ ret = devm_pwmchip_add(dev, chip);
|
||||
+ if (ret < 0)
|
||||
+ dev_err_probe(dev, ret, "devm_pwmchip_add() failed\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void ipq_pwm_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct ipq_pwm_chip *pwm = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ pwmchip_remove(&pwm->chip);
|
||||
+ clk_disable_unprepare(pwm->clk);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id pwm_ipq_dt_match[] = {
|
||||
+ { .compatible = "qcom,ipq6018-pwm", },
|
||||
+ {}
|
||||
@ -326,7 +308,6 @@ Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
|
||||
+ .of_match_table = pwm_ipq_dt_match,
|
||||
+ },
|
||||
+ .probe = ipq_pwm_probe,
|
||||
+ .remove_new = ipq_pwm_remove,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(ipq_pwm_driver);
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
|
||||
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
|
||||
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
|
||||
@@ -18,6 +18,7 @@ properties:
|
||||
@@ -19,6 +19,7 @@ properties:
|
||||
- enum:
|
||||
- qcom,apq8064-qfprom
|
||||
- qcom,apq8084-qfprom
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
- qcom,msm8956-tsens
|
||||
- qcom,msm8976-tsens
|
||||
- qcom,qcs404-tsens
|
||||
@@ -232,6 +233,7 @@ allOf:
|
||||
@@ -234,6 +235,7 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
|
||||
--- a/drivers/thermal/qcom/tsens.c
|
||||
+++ b/drivers/thermal/qcom/tsens.c
|
||||
@@ -974,7 +974,7 @@ int __init init_common(struct tsens_priv
|
||||
@@ -975,7 +975,7 @@ int __init init_common(struct tsens_priv
|
||||
ret = regmap_field_read(priv->rf[TSENS_EN], &enabled);
|
||||
if (ret)
|
||||
goto err_put_device;
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
+};
|
||||
--- a/drivers/thermal/qcom/tsens.c
|
||||
+++ b/drivers/thermal/qcom/tsens.c
|
||||
@@ -1101,6 +1101,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, t
|
||||
@@ -1102,6 +1102,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, t
|
||||
|
||||
static const struct of_device_id tsens_table[] = {
|
||||
{
|
||||
@ -107,7 +107,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
}, {
|
||||
--- a/drivers/thermal/qcom/tsens.h
|
||||
+++ b/drivers/thermal/qcom/tsens.h
|
||||
@@ -645,7 +645,7 @@ extern struct tsens_plat_data data_8960;
|
||||
@@ -650,7 +650,7 @@ extern struct tsens_plat_data data_8960;
|
||||
extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8974, data_9607;
|
||||
|
||||
/* TSENS v1 targets */
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -149,6 +149,117 @@
|
||||
@@ -147,6 +147,117 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -133,7 +133,7 @@ Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
tlmm: pinctrl@1000000 {
|
||||
compatible = "qcom,ipq5018-tlmm";
|
||||
reg = <0x01000000 0x300000>;
|
||||
@@ -391,6 +502,64 @@
|
||||
@@ -388,6 +499,64 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -109,7 +109,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -260,6 +260,40 @@
|
||||
@@ -258,6 +258,40 @@
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
|
||||
@ -150,7 +150,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
tlmm: pinctrl@1000000 {
|
||||
compatible = "qcom,ipq5018-tlmm";
|
||||
reg = <0x01000000 0x300000>;
|
||||
@@ -283,8 +317,8 @@
|
||||
@@ -281,8 +315,8 @@
|
||||
reg = <0x01800000 0x80000>;
|
||||
clocks = <&xo_board_clk>,
|
||||
<&sleep_clk>,
|
||||
@ -161,7 +161,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
<0>,
|
||||
<0>,
|
||||
<0>,
|
||||
@@ -501,6 +535,208 @@
|
||||
@@ -498,6 +532,208 @@
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -335,6 +335,11 @@
|
||||
@@ -332,6 +332,11 @@
|
||||
#hwlock-cells = <1>;
|
||||
};
|
||||
|
||||
@ -9,7 +9,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -82,6 +82,7 @@
|
||||
@@ -80,6 +80,7 @@
|
||||
scm {
|
||||
compatible = "qcom,scm-ipq5018", "qcom,scm";
|
||||
qcom,sdi-enabled;
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -341,6 +341,16 @@
|
||||
@@ -338,6 +338,16 @@
|
||||
reg = <0x01937000 0x21000>;
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -295,6 +295,30 @@
|
||||
@@ -293,6 +293,30 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -222,6 +222,14 @@
|
||||
@@ -220,6 +220,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -420,6 +420,16 @@
|
||||
@@ -417,6 +417,16 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -444,6 +444,21 @@
|
||||
@@ -441,6 +441,21 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
From 2e1ab53e8fcf708db51f560f7846802d406ee57d Mon Sep 17 00:00:00 2001
|
||||
From: George Moussalem <george.moussalem@outlook.com>
|
||||
Date: Thu, 15 May 2025 22:47:43 +0200
|
||||
Subject: [PATCH] spi: spi-qpic-snand: default to 4-bit ECC
|
||||
|
||||
There are NAND IC-s that define 1-bit ECC as the minimal strength,
|
||||
however that is unsupported by QPIC-SNAND as it only supports 4 or 8 bit
|
||||
ECC.
|
||||
|
||||
Since most of these chips also support 4-bit ECC just fine, instead of
|
||||
erroring out if 1-bit ECC is requested lets instead default to 4-bit ECC.
|
||||
|
||||
Fixes: 01b72ce61e8f ("qualcommax: ipq50xx: remove ECC user config from board files")
|
||||
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/spi/spi-qpic-snand.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
--- a/drivers/spi/spi-qpic-snand.c
|
||||
+++ b/drivers/spi/spi-qpic-snand.c
|
||||
@@ -296,6 +296,24 @@ static int qcom_spi_ecc_init_ctx_pipelin
|
||||
ecc_cfg->spare_bytes = 2;
|
||||
break;
|
||||
|
||||
+ case 1:
|
||||
+ case 2:
|
||||
+ /*
|
||||
+ * Many chips have set a minimum ECC strength requirement
|
||||
+ * lower than 4-bits but also support higher strength, so
|
||||
+ * check if ecc_cfg was set by chip reqs and try 4-bits.
|
||||
+ */
|
||||
+ if (reqs->strength) {
|
||||
+ dev_warn(snandc->dev,
|
||||
+ "ECC strength requirement of %u-bit(s) is unsupported, trying 4-bits\n",
|
||||
+ reqs->strength);
|
||||
+ ecc_cfg->ecc_mode = ECC_MODE_4BIT;
|
||||
+ ecc_cfg->ecc_bytes_hw = 7;
|
||||
+ ecc_cfg->spare_bytes = 4;
|
||||
+ break;
|
||||
+ } else
|
||||
+ fallthrough;
|
||||
+
|
||||
default:
|
||||
dev_err(snandc->dev,
|
||||
"only 4 or 8 bits ECC strength is supported\n");
|
||||
@ -13,7 +13,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -459,6 +459,36 @@
|
||||
@@ -456,6 +456,36 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -81,52 +81,7 @@
|
||||
__be16 vlan_proto, u16 vlan_id)
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1761,6 +1761,36 @@ enum netdev_priv_flags {
|
||||
IFF_NO_IP_ALIGN = BIT_ULL(34),
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * enum netdev_priv_flags_ext - &struct net_device priv_flags_ext
|
||||
+ *
|
||||
+ * These flags are used to check for device type and can be
|
||||
+ * set and used by the drivers
|
||||
+ *
|
||||
+ * @IFF_EXT_TUN_TAP: device is a TUN/TAP device
|
||||
+ * @IFF_EXT_PPP_L2TPV2: device is a L2TPV2 device
|
||||
+ * @IFF_EXT_PPP_L2TPV3: device is a L2TPV3 device
|
||||
+ * @IFF_EXT_PPP_PPTP: device is a PPTP device
|
||||
+ * @IFF_EXT_GRE_V4_TAP: device is a GRE IPv4 TAP device
|
||||
+ * @IFF_EXT_GRE_V6_TAP: device is a GRE IPv6 TAP device
|
||||
+ * @IFF_EXT_IFB: device is an IFB device
|
||||
+ * @IFF_EXT_MAPT: device is an MAPT device
|
||||
+ * @IFF_EXT_HW_NO_OFFLOAD: device is an NON Offload device
|
||||
+ * @IFF_EXT_L2TPV3: device is a L2TPV3 Ethernet device
|
||||
+ */
|
||||
+enum netdev_priv_flags_ext {
|
||||
+ IFF_EXT_TUN_TAP = 1<<0,
|
||||
+ IFF_EXT_PPP_L2TPV2 = 1<<1,
|
||||
+ IFF_EXT_PPP_L2TPV3 = 1<<2,
|
||||
+ IFF_EXT_PPP_PPTP = 1<<3,
|
||||
+ IFF_EXT_GRE_V4_TAP = 1<<4,
|
||||
+ IFF_EXT_GRE_V6_TAP = 1<<5,
|
||||
+ IFF_EXT_IFB = 1<<6,
|
||||
+ IFF_EXT_MAPT = 1<<7,
|
||||
+ IFF_EXT_HW_NO_OFFLOAD = 1<<8,
|
||||
+ IFF_EXT_ETH_L2TPV3 = 1<<9,
|
||||
+};
|
||||
+
|
||||
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
|
||||
#define IFF_EBRIDGE IFF_EBRIDGE
|
||||
#define IFF_BONDING IFF_BONDING
|
||||
@@ -2126,6 +2156,7 @@ struct net_device {
|
||||
unsigned int flags;
|
||||
xdp_features_t xdp_features;
|
||||
unsigned long long priv_flags;
|
||||
+ unsigned int priv_flags_ext;
|
||||
const struct net_device_ops *netdev_ops;
|
||||
const struct xdp_metadata_ops *xdp_metadata_ops;
|
||||
int ifindex;
|
||||
@@ -2939,6 +2970,10 @@ enum netdev_cmd {
|
||||
@@ -2907,6 +2907,10 @@ enum netdev_cmd {
|
||||
NETDEV_OFFLOAD_XSTATS_REPORT_USED,
|
||||
NETDEV_OFFLOAD_XSTATS_REPORT_DELTA,
|
||||
NETDEV_XDP_FEAT_CHANGE,
|
||||
@ -187,7 +142,7 @@
|
||||
#endif
|
||||
--- a/include/net/route.h
|
||||
+++ b/include/net/route.h
|
||||
@@ -238,6 +238,11 @@ struct rtable *rt_dst_alloc(struct net_d
|
||||
@@ -246,6 +246,11 @@ struct rtable *rt_dst_alloc(struct net_d
|
||||
unsigned int flags, u16 type, bool noxfrm);
|
||||
struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt);
|
||||
|
||||
@ -201,7 +156,7 @@
|
||||
void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *);
|
||||
--- a/net/bridge/br_private.h
|
||||
+++ b/net/bridge/br_private.h
|
||||
@@ -2268,4 +2268,6 @@ void br_do_suppress_nd(struct sk_buff *s
|
||||
@@ -2292,4 +2292,6 @@ void br_do_suppress_nd(struct sk_buff *s
|
||||
u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
|
||||
struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
|
||||
bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);
|
||||
@ -224,7 +179,7 @@
|
||||
+ if (!is_vlan_dev(dev))
|
||||
+ return;
|
||||
+
|
||||
+ stats = this_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats);
|
||||
+ stats = per_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats, 0);
|
||||
+
|
||||
+ u64_stats_update_begin(&stats->syncp);
|
||||
+ u64_stats_add(&stats->rx_packets, nlstats->rx_packets);
|
||||
@ -277,8 +232,8 @@
|
||||
+
|
||||
int __init br_fdb_init(void)
|
||||
{
|
||||
br_fdb_cache = kmem_cache_create("bridge_fdb_cache",
|
||||
@@ -195,6 +209,25 @@ static void fdb_notify(struct net_bridge
|
||||
br_fdb_cache = KMEM_CACHE(net_bridge_fdb_entry, SLAB_HWCACHE_ALIGN);
|
||||
@@ -192,6 +206,25 @@ static void fdb_notify(struct net_bridge
|
||||
if (swdev_notify)
|
||||
br_switchdev_fdb_notify(br, fdb, type);
|
||||
|
||||
@ -304,7 +259,7 @@
|
||||
skb = nlmsg_new(fdb_nlmsg_size(), GFP_ATOMIC);
|
||||
if (skb == NULL)
|
||||
goto errout;
|
||||
@@ -519,6 +552,22 @@ out:
|
||||
@@ -537,6 +570,22 @@ out:
|
||||
spin_unlock_bh(&br->hash_lock);
|
||||
}
|
||||
|
||||
@ -327,7 +282,7 @@
|
||||
void br_fdb_cleanup(struct work_struct *work)
|
||||
{
|
||||
struct net_bridge *br = container_of(work, struct net_bridge,
|
||||
@@ -527,6 +576,7 @@ void br_fdb_cleanup(struct work_struct *
|
||||
@@ -545,6 +594,7 @@ void br_fdb_cleanup(struct work_struct *
|
||||
unsigned long delay = hold_time(br);
|
||||
unsigned long work_delay = delay;
|
||||
unsigned long now = jiffies;
|
||||
@ -335,7 +290,7 @@
|
||||
|
||||
/* this part is tricky, in order to avoid blocking learning and
|
||||
* consequently forwarding, we rely on rcu to delete objects with
|
||||
@@ -553,8 +603,15 @@ void br_fdb_cleanup(struct work_struct *
|
||||
@@ -571,8 +621,15 @@ void br_fdb_cleanup(struct work_struct *
|
||||
work_delay = min(work_delay, this_timer - now);
|
||||
} else {
|
||||
spin_lock_bh(&br->hash_lock);
|
||||
@ -352,7 +307,7 @@
|
||||
spin_unlock_bh(&br->hash_lock);
|
||||
}
|
||||
}
|
||||
@@ -891,6 +948,12 @@ void br_fdb_update(struct net_bridge *br
|
||||
@@ -928,6 +985,12 @@ void br_fdb_update(struct net_bridge *br
|
||||
*/
|
||||
if (unlikely(test_bit(BR_FDB_LOCKED, &fdb->flags)))
|
||||
clear_bit(BR_FDB_LOCKED, &fdb->flags);
|
||||
@ -364,8 +319,8 @@
|
||||
+ /* QCA NSS ECM support - End */
|
||||
}
|
||||
|
||||
if (unlikely(test_bit(BR_FDB_ADDED_BY_USER, &flags)))
|
||||
@@ -914,6 +977,64 @@ void br_fdb_update(struct net_bridge *br
|
||||
if (unlikely(test_bit(BR_FDB_ADDED_BY_USER, &flags))) {
|
||||
@@ -955,6 +1018,64 @@ void br_fdb_update(struct net_bridge *br
|
||||
}
|
||||
}
|
||||
|
||||
@ -563,7 +518,7 @@
|
||||
+/* QCA NSS ECM support - End */
|
||||
--- a/net/core/neighbour.c
|
||||
+++ b/net/core/neighbour.c
|
||||
@@ -1275,6 +1275,22 @@ static void neigh_update_hhs(struct neig
|
||||
@@ -1277,6 +1277,22 @@ static void neigh_update_hhs(struct neig
|
||||
}
|
||||
}
|
||||
|
||||
@ -586,7 +541,7 @@
|
||||
/* Generic update routine.
|
||||
-- lladdr is new lladdr or NULL, if it is not supplied.
|
||||
-- new is new state.
|
||||
@@ -1303,6 +1319,7 @@ static int __neigh_update(struct neighbo
|
||||
@@ -1305,6 +1321,7 @@ static int __neigh_update(struct neighbo
|
||||
struct net_device *dev;
|
||||
int err, notify = 0;
|
||||
u8 old;
|
||||
@ -594,7 +549,7 @@
|
||||
|
||||
trace_neigh_update(neigh, lladdr, new, flags, nlmsg_pid);
|
||||
|
||||
@@ -1317,7 +1334,10 @@ static int __neigh_update(struct neighbo
|
||||
@@ -1319,7 +1336,10 @@ static int __neigh_update(struct neighbo
|
||||
new = old;
|
||||
goto out;
|
||||
}
|
||||
@ -606,7 +561,7 @@
|
||||
(old & (NUD_NOARP | NUD_PERMANENT)))
|
||||
goto out;
|
||||
|
||||
@@ -1354,7 +1374,12 @@ static int __neigh_update(struct neighbo
|
||||
@@ -1356,7 +1376,12 @@ static int __neigh_update(struct neighbo
|
||||
- compare new & old
|
||||
- if they are different, check override flag
|
||||
*/
|
||||
@ -620,7 +575,7 @@
|
||||
!memcmp(lladdr, neigh->ha, dev->addr_len))
|
||||
lladdr = neigh->ha;
|
||||
} else {
|
||||
@@ -1476,8 +1501,11 @@ out:
|
||||
@@ -1478,8 +1503,11 @@ out:
|
||||
neigh_update_gc_list(neigh);
|
||||
if (managed_update)
|
||||
neigh_update_managed_list(neigh);
|
||||
@ -635,7 +590,7 @@
|
||||
}
|
||||
--- a/net/ipv4/fib_trie.c
|
||||
+++ b/net/ipv4/fib_trie.c
|
||||
@@ -1211,6 +1211,9 @@ static bool fib_valid_key_len(u32 key, u
|
||||
@@ -1212,6 +1212,9 @@ static bool fib_valid_key_len(u32 key, u
|
||||
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
|
||||
struct key_vector *l, struct fib_alias *old);
|
||||
|
||||
@ -645,7 +600,7 @@
|
||||
/* Caller must hold RTNL. */
|
||||
int fib_table_insert(struct net *net, struct fib_table *tb,
|
||||
struct fib_config *cfg, struct netlink_ext_ack *extack)
|
||||
@@ -1404,6 +1407,9 @@ int fib_table_insert(struct net *net, st
|
||||
@@ -1405,6 +1408,9 @@ int fib_table_insert(struct net *net, st
|
||||
rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id,
|
||||
&cfg->fc_nlinfo, nlflags);
|
||||
succeeded:
|
||||
@ -698,7 +653,7 @@
|
||||
const struct in6_addr *daddr)
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -198,6 +198,9 @@ static void rt6_uncached_list_flush_dev(
|
||||
@@ -196,6 +196,9 @@ static void rt6_uncached_list_flush_dev(
|
||||
}
|
||||
}
|
||||
|
||||
@ -708,7 +663,7 @@
|
||||
static inline const void *choose_neigh_daddr(const struct in6_addr *p,
|
||||
struct sk_buff *skb,
|
||||
const void *daddr)
|
||||
@@ -3910,6 +3913,10 @@ int ip6_route_add(struct fib6_config *cf
|
||||
@@ -3917,6 +3920,10 @@ int ip6_route_add(struct fib6_config *cf
|
||||
return PTR_ERR(rt);
|
||||
|
||||
err = __ip6_ins_rt(rt, &cfg->fc_nlinfo, extack);
|
||||
@ -719,7 +674,7 @@
|
||||
fib6_info_release(rt);
|
||||
|
||||
return err;
|
||||
@@ -3931,6 +3938,9 @@ static int __ip6_del_rt(struct fib6_info
|
||||
@@ -3938,6 +3945,9 @@ static int __ip6_del_rt(struct fib6_info
|
||||
err = fib6_del(rt, info);
|
||||
spin_unlock_bh(&table->tb6_lock);
|
||||
|
||||
@ -729,7 +684,7 @@
|
||||
out:
|
||||
fib6_info_release(rt);
|
||||
return err;
|
||||
@@ -6393,6 +6403,20 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -6401,6 +6411,20 @@ static int ip6_route_dev_notify(struct n
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
@ -752,7 +707,7 @@
|
||||
*/
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -1730,6 +1730,7 @@ const char *netdev_cmd_to_name(enum netd
|
||||
@@ -1737,6 +1737,7 @@ const char *netdev_cmd_to_name(enum netd
|
||||
N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_ENABLE) N(OFFLOAD_XSTATS_DISABLE)
|
||||
N(OFFLOAD_XSTATS_REPORT_USED) N(OFFLOAD_XSTATS_REPORT_DELTA)
|
||||
N(XDP_FEAT_CHANGE)
|
||||
@ -762,7 +717,7 @@
|
||||
return "UNKNOWN_NETDEV_EVENT";
|
||||
--- a/net/ipv6/addrconf.c
|
||||
+++ b/net/ipv6/addrconf.c
|
||||
@@ -1002,6 +1002,7 @@ void inet6_ifa_finish_destroy(struct ine
|
||||
@@ -993,6 +993,7 @@ void inet6_ifa_finish_destroy(struct ine
|
||||
|
||||
kfree_rcu(ifp, rcu);
|
||||
}
|
||||
@ -772,7 +727,7 @@
|
||||
ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp)
|
||||
--- a/include/net/vxlan.h
|
||||
+++ b/include/net/vxlan.h
|
||||
@@ -440,6 +440,15 @@ static inline __be32 vxlan_compute_rco(u
|
||||
@@ -441,6 +441,15 @@ static inline __be32 vxlan_compute_rco(u
|
||||
return vni_field;
|
||||
}
|
||||
|
||||
@ -799,7 +754,7 @@
|
||||
IPPROTO_ENCAP = 98, /* Encapsulation Header */
|
||||
#define IPPROTO_ENCAP IPPROTO_ENCAP
|
||||
IPPROTO_PIM = 103, /* Protocol Independent Multicast */
|
||||
@@ -327,7 +329,7 @@ struct sockaddr_in {
|
||||
@@ -329,7 +331,7 @@ struct sockaddr_in {
|
||||
#endif
|
||||
|
||||
/* <asm/byteorder.h> contains the htonl type stuff.. */
|
||||
@ -819,7 +774,7 @@
|
||||
IPPROTO_ENCAP = 98, /* Encapsulation Header */
|
||||
#define IPPROTO_ENCAP IPPROTO_ENCAP
|
||||
IPPROTO_PIM = 103, /* Protocol Independent Multicast */
|
||||
@@ -327,7 +329,7 @@ struct sockaddr_in {
|
||||
@@ -329,7 +331,7 @@ struct sockaddr_in {
|
||||
#endif
|
||||
|
||||
/* <asm/byteorder.h> contains the htonl type stuff.. */
|
||||
@ -866,7 +821,7 @@
|
||||
/*
|
||||
* Get the required data from the packet.
|
||||
*/
|
||||
@@ -1285,7 +1289,7 @@ int nf_conntrack_tcp_packet(struct nf_co
|
||||
@@ -1286,7 +1290,7 @@ int nf_conntrack_tcp_packet(struct nf_co
|
||||
IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED &&
|
||||
timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK])
|
||||
timeout = timeouts[TCP_CONNTRACK_UNACK];
|
||||
@ -875,7 +830,7 @@
|
||||
timeouts[new_state] > timeouts[TCP_CONNTRACK_RETRANS])
|
||||
timeout = timeouts[TCP_CONNTRACK_RETRANS];
|
||||
else
|
||||
@@ -1601,6 +1605,9 @@ void nf_conntrack_tcp_init_net(struct ne
|
||||
@@ -1602,6 +1606,9 @@ void nf_conntrack_tcp_init_net(struct ne
|
||||
*/
|
||||
tn->tcp_be_liberal = 0;
|
||||
|
||||
@ -895,7 +850,7 @@
|
||||
NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST,
|
||||
NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS,
|
||||
NF_SYSCTL_CT_PROTO_TIMEOUT_UDP,
|
||||
@@ -834,6 +835,14 @@ static struct ctl_table nf_ct_sysctl_tab
|
||||
@@ -832,6 +833,14 @@ static struct ctl_table nf_ct_sysctl_tab
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
@ -910,7 +865,7 @@
|
||||
[NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST] = {
|
||||
.procname = "nf_conntrack_tcp_ignore_invalid_rst",
|
||||
.maxlen = sizeof(u8),
|
||||
@@ -1035,6 +1044,7 @@ static void nf_conntrack_standalone_init
|
||||
@@ -1031,6 +1040,7 @@ static void nf_conntrack_standalone_init
|
||||
|
||||
XASSIGN(LOOSE, &tn->tcp_loose);
|
||||
XASSIGN(LIBERAL, &tn->tcp_be_liberal);
|
||||
@ -918,51 +873,3 @@
|
||||
XASSIGN(MAX_RETRANS, &tn->tcp_max_retrans);
|
||||
XASSIGN(IGNORE_INVALID_RST, &tn->tcp_ignore_invalid_rst);
|
||||
#undef XASSIGN
|
||||
--- a/net/ipv4/ip_gre.c
|
||||
+++ b/net/ipv4/ip_gre.c
|
||||
@@ -667,6 +667,8 @@ static netdev_tx_t ipgre_xmit(struct sk_
|
||||
if (gre_handle_offloads(skb, !!(tunnel->parms.o_flags & TUNNEL_CSUM)))
|
||||
goto free_skb;
|
||||
|
||||
+ skb->skb_iif = dev->ifindex;
|
||||
+
|
||||
__gre_xmit(skb, dev, tnl_params, skb->protocol);
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
@@ -750,6 +752,8 @@ static netdev_tx_t gre_tap_xmit(struct s
|
||||
if (skb_cow_head(skb, dev->needed_headroom))
|
||||
goto free_skb;
|
||||
|
||||
+ skb->skb_iif = dev->ifindex;
|
||||
+
|
||||
__gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB));
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
@@ -1337,6 +1341,7 @@ static void ipgre_tap_setup(struct net_d
|
||||
dev->netdev_ops = &gre_tap_netdev_ops;
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
+ dev->priv_flags_ext |= IFF_EXT_GRE_V4_TAP;
|
||||
ip_tunnel_setup(dev, gre_tap_net_id);
|
||||
}
|
||||
|
||||
--- a/net/ipv6/ip6_gre.c
|
||||
+++ b/net/ipv6/ip6_gre.c
|
||||
@@ -1941,6 +1941,7 @@ static void ip6gre_tap_setup(struct net_
|
||||
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
+ dev->priv_flags_ext |= IFF_EXT_GRE_V6_TAP;
|
||||
netif_keep_dst(dev);
|
||||
}
|
||||
|
||||
--- a/drivers/net/tun.c
|
||||
+++ b/drivers/net/tun.c
|
||||
@@ -999,6 +999,7 @@ static int tun_net_init(struct net_devic
|
||||
dev->vlan_features = dev->features &
|
||||
~(NETIF_F_HW_VLAN_CTAG_TX |
|
||||
NETIF_F_HW_VLAN_STAG_TX);
|
||||
+ dev->priv_flags_ext |= IFF_EXT_TUN_TAP;
|
||||
|
||||
tun->flags = (tun->flags & ~TUN_FEATURES) |
|
||||
(ifr->ifr_flags & TUN_FEATURES);
|
||||
@ -329,9 +329,9 @@
|
||||
EXPORT_SYMBOL(ppp_register_compressor);
|
||||
EXPORT_SYMBOL(ppp_unregister_compressor);
|
||||
+EXPORT_SYMBOL(ppp_update_stats);
|
||||
MODULE_DESCRIPTION("Generic PPP layer driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_CHARDEV(PPP_MAJOR, 0);
|
||||
MODULE_ALIAS_RTNL_LINK("ppp");
|
||||
--- a/drivers/net/ppp/pppoe.c
|
||||
+++ b/drivers/net/ppp/pppoe.c
|
||||
@@ -62,6 +62,7 @@
|
||||
@ -464,6 +464,53 @@
|
||||
+ struct pppoe_opt *addressing);
|
||||
+
|
||||
#endif /* !(__LINUX_IF_PPPOX_H) */
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1690,6 +1690,36 @@ enum netdev_priv_flags {
|
||||
IFF_NO_IP_ALIGN = BIT_ULL(32),
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * enum netdev_priv_flags_ext - &struct net_device priv_flags_ext
|
||||
+ *
|
||||
+ * These flags are used to check for device type and can be
|
||||
+ * set and used by the drivers
|
||||
+ *
|
||||
+ * @IFF_EXT_TUN_TAP: device is a TUN/TAP device
|
||||
+ * @IFF_EXT_PPP_L2TPV2: device is a L2TPV2 device
|
||||
+ * @IFF_EXT_PPP_L2TPV3: device is a L2TPV3 device
|
||||
+ * @IFF_EXT_PPP_PPTP: device is a PPTP device
|
||||
+ * @IFF_EXT_GRE_V4_TAP: device is a GRE IPv4 TAP device
|
||||
+ * @IFF_EXT_GRE_V6_TAP: device is a GRE IPv6 TAP device
|
||||
+ * @IFF_EXT_IFB: device is an IFB device
|
||||
+ * @IFF_EXT_MAPT: device is an MAPT device
|
||||
+ * @IFF_EXT_HW_NO_OFFLOAD: device is an NON Offload device
|
||||
+ * @IFF_EXT_L2TPV3: device is a L2TPV3 Ethernet device
|
||||
+ */
|
||||
+enum netdev_priv_flags_ext {
|
||||
+ IFF_EXT_TUN_TAP = 1<<0,
|
||||
+ IFF_EXT_PPP_L2TPV2 = 1<<1,
|
||||
+ IFF_EXT_PPP_L2TPV3 = 1<<2,
|
||||
+ IFF_EXT_PPP_PPTP = 1<<3,
|
||||
+ IFF_EXT_GRE_V4_TAP = 1<<4,
|
||||
+ IFF_EXT_GRE_V6_TAP = 1<<5,
|
||||
+ IFF_EXT_IFB = 1<<6,
|
||||
+ IFF_EXT_MAPT = 1<<7,
|
||||
+ IFF_EXT_HW_NO_OFFLOAD = 1<<8,
|
||||
+ IFF_EXT_ETH_L2TPV3 = 1<<9,
|
||||
+};
|
||||
+
|
||||
/* Specifies the type of the struct net_device::ml_priv pointer */
|
||||
enum netdev_ml_priv_type {
|
||||
ML_PRIV_NONE,
|
||||
@@ -2026,6 +2056,7 @@ struct net_device {
|
||||
unsigned long priv_flags:32;
|
||||
unsigned long lltx:1;
|
||||
);
|
||||
+ unsigned int priv_flags_ext;
|
||||
const struct net_device_ops *netdev_ops;
|
||||
const struct header_ops *header_ops;
|
||||
struct netdev_queue *_tx;
|
||||
--- a/include/linux/ppp_channel.h
|
||||
+++ b/include/linux/ppp_channel.h
|
||||
@@ -19,6 +19,10 @@
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
static const struct flow_dissector_key flow_keys_bonding_keys[] = {
|
||||
{
|
||||
@@ -5926,6 +5927,11 @@ static void bond_destructor(struct net_d
|
||||
@@ -5976,6 +5977,11 @@ static void bond_destructor(struct net_d
|
||||
if (bond->wq)
|
||||
destroy_workqueue(bond->wq);
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
free_percpu(bond->rr_tx_counter);
|
||||
}
|
||||
|
||||
@@ -6479,6 +6485,13 @@ int bond_create(struct net *net, const c
|
||||
@@ -6531,6 +6537,13 @@ int bond_create(struct net *net, const c
|
||||
|
||||
bond_work_init_all(bond);
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
return res;
|
||||
--- a/include/net/bonding.h
|
||||
+++ b/include/net/bonding.h
|
||||
@@ -261,6 +261,7 @@ struct bonding {
|
||||
@@ -263,6 +263,7 @@ struct bonding {
|
||||
struct mutex ipsec_lock;
|
||||
#endif /* CONFIG_XFRM_OFFLOAD */
|
||||
struct bpf_prog *xdp_prog;
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/bonding/bond_3ad.c
|
||||
+++ b/drivers/net/bonding/bond_3ad.c
|
||||
@@ -116,6 +116,40 @@ static void ad_marker_response_received(
|
||||
@@ -115,6 +115,40 @@ static void ad_marker_response_received(
|
||||
struct port *port);
|
||||
static void ad_update_actor_keys(struct port *port, bool reset);
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
/* ================= api to bonding and kernel code ================== */
|
||||
|
||||
@@ -1073,7 +1107,31 @@ static void ad_mux_machine(struct port *
|
||||
@@ -1159,7 +1193,31 @@ static void ad_mux_machine(struct port *
|
||||
ad_disable_collecting_distributing(port,
|
||||
update_slave_arr);
|
||||
port->ntt = true;
|
||||
@ -73,7 +73,7 @@
|
||||
case AD_MUX_COLLECTING_DISTRIBUTING:
|
||||
port->actor_oper_port_state |= LACP_STATE_COLLECTING;
|
||||
port->actor_oper_port_state |= LACP_STATE_DISTRIBUTING;
|
||||
@@ -1917,6 +1975,7 @@ static void ad_enable_collecting_distrib
|
||||
@@ -2054,6 +2112,7 @@ static void ad_enable_collecting_distrib
|
||||
bool *update_slave_arr)
|
||||
{
|
||||
if (port->aggregator->is_active) {
|
||||
@ -81,7 +81,7 @@
|
||||
slave_dbg(port->slave->bond->dev, port->slave->dev,
|
||||
"Enabling port %d (LAG %d)\n",
|
||||
port->actor_port_number,
|
||||
@@ -1924,6 +1983,16 @@ static void ad_enable_collecting_distrib
|
||||
@@ -2061,6 +2120,16 @@ static void ad_enable_collecting_distrib
|
||||
__enable_port(port);
|
||||
/* Slave array needs update */
|
||||
*update_slave_arr = true;
|
||||
@ -98,7 +98,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2683,6 +2752,104 @@ int bond_3ad_get_active_agg_info(struct
|
||||
@@ -2818,6 +2887,104 @@ int bond_3ad_get_active_agg_info(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@
|
||||
/**
|
||||
* bond_dev_queue_xmit - Prepare skb for xmit.
|
||||
*
|
||||
@@ -1232,6 +1247,23 @@ void bond_change_active_slave(struct bon
|
||||
@@ -1306,6 +1321,23 @@ void bond_change_active_slave(struct bon
|
||||
if (BOND_MODE(bond) == BOND_MODE_8023AD)
|
||||
bond_3ad_handle_link_change(new_active, BOND_LINK_UP);
|
||||
|
||||
@ -251,7 +251,7 @@
|
||||
if (bond_is_lb(bond))
|
||||
bond_alb_handle_link_change(bond, new_active, BOND_LINK_UP);
|
||||
} else {
|
||||
@@ -1877,6 +1909,7 @@ int bond_enslave(struct net_device *bond
|
||||
@@ -1950,6 +1982,7 @@ int bond_enslave(struct net_device *bond
|
||||
const struct net_device_ops *slave_ops = slave_dev->netdev_ops;
|
||||
struct slave *new_slave = NULL, *prev_slave;
|
||||
struct sockaddr_storage ss;
|
||||
@ -259,7 +259,7 @@
|
||||
int link_reporting;
|
||||
int res = 0, i;
|
||||
|
||||
@@ -2326,6 +2359,15 @@ int bond_enslave(struct net_device *bond
|
||||
@@ -2399,6 +2432,15 @@ int bond_enslave(struct net_device *bond
|
||||
bond_is_active_slave(new_slave) ? "an active" : "a backup",
|
||||
new_slave->link != BOND_LINK_DOWN ? "an up" : "a down");
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
/* enslave is successful */
|
||||
bond_queue_slave_event(new_slave);
|
||||
return 0;
|
||||
@@ -2391,6 +2433,15 @@ err_undo_flags:
|
||||
@@ -2464,6 +2506,15 @@ err_undo_flags:
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -2412,6 +2463,7 @@ static int __bond_release_one(struct net
|
||||
@@ -2485,6 +2536,7 @@ static int __bond_release_one(struct net
|
||||
struct bonding *bond = netdev_priv(bond_dev);
|
||||
struct slave *slave, *oldcurrent;
|
||||
struct sockaddr_storage ss;
|
||||
@ -299,7 +299,7 @@
|
||||
int old_flags = bond_dev->flags;
|
||||
netdev_features_t old_features = bond_dev->features;
|
||||
|
||||
@@ -2434,6 +2486,15 @@ static int __bond_release_one(struct net
|
||||
@@ -2507,6 +2559,15 @@ static int __bond_release_one(struct net
|
||||
|
||||
bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW);
|
||||
|
||||
@ -315,7 +315,7 @@
|
||||
bond_sysfs_slave_del(slave);
|
||||
|
||||
/* recompute stats just before removing the slave */
|
||||
@@ -2762,6 +2823,8 @@ static void bond_miimon_commit(struct bo
|
||||
@@ -2837,6 +2898,8 @@ static void bond_miimon_commit(struct bo
|
||||
struct slave *slave, *primary, *active;
|
||||
bool do_failover = false;
|
||||
struct list_head *iter;
|
||||
@ -324,7 +324,7 @@
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@@ -2801,6 +2864,12 @@ static void bond_miimon_commit(struct bo
|
||||
@@ -2876,6 +2939,12 @@ static void bond_miimon_commit(struct bo
|
||||
bond_set_active_slave(slave);
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@
|
||||
slave_info(bond->dev, slave->dev, "link status definitely up, %u Mbps %s duplex\n",
|
||||
slave->speed == SPEED_UNKNOWN ? 0 : slave->speed,
|
||||
slave->duplex ? "full" : "half");
|
||||
@@ -2849,6 +2918,16 @@ static void bond_miimon_commit(struct bo
|
||||
@@ -2924,6 +2993,16 @@ static void bond_miimon_commit(struct bo
|
||||
unblock_netpoll_tx();
|
||||
}
|
||||
|
||||
@ -354,7 +354,7 @@
|
||||
bond_set_carrier(bond);
|
||||
}
|
||||
|
||||
@@ -4101,8 +4180,219 @@ static inline u32 bond_eth_hash(struct s
|
||||
@@ -4176,8 +4255,224 @@ static inline u32 bond_eth_hash(struct s
|
||||
return 0;
|
||||
|
||||
ep = (struct ethhdr *)(data + mhoff);
|
||||
@ -521,6 +521,11 @@
|
||||
+ u8 *dst_mac, void *src,
|
||||
+ void *dst, u16 protocol,
|
||||
+ struct net_device *bond_dev,
|
||||
+ __be16 *layer4hdr);
|
||||
+struct net_device *bond_get_tx_dev(struct sk_buff *skb, uint8_t *src_mac,
|
||||
+ u8 *dst_mac, void *src,
|
||||
+ void *dst, u16 protocol,
|
||||
+ struct net_device *bond_dev,
|
||||
+ __be16 *layer4hdr)
|
||||
+{
|
||||
+ struct bonding *bond;
|
||||
@ -575,7 +580,7 @@
|
||||
|
||||
static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *data,
|
||||
int hlen, __be16 l2_proto, int *nhoff, int *ip_proto, bool l34)
|
||||
@@ -5231,15 +5521,18 @@ static netdev_tx_t bond_3ad_xor_xmit(str
|
||||
@@ -5306,15 +5601,18 @@ static netdev_tx_t bond_3ad_xor_xmit(str
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct bonding *bond = netdev_priv(dev);
|
||||
@ -601,7 +606,7 @@
|
||||
}
|
||||
|
||||
/* in broadcast mode, we send everything to all usable interfaces. */
|
||||
@@ -5489,8 +5782,9 @@ static netdev_tx_t __bond_start_xmit(str
|
||||
@@ -5564,8 +5862,9 @@ static netdev_tx_t __bond_start_xmit(str
|
||||
return bond_xmit_roundrobin(skb, dev);
|
||||
case BOND_MODE_ACTIVEBACKUP:
|
||||
return bond_xmit_activebackup(skb, dev);
|
||||
@ -614,7 +619,7 @@
|
||||
return bond_xmit_broadcast(skb, dev);
|
||||
--- a/include/net/bond_3ad.h
|
||||
+++ b/include/net/bond_3ad.h
|
||||
@@ -302,8 +302,15 @@ int bond_3ad_lacpdu_recv(const struct sk
|
||||
@@ -307,8 +307,15 @@ int bond_3ad_lacpdu_recv(const struct sk
|
||||
struct slave *slave);
|
||||
int bond_3ad_set_carrier(struct bonding *bond);
|
||||
void bond_3ad_update_lacp_rate(struct bonding *bond);
|
||||
@ -642,7 +647,7 @@
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
extern atomic_t netpoll_block_tx;
|
||||
|
||||
@@ -653,6 +655,7 @@ struct bond_net {
|
||||
@@ -676,6 +678,7 @@ struct bond_net {
|
||||
|
||||
int bond_rcv_validate(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);
|
||||
netdev_tx_t bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
|
||||
@ -650,7 +655,7 @@
|
||||
int bond_create(struct net *net, const char *name);
|
||||
int bond_create_sysfs(struct bond_net *net);
|
||||
void bond_destroy_sysfs(struct bond_net *net);
|
||||
@@ -684,6 +687,13 @@ struct bond_vlan_tag *bond_verify_device
|
||||
@@ -707,6 +710,13 @@ struct bond_vlan_tag *bond_verify_device
|
||||
int level);
|
||||
int bond_update_slave_arr(struct bonding *bond, struct slave *skipslave);
|
||||
void bond_slave_arr_work_rearm(struct bonding *bond, unsigned long delay);
|
||||
@ -664,7 +669,7 @@
|
||||
void bond_work_init_all(struct bonding *bond);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -788,4 +798,18 @@ static inline netdev_tx_t bond_tx_drop(s
|
||||
@@ -811,4 +821,18 @@ static inline netdev_tx_t bond_tx_drop(s
|
||||
return NET_XMIT_DROP;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
#endif /* _LINUX_IF_MACVLAN_H */
|
||||
--- a/drivers/net/macvlan.c
|
||||
+++ b/drivers/net/macvlan.c
|
||||
@@ -960,6 +960,34 @@ static void macvlan_uninit(struct net_de
|
||||
@@ -962,6 +962,34 @@ static void macvlan_uninit(struct net_de
|
||||
macvlan_port_destroy(port->dev);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
static void macvlan_dev_get_stats64(struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
@@ -1506,6 +1534,7 @@ int macvlan_common_newlink(struct net *s
|
||||
@@ -1497,6 +1525,7 @@ int macvlan_common_newlink(struct net *s
|
||||
vlan->dev = dev;
|
||||
vlan->port = port;
|
||||
vlan->set_features = MACVLAN_FEATURES;
|
||||
@ -79,7 +79,7 @@
|
||||
#include <net/netfilter/nf_conntrack_labels.h>
|
||||
#include <net/netfilter/nf_conntrack_synproxy.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
@@ -1740,6 +1743,9 @@ init_conntrack(struct net *net, struct n
|
||||
@@ -1784,6 +1787,9 @@ init_conntrack(struct net *net, struct n
|
||||
nf_ct_acct_ext_add(ct, GFP_ATOMIC);
|
||||
nf_ct_tstamp_ext_add(ct, GFP_ATOMIC);
|
||||
nf_ct_labels_ext_add(ct);
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -3913,10 +3913,6 @@ int ip6_route_add(struct fib6_config *cf
|
||||
@@ -3920,10 +3920,6 @@ int ip6_route_add(struct fib6_config *cf
|
||||
return PTR_ERR(rt);
|
||||
|
||||
err = __ip6_ins_rt(rt, &cfg->fc_nlinfo, extack);
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
fib6_info_release(rt);
|
||||
|
||||
return err;
|
||||
@@ -3938,9 +3934,6 @@ static int __ip6_del_rt(struct fib6_info
|
||||
@@ -3945,9 +3941,6 @@ static int __ip6_del_rt(struct fib6_info
|
||||
err = fib6_del(rt, info);
|
||||
spin_unlock_bh(&table->tb6_lock);
|
||||
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
out:
|
||||
fib6_info_release(rt);
|
||||
return err;
|
||||
@@ -4549,6 +4542,10 @@ int ipv6_route_ioctl(struct net *net, un
|
||||
@@ -4559,6 +4552,10 @@ int ipv6_route_ioctl(struct net *net, un
|
||||
break;
|
||||
}
|
||||
rtnl_unlock();
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -5571,11 +5568,17 @@ static int inet6_rtm_delroute(struct sk_
|
||||
@@ -5581,11 +5578,17 @@ static int inet6_rtm_delroute(struct sk_
|
||||
}
|
||||
|
||||
if (cfg.fc_mp)
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
}
|
||||
|
||||
static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
@@ -5592,9 +5595,15 @@ static int inet6_rtm_newroute(struct sk_
|
||||
@@ -5602,9 +5605,15 @@ static int inet6_rtm_newroute(struct sk_
|
||||
cfg.fc_metric = IP6_RT_PRIO_USER;
|
||||
|
||||
if (cfg.fc_mp)
|
||||
@ -8,7 +8,7 @@
|
||||
/* other actions go here */
|
||||
__TCA_ID_MAX = 255
|
||||
};
|
||||
@@ -817,4 +818,14 @@ enum {
|
||||
@@ -797,4 +798,14 @@ enum {
|
||||
TCF_EM_OPND_LT
|
||||
};
|
||||
|
||||
@ -1,13 +1,3 @@
|
||||
--- a/include/linux/timer.h
|
||||
+++ b/include/linux/timer.h
|
||||
@@ -17,6 +17,7 @@ struct timer_list {
|
||||
unsigned long expires;
|
||||
void (*function)(struct timer_list *);
|
||||
u32 flags;
|
||||
+ unsigned long cust_data;
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
struct lockdep_map lockdep_map;
|
||||
--- a/drivers/net/ifb.c
|
||||
+++ b/drivers/net/ifb.c
|
||||
@@ -151,6 +151,31 @@ resched:
|
||||
@ -52,7 +42,7 @@
|
||||
dev->needs_free_netdev = true;
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -4716,6 +4716,15 @@ void dev_uc_flush(struct net_device *dev
|
||||
@@ -4675,6 +4675,15 @@ void dev_uc_flush(struct net_device *dev
|
||||
void dev_uc_init(struct net_device *dev);
|
||||
|
||||
/**
|
||||
@ -65,10 +55,10 @@
|
||||
+void ifb_update_offload_stats(struct net_device *dev, struct pcpu_sw_netstats *offload_stats);
|
||||
+
|
||||
+/**
|
||||
* __dev_uc_sync - Synchonize device's unicast list
|
||||
* __dev_uc_sync - Synchronize device's unicast list
|
||||
* @dev: device to sync
|
||||
* @sync: function to call if address should be added
|
||||
@@ -5260,6 +5269,11 @@ static inline bool netif_is_failover_sla
|
||||
@@ -5231,6 +5240,11 @@ static inline bool netif_is_failover_sla
|
||||
return dev->priv_flags & IFF_FAILOVER_SLAVE;
|
||||
}
|
||||
|
||||
@ -82,7 +72,7 @@
|
||||
{
|
||||
--- a/include/uapi/linux/pkt_sched.h
|
||||
+++ b/include/uapi/linux/pkt_sched.h
|
||||
@@ -1306,4 +1306,248 @@ enum {
|
||||
@@ -1208,4 +1208,248 @@ enum {
|
||||
|
||||
#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
|
||||
|
||||
@ -341,12 +331,12 @@
|
||||
|
||||
struct Qdisc *qdisc_lookup_rcu(struct net_device *dev, u32 handle)
|
||||
{
|
||||
@@ -2405,4 +2406,26 @@ static int __init pktsched_init(void)
|
||||
@@ -2462,4 +2463,26 @@ static int __init pktsched_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* QCA NSS Qdisc Support - Start */
|
||||
+bool tcf_destroy(struct tcf_proto *tp, bool force)
|
||||
+static bool tcf_destroy(struct tcf_proto *tp, bool force)
|
||||
+{
|
||||
+ tp->ops->destroy(tp, force, NULL);
|
||||
+ module_put(tp->ops->owner);
|
||||
@ -370,7 +360,7 @@
|
||||
subsys_initcall(pktsched_init);
|
||||
--- a/net/sched/sch_generic.c
|
||||
+++ b/net/sched/sch_generic.c
|
||||
@@ -1083,6 +1083,7 @@ static void __qdisc_destroy(struct Qdisc
|
||||
@@ -1090,6 +1090,7 @@ static void __qdisc_destroy(struct Qdisc
|
||||
|
||||
call_rcu(&qdisc->rcu, qdisc_free_cb);
|
||||
}
|
||||
@ -380,7 +370,7 @@
|
||||
{
|
||||
--- a/include/net/sch_generic.h
|
||||
+++ b/include/net/sch_generic.h
|
||||
@@ -94,6 +94,7 @@ struct Qdisc {
|
||||
@@ -95,6 +95,7 @@ struct Qdisc {
|
||||
#define TCQ_F_INVISIBLE 0x80 /* invisible by default in dump */
|
||||
#define TCQ_F_NOLOCK 0x100 /* qdisc does not require locking */
|
||||
#define TCQ_F_OFFLOADED 0x200 /* qdisc is offloaded to HW */
|
||||
@ -388,7 +378,7 @@
|
||||
u32 limit;
|
||||
const struct Qdisc_ops *ops;
|
||||
struct qdisc_size_table __rcu *stab;
|
||||
@@ -752,6 +753,42 @@ static inline bool skb_skip_tc_classify(
|
||||
@@ -754,6 +755,42 @@ static inline bool skb_skip_tc_classify(
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -431,7 +421,7 @@
|
||||
/* Reset all TX qdiscs greater than index of a device. */
|
||||
static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i)
|
||||
{
|
||||
@@ -1323,4 +1360,9 @@ static inline void qdisc_synchronize(con
|
||||
@@ -1356,4 +1393,9 @@ static inline void qdisc_synchronize(con
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
@ -443,7 +433,7 @@
|
||||
#endif
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -767,6 +767,7 @@ enum skb_tstamp_type {
|
||||
@@ -789,6 +789,7 @@ enum skb_tstamp_type {
|
||||
* @offload_fwd_mark: Packet was L2-forwarded in hardware
|
||||
* @offload_l3_fwd_mark: Packet was L3-forwarded in hardware
|
||||
* @tc_skip_classify: do not classify packet. set by IFB device
|
||||
@ -451,7 +441,7 @@
|
||||
* @tc_at_ingress: used within tc_classify to distinguish in/egress
|
||||
* @redirected: packet was redirected by packet classifier
|
||||
* @from_ingress: packet was redirected from the ingress path
|
||||
@@ -943,6 +944,9 @@ struct sk_buff {
|
||||
@@ -966,6 +967,9 @@ struct sk_buff {
|
||||
__u8 tc_at_ingress:1; /* See TC_AT_INGRESS_MASK */
|
||||
__u8 tc_skip_classify:1;
|
||||
#endif
|
||||
@ -0,0 +1,46 @@
|
||||
--- a/net/l2tp/l2tp_core.c
|
||||
+++ b/net/l2tp/l2tp_core.c
|
||||
@@ -622,6 +622,31 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(l2tp_session_register);
|
||||
|
||||
+void l2tp_stats_update(struct l2tp_tunnel *tunnel,
|
||||
+ struct l2tp_session *session,
|
||||
+ struct l2tp_stats *stats)
|
||||
+{
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
|
||||
+ &tunnel->stats.rx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
|
||||
+ &tunnel->stats.rx_bytes);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
|
||||
+ &tunnel->stats.tx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
|
||||
+ &tunnel->stats.tx_bytes);
|
||||
+
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
|
||||
+ &session->stats.rx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
|
||||
+ &session->stats.rx_bytes);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
|
||||
+ &session->stats.tx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
|
||||
+ &session->stats.tx_bytes);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(l2tp_stats_update);
|
||||
+
|
||||
+
|
||||
/*****************************************************************************
|
||||
* Receive data handling
|
||||
*****************************************************************************/
|
||||
--- a/net/l2tp/l2tp_core.h
|
||||
+++ b/net/l2tp/l2tp_core.h
|
||||
@@ -228,6 +228,9 @@ struct l2tp_session *l2tp_session_get_ne
|
||||
struct l2tp_session *l2tp_session_get_by_ifname(const struct net *net,
|
||||
const char *ifname);
|
||||
|
||||
+void l2tp_stats_update(struct l2tp_tunnel *tunnel, struct l2tp_session *session,
|
||||
+ struct l2tp_stats *stats);
|
||||
+
|
||||
/* Tunnel and session lifetime management.
|
||||
* Creation of a new instance is a two-step process: create, then register.
|
||||
* Destruction is triggered using the *_delete functions, and completes asynchronously.
|
||||
@ -101,7 +101,7 @@
|
||||
/* Returns >0 if the device is a multilink PPP netdevice, 0 if not or < 0 if
|
||||
* the device is not PPP.
|
||||
*/
|
||||
@@ -3976,6 +4012,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
|
||||
@@ -3897,6 +3933,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
|
||||
EXPORT_SYMBOL(ppp_channel_index);
|
||||
EXPORT_SYMBOL(ppp_unit_number);
|
||||
EXPORT_SYMBOL(ppp_dev_name);
|
||||
@ -111,7 +111,7 @@
|
||||
EXPORT_SYMBOL(ppp_output_wakeup);
|
||||
--- a/include/linux/ppp_channel.h
|
||||
+++ b/include/linux/ppp_channel.h
|
||||
@@ -129,6 +129,9 @@ extern void ppp_unregister_channel(struc
|
||||
@@ -84,6 +84,9 @@ extern void ppp_unregister_channel(struc
|
||||
/* Get the channel number for a channel */
|
||||
extern int ppp_channel_index(struct ppp_channel *);
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
/* Get the unit number associated with a channel, or -1 if none */
|
||||
extern int ppp_unit_number(struct ppp_channel *);
|
||||
|
||||
@@ -161,6 +164,7 @@ extern int ppp_hold_channels(struct net_
|
||||
@@ -116,6 +119,7 @@ extern int ppp_hold_channels(struct net_
|
||||
/* Test if ppp xmit lock is locked */
|
||||
extern bool ppp_is_xmit_locked(struct net_device *dev);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
__u32 flags; /* tunnel flags */
|
||||
--- a/include/net/ip_tunnels.h
|
||||
+++ b/include/net/ip_tunnels.h
|
||||
@@ -592,4 +592,9 @@ static inline void ip_tunnel_info_opts_s
|
||||
@@ -703,4 +703,9 @@ static inline void ip_tunnel_info_opts_s
|
||||
|
||||
#endif /* CONFIG_INET */
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#endif /* __NET_IP_TUNNELS_H */
|
||||
--- a/net/ipv6/ip6_tunnel.c
|
||||
+++ b/net/ipv6/ip6_tunnel.c
|
||||
@@ -2414,6 +2414,26 @@ nla_put_failure:
|
||||
@@ -2411,6 +2411,26 @@ nla_put_failure:
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
@ -39,8 +39,8 @@
|
||||
+ atomic_notifier_call_chain(&vxlan_fdb_notifier_list, type, (void *)&vfe);
|
||||
return;
|
||||
errout:
|
||||
if (err < 0)
|
||||
@@ -441,6 +460,18 @@ static struct vxlan_fdb *vxlan_find_mac(
|
||||
rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
|
||||
@@ -440,6 +459,18 @@ static struct vxlan_fdb *vxlan_find_mac(
|
||||
return f;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
/* caller should hold vxlan->hash_lock */
|
||||
static struct vxlan_rdst *vxlan_fdb_find_rdst(struct vxlan_fdb *f,
|
||||
union vxlan_addr *ip, __be16 port,
|
||||
@@ -2600,6 +2631,9 @@ void vxlan_xmit_one(struct sk_buff *skb,
|
||||
@@ -2509,6 +2540,9 @@ void vxlan_xmit_one(struct sk_buff *skb,
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
|
||||
ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
|
||||
err = vxlan_build_skb(skb, ndst, sizeof(struct iphdr),
|
||||
@@ -2671,6 +2705,9 @@ void vxlan_xmit_one(struct sk_buff *skb,
|
||||
@@ -2577,6 +2611,9 @@ void vxlan_xmit_one(struct sk_buff *skb,
|
||||
if (err < 0)
|
||||
goto tx_error;
|
||||
|
||||
@ -77,11 +77,11 @@
|
||||
+ skb->skb_iif = dev->ifindex;
|
||||
+
|
||||
udp_tunnel6_xmit_skb(ndst, sock6->sock->sk, skb, dev,
|
||||
&local_ip.sin6.sin6_addr,
|
||||
&dst->sin6.sin6_addr, tos, ttl,
|
||||
&saddr, &pkey->u.ipv6.dst, tos, ttl,
|
||||
pkey->label, src_port, dst_port, !udp_sum);
|
||||
--- a/include/net/vxlan.h
|
||||
+++ b/include/net/vxlan.h
|
||||
@@ -352,6 +352,19 @@ struct vxlan_dev {
|
||||
@@ -353,6 +353,19 @@ struct vxlan_dev {
|
||||
VXLAN_F_VNIFILTER | \
|
||||
VXLAN_F_LOCALBYPASS)
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
/* Called by the channel when it can send some more data. */
|
||||
extern void ppp_output_wakeup(struct ppp_channel *);
|
||||
|
||||
@@ -144,5 +189,17 @@ extern void ppp_update_stats(struct net_
|
||||
@@ -148,5 +193,17 @@ extern void ppp_update_stats(struct net_
|
||||
* that ppp_unregister_channel returns.
|
||||
*/
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
#endif
|
||||
--- a/net/l2tp/l2tp_ppp.c
|
||||
+++ b/net/l2tp/l2tp_ppp.c
|
||||
@@ -123,9 +123,17 @@ struct pppol2tp_session {
|
||||
@@ -122,9 +122,17 @@ struct pppol2tp_session {
|
||||
};
|
||||
|
||||
static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb);
|
||||
@ -126,7 +126,7 @@
|
||||
};
|
||||
|
||||
static const struct proto_ops pppol2tp_ops;
|
||||
@@ -373,6 +381,13 @@ static int pppol2tp_xmit(struct ppp_chan
|
||||
@@ -368,6 +376,13 @@ static int pppol2tp_xmit(struct ppp_chan
|
||||
skb->data[0] = PPP_ALLSTATIONS;
|
||||
skb->data[1] = PPP_UI;
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
local_bh_disable();
|
||||
l2tp_xmit_skb(session, skb);
|
||||
local_bh_enable();
|
||||
@@ -818,7 +833,7 @@ static int pppol2tp_connect(struct socke
|
||||
@@ -804,7 +819,7 @@ static int pppol2tp_connect(struct socke
|
||||
po->chan.hdrlen = PPPOL2TP_L2TP_HDR_SIZE_NOSEQ;
|
||||
|
||||
po->chan.private = sk;
|
||||
@ -149,7 +149,7 @@
|
||||
po->chan.mtu = pppol2tp_tunnel_mtu(tunnel);
|
||||
|
||||
error = ppp_register_net_channel(sock_net(sk), &po->chan);
|
||||
@@ -1732,6 +1747,109 @@ static void __exit pppol2tp_exit(void)
|
||||
@@ -1720,6 +1735,109 @@ static void __exit pppol2tp_exit(void)
|
||||
unregister_pernet_device(&pppol2tp_net_ops);
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@
|
||||
|
||||
--- a/drivers/net/ppp/ppp_generic.c
|
||||
+++ b/drivers/net/ppp/ppp_generic.c
|
||||
@@ -3732,6 +3732,32 @@ int ppp_is_multilink(struct net_device *
|
||||
@@ -3768,6 +3768,32 @@ int ppp_is_multilink(struct net_device *
|
||||
}
|
||||
EXPORT_SYMBOL(ppp_is_multilink);
|
||||
|
||||
@ -294,7 +294,7 @@
|
||||
/* ppp_channel_get_protocol()
|
||||
* Call this to obtain the underlying protocol of the PPP channel,
|
||||
* e.g. PX_PROTO_OE
|
||||
@@ -3870,6 +3896,59 @@ int ppp_hold_channels(struct net_device
|
||||
@@ -3906,6 +3932,59 @@ int ppp_hold_channels(struct net_device
|
||||
}
|
||||
EXPORT_SYMBOL(ppp_hold_channels);
|
||||
|
||||
@ -354,45 +354,11 @@
|
||||
/* ppp_release_channels()
|
||||
* Releases channels
|
||||
*/
|
||||
--- a/net/l2tp/l2tp_core.c
|
||||
+++ b/net/l2tp/l2tp_core.c
|
||||
@@ -403,6 +403,31 @@ err_tlock:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(l2tp_session_register);
|
||||
|
||||
+void l2tp_stats_update(struct l2tp_tunnel *tunnel,
|
||||
+ struct l2tp_session *session,
|
||||
+ struct l2tp_stats *stats)
|
||||
+{
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
|
||||
+ &tunnel->stats.rx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
|
||||
+ &tunnel->stats.rx_bytes);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
|
||||
+ &tunnel->stats.tx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
|
||||
+ &tunnel->stats.tx_bytes);
|
||||
+
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
|
||||
+ &session->stats.rx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
|
||||
+ &session->stats.rx_bytes);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
|
||||
+ &session->stats.tx_packets);
|
||||
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
|
||||
+ &session->stats.tx_bytes);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(l2tp_stats_update);
|
||||
+
|
||||
+
|
||||
/*****************************************************************************
|
||||
* Receive data handling
|
||||
*****************************************************************************/
|
||||
--- a/net/l2tp/l2tp_core.h
|
||||
+++ b/net/l2tp/l2tp_core.h
|
||||
@@ -232,6 +232,9 @@ struct l2tp_session *l2tp_session_get_nt
|
||||
struct l2tp_session *l2tp_session_get_by_ifname(const struct net *net,
|
||||
const char *ifname);
|
||||
@@ -231,6 +231,9 @@ struct l2tp_session *l2tp_session_get_by
|
||||
void l2tp_stats_update(struct l2tp_tunnel *tunnel, struct l2tp_session *session,
|
||||
struct l2tp_stats *stats);
|
||||
|
||||
+void l2tp_stats_update(struct l2tp_tunnel *tunnel, struct l2tp_session *session,
|
||||
+ struct l2tp_stats *stats);
|
||||
@ -400,22 +366,3 @@
|
||||
/* Tunnel and session lifetime management.
|
||||
* Creation of a new instance is a two-step process: create, then register.
|
||||
* Destruction is triggered using the *_delete functions, and completes asynchronously.
|
||||
--- a/net/l2tp/l2tp_eth.c
|
||||
+++ b/net/l2tp/l2tp_eth.c
|
||||
@@ -76,6 +76,8 @@ static netdev_tx_t l2tp_eth_dev_xmit(str
|
||||
struct l2tp_eth *priv = netdev_priv(dev);
|
||||
struct l2tp_session *session = priv->session;
|
||||
unsigned int len = skb->len;
|
||||
+
|
||||
+ skb->skb_iif = dev->ifindex;
|
||||
int ret = l2tp_xmit_skb(session, skb);
|
||||
|
||||
if (likely(ret == NET_XMIT_SUCCESS)) {
|
||||
@@ -117,6 +119,7 @@ static void l2tp_eth_dev_setup(struct ne
|
||||
SET_NETDEV_DEVTYPE(dev, &l2tpeth_type);
|
||||
ether_setup(dev);
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
+ dev->priv_flags_ext |= IFF_EXT_ETH_L2TPV3;
|
||||
dev->features |= NETIF_F_LLTX;
|
||||
dev->netdev_ops = &l2tp_eth_netdev_ops;
|
||||
dev->needs_free_netdev = true;
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/net/ipv6/ip6_tunnel.c
|
||||
+++ b/net/ipv6/ip6_tunnel.c
|
||||
@@ -2420,7 +2420,7 @@ nla_put_failure:
|
||||
@@ -2417,7 +2417,7 @@ nla_put_failure:
|
||||
*/
|
||||
void ip6_update_offload_stats(struct net_device *dev, void *ptr)
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
--- a/include/linux/if_bridge.h
|
||||
+++ b/include/linux/if_bridge.h
|
||||
@@ -258,4 +258,17 @@ extern br_get_dst_hook_t __rcu *br_get_d
|
||||
extern struct net_device *br_fdb_bridge_dev_get_and_hold(struct net_bridge *br);
|
||||
/* QCA NSS bridge-mgr support - End */
|
||||
@@ -254,4 +254,17 @@ typedef struct net_bridge_port *br_get_d
|
||||
extern br_get_dst_hook_t __rcu *br_get_dst_hook;
|
||||
/* QCA NSS ECM support - End */
|
||||
|
||||
+/* QCA qca-mcs support - Start */
|
||||
+typedef struct net_bridge_port *br_get_dst_hook_t(const struct net_bridge_port *src,
|
||||
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
--- a/net/bridge/br_fdb.c
|
||||
+++ b/net/bridge/br_fdb.c
|
||||
@@ -239,6 +239,8 @@ static void fdb_notify(struct net_bridge
|
||||
@@ -236,6 +236,8 @@ static void fdb_notify(struct net_bridge
|
||||
kfree_skb(skb);
|
||||
goto errout;
|
||||
}
|
||||
@ -29,7 +29,7 @@
|
||||
rtnl_notify(skb, net, 0, RTNLGRP_NEIGH, NULL, GFP_ATOMIC);
|
||||
return;
|
||||
errout:
|
||||
@@ -305,6 +307,7 @@ struct net_bridge_fdb_entry *br_fdb_find
|
||||
@@ -302,6 +304,7 @@ struct net_bridge_fdb_entry *br_fdb_find
|
||||
{
|
||||
return fdb_find_rcu(&br->fdb_hash_tbl, addr, vid);
|
||||
}
|
||||
@ -39,7 +39,7 @@
|
||||
* added to the bridge private HW address list and all required ports
|
||||
--- a/net/bridge/br_private.h
|
||||
+++ b/net/bridge/br_private.h
|
||||
@@ -907,6 +907,7 @@ void br_manage_promisc(struct net_bridge
|
||||
@@ -912,6 +912,7 @@ void br_manage_promisc(struct net_bridge
|
||||
int nbp_backup_change(struct net_bridge_port *p, struct net_device *backup_dev);
|
||||
|
||||
/* br_input.c */
|
||||
@ -47,7 +47,7 @@
|
||||
int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb);
|
||||
rx_handler_func_t *br_get_rx_handler(const struct net_device *dev);
|
||||
|
||||
@@ -2270,4 +2271,14 @@ struct nd_msg *br_is_nd_neigh_msg(struct
|
||||
@@ -2294,4 +2295,14 @@ struct nd_msg *br_is_nd_neigh_msg(struct
|
||||
bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);
|
||||
#define __br_get(__hook, __default, __args ...) \
|
||||
(__hook ? (__hook(__args)) : (__default)) /* QCA NSS ECM support */
|
||||
@ -74,7 +74,7 @@
|
||||
errout:
|
||||
--- a/net/bridge/br.c
|
||||
+++ b/net/bridge/br.c
|
||||
@@ -472,6 +472,12 @@ static void __exit br_deinit(void)
|
||||
@@ -467,6 +467,12 @@ static void __exit br_deinit(void)
|
||||
br_fdb_fini();
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
+ goto out;
|
||||
+ /* QCA qca-mcs support - End */
|
||||
+
|
||||
mdst = br_mdb_get(brmctx, skb, vid);
|
||||
mdst = br_mdb_entry_skb_get(brmctx, skb, vid);
|
||||
if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) &&
|
||||
br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) {
|
||||
@@ -197,8 +219,15 @@ int br_handle_frame_finish(struct net *n
|
||||
@ -288,7 +288,7 @@
|
||||
#endif
|
||||
--- a/net/ipv4/ipmr.c
|
||||
+++ b/net/ipv4/ipmr.c
|
||||
@@ -89,6 +89,9 @@ static struct net_device *vif_dev_read(c
|
||||
@@ -90,6 +90,9 @@ static struct net_device *vif_dev_read(c
|
||||
/* Special spinlock for queue of unresolved entries */
|
||||
static DEFINE_SPINLOCK(mfc_unres_lock);
|
||||
|
||||
@ -298,7 +298,7 @@
|
||||
/* We return to original Alan's scheme. Hash table of resolved
|
||||
* entries is changed only in process context and protected
|
||||
* with weak lock mrt_lock. Queue of unresolved entries is protected
|
||||
@@ -112,6 +115,9 @@ static void mroute_netlink_event(struct
|
||||
@@ -113,6 +116,9 @@ static void mroute_netlink_event(struct
|
||||
static void igmpmsg_netlink_event(const struct mr_table *mrt, struct sk_buff *pkt);
|
||||
static void mroute_clean_tables(struct mr_table *mrt, int flags);
|
||||
static void ipmr_expire_process(struct timer_list *t);
|
||||
@ -308,7 +308,7 @@
|
||||
|
||||
#ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES
|
||||
#define ipmr_for_each_table(mrt, net) \
|
||||
@@ -233,6 +239,80 @@ static int ipmr_rule_fill(struct fib_rul
|
||||
@@ -234,6 +240,80 @@ static int ipmr_rule_fill(struct fib_rul
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@
|
||||
static const struct fib_rules_ops __net_initconst ipmr_rules_ops_template = {
|
||||
.family = RTNL_FAMILY_IPMR,
|
||||
.rule_size = sizeof(struct ipmr_rule),
|
||||
@@ -246,6 +326,156 @@ static const struct fib_rules_ops __net_
|
||||
@@ -247,6 +327,156 @@ static const struct fib_rules_ops __net_
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
@ -546,7 +546,7 @@
|
||||
static int __net_init ipmr_rules_init(struct net *net)
|
||||
{
|
||||
struct fib_rules_ops *ops;
|
||||
@@ -1203,6 +1433,10 @@ static int ipmr_mfc_delete(struct mr_tab
|
||||
@@ -1204,6 +1434,10 @@ static int ipmr_mfc_delete(struct mr_tab
|
||||
call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, c, mrt->id);
|
||||
mroute_netlink_event(mrt, c, RTM_DELROUTE);
|
||||
mr_cache_put(&c->_c);
|
||||
@ -557,7 +557,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1233,6 +1467,10 @@ static int ipmr_mfc_add(struct net *net,
|
||||
@@ -1234,6 +1468,10 @@ static int ipmr_mfc_add(struct net *net,
|
||||
call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_REPLACE, c,
|
||||
mrt->id);
|
||||
mroute_netlink_event(mrt, c, RTM_NEWROUTE);
|
||||
@ -806,8 +806,8 @@
|
||||
+
|
||||
+ mrt->vif_table[vif].pkt_in += pkts_in;
|
||||
+ mrt->vif_table[vif].bytes_in += bytes_in;
|
||||
+ atomic_long_add(pkts_out, &cache->_c.mfc_un.res.pkt);
|
||||
+ atomic_long_add(bytes_out, &cache->_c.mfc_un.res.bytes);
|
||||
+ atomic64_add(pkts_out, &cache->_c.mfc_un.res.pkt);
|
||||
+ atomic64_add(bytes_out, &cache->_c.mfc_un.res.bytes);
|
||||
+
|
||||
+ for (vifi = cache->_c.mfc_un.res.minvif;
|
||||
+ vifi < cache->_c.mfc_un.res.maxvif; vifi++) {
|
||||
@ -863,7 +863,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1471,6 +1715,10 @@ static int ip6mr_mfc_add(struct net *net
|
||||
@@ -1468,6 +1712,10 @@ static int ip6mr_mfc_add(struct net *net
|
||||
call_ip6mr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_REPLACE,
|
||||
c, mrt->id);
|
||||
mr6_netlink_event(mrt, c, RTM_NEWROUTE);
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/crypto/authenc.c
|
||||
+++ b/crypto/authenc.c
|
||||
@@ -415,6 +415,8 @@ static int crypto_authenc_create(struct
|
||||
@@ -408,6 +408,8 @@ static int crypto_authenc_create(struct
|
||||
enc->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME)
|
||||
goto err_free_inst;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
inst->alg.base.cra_blocksize = enc->base.cra_blocksize;
|
||||
--- a/include/linux/crypto.h
|
||||
+++ b/include/linux/crypto.h
|
||||
@@ -86,6 +86,11 @@
|
||||
@@ -85,6 +85,11 @@
|
||||
#define CRYPTO_NOLOAD 0x00008000
|
||||
|
||||
/*
|
||||
@ -53,7 +53,7 @@
|
||||
esp.tfclen = 0;
|
||||
if (x->tfcpad) {
|
||||
struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb);
|
||||
@@ -889,6 +896,7 @@ static int esp_input(struct xfrm_state *
|
||||
@@ -888,6 +895,7 @@ static int esp_input(struct xfrm_state *
|
||||
u8 *iv;
|
||||
struct scatterlist *sg;
|
||||
int err = -EINVAL;
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + ivlen))
|
||||
goto out;
|
||||
@@ -896,6 +904,12 @@ static int esp_input(struct xfrm_state *
|
||||
@@ -895,6 +903,12 @@ static int esp_input(struct xfrm_state *
|
||||
if (elen <= 0)
|
||||
goto out;
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
#include <net/ip.h>
|
||||
@@ -695,6 +696,7 @@ static int esp6_output(struct xfrm_state
|
||||
@@ -689,6 +690,7 @@ static int esp6_output(struct xfrm_state
|
||||
struct ip_esp_hdr *esph;
|
||||
struct crypto_aead *aead;
|
||||
struct esp_info esp;
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
esp.inplace = true;
|
||||
|
||||
@@ -706,6 +708,11 @@ static int esp6_output(struct xfrm_state
|
||||
@@ -700,6 +702,11 @@ static int esp6_output(struct xfrm_state
|
||||
aead = x->data;
|
||||
alen = crypto_aead_authsize(aead);
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
esp.tfclen = 0;
|
||||
if (x->tfcpad) {
|
||||
struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb);
|
||||
@@ -933,6 +940,7 @@ static int esp6_input(struct xfrm_state
|
||||
@@ -926,6 +933,7 @@ static int esp6_input(struct xfrm_state
|
||||
__be32 *seqhi;
|
||||
u8 *iv;
|
||||
struct scatterlist *sg;
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + ivlen)) {
|
||||
ret = -EINVAL;
|
||||
@@ -944,6 +952,12 @@ static int esp6_input(struct xfrm_state
|
||||
@@ -937,6 +945,12 @@ static int esp6_input(struct xfrm_state
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -32,19 +32,20 @@ Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>
|
||||
|
||||
--- a/include/linux/if_bridge.h
|
||||
+++ b/include/linux/if_bridge.h
|
||||
@@ -128,6 +128,11 @@ int br_vlan_get_info_rcu(const struct ne
|
||||
@@ -128,6 +128,12 @@ int br_vlan_get_info_rcu(const struct ne
|
||||
bool br_mst_enabled(const struct net_device *dev);
|
||||
int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids);
|
||||
int br_mst_get_state(const struct net_device *dev, u16 msti, u8 *state);
|
||||
+
|
||||
+extern struct net_device *br_fdb_find_vid_by_mac(struct net_device *dev, u8 *mac, u16 *vid);
|
||||
+extern int br_vlan_get_tag_skb(const struct sk_buff *skb, u16 *vid);
|
||||
+extern int br_dev_is_vlan_filter_enabled(struct net_device *dev);
|
||||
+extern int br_vlan_update_stats(struct net_device* dev, u32 vid, u64 rx_bytes, u64 rx_packets, u64 tx_bytes, u64 tx_packets);
|
||||
+extern int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid, struct bridge_vlan_info *p_vinfo);
|
||||
#else
|
||||
static inline bool br_vlan_enabled(const struct net_device *dev)
|
||||
{
|
||||
@@ -149,8 +154,22 @@ static inline int br_vlan_get_pvid_rcu(c
|
||||
@@ -149,8 +155,27 @@ static inline int br_vlan_get_pvid_rcu(c
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -60,7 +61,12 @@ Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static inline int br_dev_is_vlan_filter_enabled(struct net_device *dev)
|
||||
+static inline int br_vlan_get_tag_skb(const struct sk_buff *skb, u16 *vid)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline int br_dev_is_vlan_filter_enabled(const struct net_device *dev)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
@ -122,7 +128,7 @@ Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>
|
||||
return netdev;
|
||||
--- a/net/bridge/br_private.h
|
||||
+++ b/net/bridge/br_private.h
|
||||
@@ -1563,6 +1563,7 @@ void br_vlan_fill_forward_path_pvid(stru
|
||||
@@ -1587,6 +1587,7 @@ void br_vlan_fill_forward_path_pvid(stru
|
||||
int br_vlan_fill_forward_path_mode(struct net_bridge *br,
|
||||
struct net_bridge_port *dst,
|
||||
struct net_device_path *path);
|
||||
@ -132,10 +138,21 @@ Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>
|
||||
const struct net_bridge *br)
|
||||
--- a/net/bridge/br_vlan.c
|
||||
+++ b/net/bridge/br_vlan.c
|
||||
@@ -935,8 +935,179 @@ int br_vlan_get_proto(const struct net_d
|
||||
@@ -935,8 +935,190 @@ int br_vlan_get_proto(const struct net_d
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(br_vlan_get_proto);
|
||||
|
||||
+/*
|
||||
+ * br_vlan_get_tag_skb()
|
||||
+ * Returns VLAN tag is its found valid in skb.
|
||||
+ */
|
||||
+int br_vlan_get_tag_skb(const struct sk_buff *skb, u16 *vid)
|
||||
+{
|
||||
+ return br_vlan_get_tag(skb, vid);
|
||||
+
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(br_vlan_get_tag_skb);
|
||||
+
|
||||
+/*
|
||||
+ * br_dev_is_vlan_filter_enabled()
|
||||
+ * Caller should ensure to hold rcu_lock()
|
||||
@ -313,7 +330,7 @@ Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>
|
||||
{
|
||||
struct switchdev_attr attr = {
|
||||
.orig_dev = br->dev,
|
||||
@@ -1070,7 +1241,7 @@ static bool vlan_default_pvid(struct net
|
||||
@@ -1070,7 +1252,7 @@ static bool vlan_default_pvid(struct net
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
|
||||
--- a/net/ipv6/ip6_tunnel.c
|
||||
+++ b/net/ipv6/ip6_tunnel.c
|
||||
@@ -849,7 +849,7 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
@@ -851,7 +851,7 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
use_dest_addr = (xmit && dsth == iph) || (!xmit && dsth != iph);
|
||||
|
||||
/* get dst port */
|
||||
@ -17,7 +17,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
dsth->protocol == IPPROTO_UDP ||
|
||||
dsth->protocol == IPPROTO_TCP ||
|
||||
dsth->protocol == IPPROTO_SCTP ||
|
||||
@@ -864,9 +864,9 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
@@ -866,9 +866,9 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
struct icmphdr *ih = (struct icmphdr*)(((u8*)dsth) + dsth->ihl * 4);
|
||||
|
||||
/* use icmp identifier as port */
|
||||
@ -30,7 +30,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
ih->type == ICMP_TIMESTAMPREPLY ||
|
||||
ih->type == ICMP_INFO_REPLY ||
|
||||
ih->type == ICMP_ADDRESSREPLY)) ||
|
||||
@@ -883,7 +883,7 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
@@ -885,7 +885,7 @@ static void ip4ip6_fmr_calc(struct in6_a
|
||||
int frombyte = fmr->ip6_prefix_len / 8;
|
||||
int fromrem = fmr->ip6_prefix_len % 8;
|
||||
int bytes = sizeof(struct in6_addr) - frombyte;
|
||||
@ -49,7 +49,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
gro_cells_receive(&tunnel->gro_cells, skb);
|
||||
return 0;
|
||||
|
||||
@@ -1424,6 +1427,9 @@ route_lookup:
|
||||
@@ -1426,6 +1429,9 @@ route_lookup:
|
||||
ipv6h->nexthdr = proto;
|
||||
ipv6h->saddr = fl6->saddr;
|
||||
ipv6h->daddr = fl6->daddr;
|
||||
@ -59,7 +59,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
ip6tunnel_xmit(NULL, skb, dev);
|
||||
return 0;
|
||||
tx_err_link_failure:
|
||||
@@ -1540,17 +1546,19 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
|
||||
@@ -1542,17 +1548,19 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
|
||||
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
|
||||
dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
|
||||
|
||||
@ -130,7 +130,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
if (dev) {
|
||||
--- a/net/ipv6/sit.c
|
||||
+++ b/net/ipv6/sit.c
|
||||
@@ -722,6 +722,8 @@ static int ipip6_rcv(struct sk_buff *skb
|
||||
@@ -724,6 +724,8 @@ static int ipip6_rcv(struct sk_buff *skb
|
||||
|
||||
dev_sw_netstats_rx_add(tunnel->dev, skb->len);
|
||||
|
||||
@ -139,7 +139,7 @@ Includes iptunnel fixes by integrating the following patches:
|
||||
netif_rx(skb);
|
||||
|
||||
return 0;
|
||||
@@ -1031,6 +1033,8 @@ static netdev_tx_t ipip6_tunnel_xmit(str
|
||||
@@ -1033,6 +1035,8 @@ static netdev_tx_t ipip6_tunnel_xmit(str
|
||||
|
||||
skb_set_inner_ipproto(skb, IPPROTO_IPV6);
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
|
||||
--- a/drivers/clk/qcom/Kconfig
|
||||
+++ b/drivers/clk/qcom/Kconfig
|
||||
@@ -139,6 +139,16 @@ config IPQ_APSS_6018
|
||||
@@ -190,6 +190,16 @@ config IPQ_APSS_6018
|
||||
Say Y if you want to support CPU frequency scaling on
|
||||
ipq based devices.
|
||||
|
||||
@ -48,8 +48,8 @@ Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
help
|
||||
--- a/drivers/clk/qcom/Makefile
|
||||
+++ b/drivers/clk/qcom/Makefile
|
||||
@@ -23,6 +23,7 @@ obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8
|
||||
obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcs
|
||||
obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o
|
||||
obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o
|
||||
obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o
|
||||
+obj-$(CONFIG_IPQ_CMN_PLL) += clk-ipq-cmn-pll.o
|
||||
@ -16,7 +16,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/clk/qcom/Kconfig
|
||||
+++ b/drivers/clk/qcom/Kconfig
|
||||
@@ -141,7 +141,6 @@ config IPQ_APSS_6018
|
||||
@@ -192,7 +192,6 @@ config IPQ_APSS_6018
|
||||
|
||||
config IPQ_CMN_PLL
|
||||
tristate "IPQ CMN PLL Clock Controller"
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
sleep_clk: sleep-clk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -150,6 +156,19 @@
|
||||
@@ -148,6 +154,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -156,6 +156,30 @@
|
||||
@@ -154,6 +154,30 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
|
||||
@@ -166,6 +166,21 @@
|
||||
@@ -164,6 +164,21 @@
|
||||
clock-names = "gcc_mdio_ahb_clk";
|
||||
|
||||
status = "disabled";
|
||||
@ -35,7 +35,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
@@ -396,8 +411,8 @@
|
||||
@@ -394,8 +409,8 @@
|
||||
<&pcie0_phy>,
|
||||
<&pcie1_phy>,
|
||||
<0>,
|
||||
@ -15,7 +15,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq5018.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq5018.c
|
||||
@@ -677,7 +677,7 @@ static const struct freq_tbl ftbl_gmac1_
|
||||
@@ -678,7 +678,7 @@ static const struct freq_tbl ftbl_gmac1_
|
||||
F(2500000, P_UNIPHY_RX, 12.5, 0, 0),
|
||||
F(24000000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY_RX, 2.5, 0, 0),
|
||||
@ -24,7 +24,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
F(125000000, P_UNIPHY_RX, 1, 0, 0),
|
||||
F(312500000, P_UNIPHY_RX, 1, 0, 0),
|
||||
{ }
|
||||
@@ -717,7 +717,7 @@ static const struct freq_tbl ftbl_gmac1_
|
||||
@@ -718,7 +718,7 @@ static const struct freq_tbl ftbl_gmac1_
|
||||
F(2500000, P_UNIPHY_TX, 12.5, 0, 0),
|
||||
F(24000000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY_TX, 2.5, 0, 0),
|
||||
@ -16,7 +16,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq5018.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq5018.c
|
||||
@@ -335,8 +335,8 @@ static const struct parent_map gcc_xo_gp
|
||||
@@ -336,8 +336,8 @@ static const struct parent_map gcc_xo_gp
|
||||
|
||||
static const struct clk_parent_data gcc_xo_gephy_gcc_rx_gephy_gcc_tx_ubi32_pll_gpll0[] = {
|
||||
{ .index = DT_XO },
|
||||
@ -27,7 +27,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
{ .hw = &ubi32_pll.clkr.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
};
|
||||
@@ -351,8 +351,8 @@ static const struct parent_map gcc_xo_ge
|
||||
@@ -352,8 +352,8 @@ static const struct parent_map gcc_xo_ge
|
||||
|
||||
static const struct clk_parent_data gcc_xo_gephy_gcc_tx_gephy_gcc_rx_ubi32_pll_gpll0[] = {
|
||||
{ .index = DT_XO },
|
||||
@ -38,7 +38,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
{ .hw = &ubi32_pll.clkr.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
};
|
||||
@@ -367,8 +367,8 @@ static const struct parent_map gcc_xo_ge
|
||||
@@ -368,8 +368,8 @@ static const struct parent_map gcc_xo_ge
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy_gcc_rx_uniphy_gcc_tx_ubi32_pll_gpll0[] = {
|
||||
{ .index = DT_XO },
|
||||
@ -49,7 +49,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
{ .hw = &ubi32_pll.clkr.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
};
|
||||
@@ -383,8 +383,8 @@ static const struct parent_map gcc_xo_un
|
||||
@@ -384,8 +384,8 @@ static const struct parent_map gcc_xo_un
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy_gcc_tx_uniphy_gcc_rx_ubi32_pll_gpll0[] = {
|
||||
{ .index = DT_XO },
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
|
||||
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
|
||||
@@ -1545,11 +1545,10 @@ static int qca8k_pcs_config(struct phyli
|
||||
@@ -1557,11 +1557,10 @@ static int qca8k_pcs_config(struct phyli
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -14,8 +14,8 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
|
||||
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
|
||||
@@ -1013,7 +1013,7 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
|
||||
return err;
|
||||
@@ -1014,7 +1014,7 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
|
||||
return ret;
|
||||
}
|
||||
|
||||
- if (!dsa_is_user_port(priv->ds, reg))
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
continue;
|
||||
|
||||
of_get_phy_mode(port, &mode);
|
||||
@@ -1088,17 +1088,19 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri
|
||||
@@ -1089,17 +1089,19 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri
|
||||
|
||||
static int qca8k_find_cpu_port(struct dsa_switch *ds)
|
||||
{
|
||||
@ -10,13 +10,13 @@ size as well.
|
||||
|
||||
Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
---
|
||||
drivers/firmware/qcom_scm.c | 8 ++++++++
|
||||
drivers/firmware/qcom_scm.h | 1 +
|
||||
drivers/firmware/qcom//qcom_scm.c | 8 ++++++++
|
||||
drivers/firmware/qcom//qcom_scm.h | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -592,6 +592,14 @@ int qcom_scm_pas_mem_setup(u32 periphera
|
||||
--- a/drivers/firmware/qcom/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.c
|
||||
@@ -686,6 +686,14 @@ int qcom_scm_pas_mem_setup(u32 periphera
|
||||
if (ret)
|
||||
goto disable_clk;
|
||||
|
||||
@ -31,9 +31,9 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
ret = qcom_scm_call(__scm->dev, &desc, &res);
|
||||
qcom_scm_bw_disable();
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom_scm.h
|
||||
@@ -92,6 +92,7 @@ extern int scm_legacy_call(struct device
|
||||
--- a/drivers/firmware/qcom/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.h
|
||||
@@ -96,6 +96,7 @@ struct qcom_tzmem_pool *qcom_scm_get_tzm
|
||||
|
||||
#define QCOM_SCM_SVC_PIL 0x02
|
||||
#define QCOM_SCM_PIL_PAS_INIT_IMAGE 0x01
|
||||
@ -10,14 +10,25 @@ support to lock/unlock MSA features.
|
||||
|
||||
Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
---
|
||||
drivers/firmware/qcom_scm.c | 78 ++++++++++++++++++++++++++
|
||||
drivers/firmware/qcom_scm.h | 2 +
|
||||
drivers/firmware/qcom//qcom_scm.c | 78 ++++++++++++++++++++++++++
|
||||
drivers/firmware/qcom//qcom_scm.h | 2 +
|
||||
include/linux/firmware/qcom/qcom_scm.h | 2 +
|
||||
3 files changed, 82 insertions(+)
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -712,6 +712,84 @@ bool qcom_scm_pas_supported(u32 peripher
|
||||
--- a/include/linux/firmware/qcom/qcom_scm.h
|
||||
+++ b/include/linux/firmware/qcom/qcom_scm.h
|
||||
@@ -79,6 +79,8 @@ int qcom_scm_pas_mem_setup(u32 periphera
|
||||
int qcom_scm_pas_auth_and_reset(u32 peripheral);
|
||||
int qcom_scm_pas_shutdown(u32 peripheral);
|
||||
bool qcom_scm_pas_supported(u32 peripheral);
|
||||
+int qcom_scm_msa_lock(u32 peripheral);
|
||||
+int qcom_scm_msa_unlock(u32 peripheral);
|
||||
|
||||
int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val);
|
||||
int qcom_scm_io_writel(phys_addr_t addr, unsigned int val);
|
||||
--- a/drivers/firmware/qcom/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.c
|
||||
@@ -806,6 +806,84 @@ bool qcom_scm_pas_supported(u32 peripher
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_scm_pas_supported);
|
||||
|
||||
@ -102,9 +113,9 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
static int __qcom_scm_pas_mss_reset(struct device *dev, bool reset)
|
||||
{
|
||||
struct qcom_scm_desc desc = {
|
||||
--- a/drivers/firmware/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom_scm.h
|
||||
@@ -98,6 +98,8 @@ extern int scm_legacy_call(struct device
|
||||
--- a/drivers/firmware/qcom/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.h
|
||||
@@ -102,6 +102,8 @@ struct qcom_tzmem_pool *qcom_scm_get_tzm
|
||||
#define QCOM_SCM_PIL_PAS_SHUTDOWN 0x06
|
||||
#define QCOM_SCM_PIL_PAS_IS_SUPPORTED 0x07
|
||||
#define QCOM_SCM_PIL_PAS_MSS_RESET 0x0a
|
||||
@ -113,14 +124,3 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
|
||||
#define QCOM_SCM_SVC_IO 0x05
|
||||
#define QCOM_SCM_IO_READ 0x01
|
||||
--- a/include/linux/firmware/qcom/qcom_scm.h
|
||||
+++ b/include/linux/firmware/qcom/qcom_scm.h
|
||||
@@ -81,6 +81,8 @@ extern int qcom_scm_pas_mem_setup(u32 pe
|
||||
extern int qcom_scm_pas_auth_and_reset(u32 peripheral);
|
||||
extern int qcom_scm_pas_shutdown(u32 peripheral);
|
||||
extern bool qcom_scm_pas_supported(u32 peripheral);
|
||||
+extern int qcom_scm_msa_lock(u32 peripheral);
|
||||
+extern int qcom_scm_msa_unlock(u32 peripheral);
|
||||
|
||||
extern int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val);
|
||||
extern int qcom_scm_io_writel(phys_addr_t addr, unsigned int val);
|
||||
@ -58,7 +58,7 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
|
||||
--- a/drivers/remoteproc/Kconfig
|
||||
+++ b/drivers/remoteproc/Kconfig
|
||||
@@ -234,6 +234,25 @@ config QCOM_Q6V5_PAS
|
||||
@@ -235,6 +235,25 @@ config QCOM_Q6V5_PAS
|
||||
CDSP (Compute DSP), MPSS (Modem Peripheral SubSystem), and
|
||||
SLPI (Sensor Low Power Island).
|
||||
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
obj-$(CONFIG_QCOM_Q6V5_WCSS) += qcom_q6v5_wcss.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
@@ -0,0 +1,800 @@
|
||||
@@ -0,0 +1,801 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (C) 2016-2018 Linaro Ltd.
|
||||
@ -113,6 +113,7 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/of_reserved_mem.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/reset.h>
|
||||
@ -16,7 +16,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
@@ -44,10 +44,6 @@
|
||||
@@ -45,10 +45,6 @@
|
||||
#define VERSION2 2
|
||||
|
||||
static LIST_HEAD(upd_rproc_list);
|
||||
@ -27,7 +27,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
/**
|
||||
* struct userpd_boot_info_header - header of user pd bootinfo
|
||||
@@ -82,10 +78,15 @@ struct q6_wcss {
|
||||
@@ -83,10 +79,15 @@ struct q6_wcss {
|
||||
phys_addr_t mem_reloc;
|
||||
void *mem_region;
|
||||
size_t mem_size;
|
||||
@ -45,7 +45,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
};
|
||||
|
||||
struct wcss_data {
|
||||
@@ -101,8 +102,8 @@ struct wcss_data {
|
||||
@@ -102,8 +103,8 @@ struct wcss_data {
|
||||
*/
|
||||
static u8 qcom_get_pd_asid(struct rproc *rproc)
|
||||
{
|
||||
@ -56,7 +56,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
return bit / 8;
|
||||
}
|
||||
@@ -131,37 +132,37 @@ static int q6_wcss_start(struct rproc *r
|
||||
@@ -132,37 +133,37 @@ static int q6_wcss_start(struct rproc *r
|
||||
static int q6_wcss_spawn_pd(struct rproc *rproc)
|
||||
{
|
||||
int ret;
|
||||
@ -105,7 +105,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
ret = q6_wcss_spawn_pd(rproc);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -213,22 +214,22 @@ static int q6_wcss_stop(struct rproc *rp
|
||||
@@ -214,22 +215,22 @@ static int q6_wcss_stop(struct rproc *rp
|
||||
*/
|
||||
static int wcss_pd_stop(struct rproc *rproc)
|
||||
{
|
||||
@ -135,7 +135,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -273,7 +274,8 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
@@ -274,7 +275,8 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
size_t size;
|
||||
u16 cnt = 0, version;
|
||||
void *ptr;
|
||||
@ -145,7 +145,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
struct rproc *upd_rproc;
|
||||
struct userpd_boot_info upd_bootinfo = {0};
|
||||
const struct firmware *fw;
|
||||
@@ -308,7 +310,7 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
@@ -309,7 +311,7 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
ptr += sizeof(u16);
|
||||
|
||||
list_for_each_entry(upd_rproc, &upd_rproc_list, node) {
|
||||
@ -154,7 +154,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
/* TYPE */
|
||||
upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE;
|
||||
@@ -318,11 +320,11 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
@@ -319,11 +321,11 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
sizeof(upd_bootinfo) - sizeof(upd_bootinfo.header);
|
||||
|
||||
/* Process ID */
|
||||
@ -169,7 +169,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -421,19 +423,20 @@ static int q6_wcss_load(struct rproc *rp
|
||||
@@ -422,19 +424,20 @@ static int q6_wcss_load(struct rproc *rp
|
||||
*/
|
||||
static int wcss_pd_load(struct rproc *rproc, const struct firmware *fw)
|
||||
{
|
||||
@ -195,7 +195,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
}
|
||||
|
||||
static unsigned long q6_wcss_panic(struct rproc *rproc)
|
||||
@@ -465,26 +468,15 @@ static int q6_alloc_memory_region(struct
|
||||
@@ -466,26 +469,15 @@ static int q6_alloc_memory_region(struct
|
||||
struct device_node *node;
|
||||
struct device *dev = wcss->dev;
|
||||
|
||||
@ -231,7 +231,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
}
|
||||
|
||||
wcss->mem_phys = rmem->base;
|
||||
@@ -508,7 +500,7 @@ static int q6_get_inbound_irq(struct qco
|
||||
@@ -509,7 +501,7 @@ static int q6_get_inbound_irq(struct qco
|
||||
{
|
||||
int ret, irq;
|
||||
char *interrupt, *tmp = (char *)int_name;
|
||||
@ -240,7 +240,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
irq = platform_get_irq(pdev, index);
|
||||
if (irq < 0)
|
||||
@@ -520,7 +512,7 @@ static int q6_get_inbound_irq(struct qco
|
||||
@@ -521,7 +513,7 @@ static int q6_get_inbound_irq(struct qco
|
||||
if (!interrupt)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -249,7 +249,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
ret = devm_request_threaded_irq(&pdev->dev, *pirq,
|
||||
NULL, handler,
|
||||
@@ -561,7 +553,7 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
@@ -562,7 +554,7 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
void (*handover)(struct qcom_q6v5 *q6))
|
||||
{
|
||||
int ret;
|
||||
@ -258,7 +258,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
q6->rproc = rproc;
|
||||
q6->dev = &pdev->dev;
|
||||
@@ -581,7 +573,7 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
@@ -582,7 +574,7 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
return ret;
|
||||
|
||||
/* Get pd_asid to prepare interrupt names */
|
||||
@ -267,7 +267,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
ret = q6_get_inbound_irq(q6, pdev, "fatal", 0, &q6->fatal_irq,
|
||||
q6v5_fatal_interrupt);
|
||||
@@ -619,7 +611,7 @@ static void q6_release_resources(void)
|
||||
@@ -620,7 +612,7 @@ static void q6_release_resources(void)
|
||||
static int q6_register_userpd(struct platform_device *pdev,
|
||||
struct device_node *userpd_np)
|
||||
{
|
||||
@ -276,7 +276,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
struct rproc *rproc = NULL;
|
||||
int ret;
|
||||
struct platform_device *userpd_pdev;
|
||||
@@ -652,21 +644,16 @@ static int q6_register_userpd(struct pla
|
||||
@@ -653,21 +645,16 @@ static int q6_register_userpd(struct pla
|
||||
|
||||
userpd_pdev->dev.driver = pdev->dev.driver;
|
||||
rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops,
|
||||
@ -302,7 +302,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
WCSS_CRASH_REASON, NULL, NULL);
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
@@ -678,7 +665,7 @@ static int q6_register_userpd(struct pla
|
||||
@@ -679,7 +666,7 @@ static int q6_register_userpd(struct pla
|
||||
|
||||
list_add(&rproc->node, &upd_rproc_list);
|
||||
platform_set_drvdata(userpd_pdev, rproc);
|
||||
@ -311,7 +311,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
return 0;
|
||||
|
||||
free_rproc:
|
||||
@@ -719,7 +706,6 @@ static int q6_wcss_probe(struct platform
|
||||
@@ -720,7 +707,6 @@ static int q6_wcss_probe(struct platform
|
||||
wcss->dev = &pdev->dev;
|
||||
wcss->desc = desc;
|
||||
wcss->firmware = firmware;
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#define BUF_SIZE 35
|
||||
|
||||
@ -58,7 +58,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
#define MAX_FIRMWARE 3
|
||||
|
||||
#define RPD_SWID MPD_WCNSS_PAS_ID
|
||||
@@ -43,8 +44,6 @@
|
||||
@@ -44,8 +45,6 @@
|
||||
#define UPD_BOOT_INFO_SMEM_ID 507
|
||||
#define VERSION2 2
|
||||
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
/**
|
||||
* struct userpd_boot_info_header - header of user pd bootinfo
|
||||
* @type: type of bootinfo passing over smem
|
||||
@@ -80,6 +79,7 @@ struct q6_wcss {
|
||||
@@ -81,6 +80,7 @@ struct q6_wcss {
|
||||
size_t mem_size;
|
||||
const struct wcss_data *desc;
|
||||
const char **firmware;
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
};
|
||||
|
||||
struct userpd {
|
||||
@@ -270,13 +270,12 @@ static void *q6_wcss_da_to_va(struct rpr
|
||||
@@ -271,13 +271,12 @@ static void *q6_wcss_da_to_va(struct rpr
|
||||
*/
|
||||
static int share_upd_bootinfo_to_q6(struct rproc *rproc)
|
||||
{
|
||||
@ -90,7 +90,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
struct userpd_boot_info upd_bootinfo = {0};
|
||||
const struct firmware *fw;
|
||||
|
||||
@@ -301,16 +300,19 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
@@ -302,16 +301,19 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
memcpy_toio(ptr, &version, sizeof(version));
|
||||
ptr += sizeof(version);
|
||||
|
||||
@ -114,7 +114,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
/* TYPE */
|
||||
upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE;
|
||||
@@ -322,14 +324,14 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
@@ -323,14 +325,14 @@ static int share_upd_bootinfo_to_q6(stru
|
||||
/* Process ID */
|
||||
upd_bootinfo.pid = upd->pd_asid + 1;
|
||||
|
||||
@ -131,7 +131,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
/* Firmware mem size */
|
||||
upd_bootinfo.data_size = qcom_mdt_get_size(fw);
|
||||
@@ -597,18 +599,23 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
@@ -598,18 +600,23 @@ static int init_irq(struct qcom_q6v5 *q6
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
struct device_node *userpd_np)
|
||||
{
|
||||
struct userpd *upd;
|
||||
@@ -633,16 +640,16 @@ static int q6_register_userpd(struct pla
|
||||
@@ -634,16 +641,16 @@ static int q6_register_userpd(struct pla
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops,
|
||||
firmware_name, sizeof(*upd));
|
||||
if (!rproc) {
|
||||
@@ -663,7 +670,7 @@ static int q6_register_userpd(struct pla
|
||||
@@ -664,7 +671,7 @@ static int q6_register_userpd(struct pla
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
|
||||
@ -191,7 +191,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
platform_set_drvdata(userpd_pdev, rproc);
|
||||
qcom_add_ssr_subdev(rproc, &upd->ssr_subdev, userpd_pdev->name);
|
||||
return 0;
|
||||
@@ -728,10 +735,10 @@ static int q6_wcss_probe(struct platform
|
||||
@@ -729,10 +736,10 @@ static int q6_wcss_probe(struct platform
|
||||
|
||||
/* Iterate over userpd child's and register with rproc */
|
||||
for_each_available_child_of_node(pdev->dev.of_node, userpd_np) {
|
||||
@ -9,14 +9,26 @@ load PIL segments to support the MPD architecture.
|
||||
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
---
|
||||
drivers/firmware/qcom_scm.c | 79 ++++++++++++++++++++++++++
|
||||
drivers/firmware/qcom_scm.h | 3 +
|
||||
drivers/firmware/qcom//qcom_scm.c | 79 ++++++++++++++++++++++++++
|
||||
drivers/firmware/qcom//qcom_scm.h | 3 +
|
||||
include/linux/firmware/qcom/qcom_scm.h | 3 +
|
||||
3 files changed, 85 insertions(+)
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -713,6 +713,85 @@ bool qcom_scm_pas_supported(u32 peripher
|
||||
--- a/include/linux/firmware/qcom/qcom_scm.h
|
||||
+++ b/include/linux/firmware/qcom/qcom_scm.h
|
||||
@@ -79,6 +79,9 @@ int qcom_scm_pas_mem_setup(u32 periphera
|
||||
int qcom_scm_pas_auth_and_reset(u32 peripheral);
|
||||
int qcom_scm_pas_shutdown(u32 peripheral);
|
||||
bool qcom_scm_pas_supported(u32 peripheral);
|
||||
+int qcom_scm_internal_wifi_powerup(u32 peripheral);
|
||||
+int qcom_scm_internal_wifi_shutdown(u32 peripheral);
|
||||
+int qcom_scm_pas_load_segment(u32 peripheral, int segment, dma_addr_t dma, int seg_cnt);
|
||||
int qcom_scm_msa_lock(u32 peripheral);
|
||||
int qcom_scm_msa_unlock(u32 peripheral);
|
||||
|
||||
--- a/drivers/firmware/qcom/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.c
|
||||
@@ -807,6 +807,85 @@ bool qcom_scm_pas_supported(u32 peripher
|
||||
EXPORT_SYMBOL_GPL(qcom_scm_pas_supported);
|
||||
|
||||
/**
|
||||
@ -102,9 +114,9 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
* qcom_scm_msa_lock() - Lock given peripheral firmware region as MSA
|
||||
*
|
||||
* @peripheral: peripheral id
|
||||
--- a/drivers/firmware/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom_scm.h
|
||||
@@ -98,6 +98,9 @@ extern int scm_legacy_call(struct device
|
||||
--- a/drivers/firmware/qcom/qcom_scm.h
|
||||
+++ b/drivers/firmware/qcom/qcom_scm.h
|
||||
@@ -102,6 +102,9 @@ struct qcom_tzmem_pool *qcom_scm_get_tzm
|
||||
#define QCOM_SCM_PIL_PAS_SHUTDOWN 0x06
|
||||
#define QCOM_SCM_PIL_PAS_IS_SUPPORTED 0x07
|
||||
#define QCOM_SCM_PIL_PAS_MSS_RESET 0x0a
|
||||
@ -114,15 +126,3 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
#define QCOM_SCM_MSA_LOCK 0x24
|
||||
#define QCOM_SCM_MSA_UNLOCK 0x25
|
||||
|
||||
--- a/include/linux/firmware/qcom/qcom_scm.h
|
||||
+++ b/include/linux/firmware/qcom/qcom_scm.h
|
||||
@@ -81,6 +81,9 @@ extern int qcom_scm_pas_mem_setup(u32 pe
|
||||
extern int qcom_scm_pas_auth_and_reset(u32 peripheral);
|
||||
extern int qcom_scm_pas_shutdown(u32 peripheral);
|
||||
extern bool qcom_scm_pas_supported(u32 peripheral);
|
||||
+extern int qcom_scm_internal_wifi_powerup(u32 peripheral);
|
||||
+extern int qcom_scm_internal_wifi_shutdown(u32 peripheral);
|
||||
+extern int qcom_scm_pas_load_segment(u32 peripheral, int segment, dma_addr_t dma, int seg_cnt);
|
||||
extern int qcom_scm_msa_lock(u32 peripheral);
|
||||
extern int qcom_scm_msa_unlock(u32 peripheral);
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/soc/qcom/mdt_loader.c
|
||||
+++ b/drivers/soc/qcom/mdt_loader.c
|
||||
@@ -16,6 +16,16 @@
|
||||
@@ -17,6 +17,16 @@
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/soc/qcom/mdt_loader.h>
|
||||
@ -32,7 +32,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
static bool mdt_phdr_valid(const struct elf32_phdr *phdr)
|
||||
{
|
||||
@@ -69,6 +79,56 @@ static ssize_t mdt_load_split_segment(vo
|
||||
@@ -67,6 +77,56 @@ static ssize_t mdt_load_split_segment(vo
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
/**
|
||||
* qcom_mdt_get_size() - acquire size of the memory region needed to load mdt
|
||||
* @fw: firmware object for the mdt file
|
||||
@@ -295,7 +355,8 @@ static bool qcom_mdt_bins_are_split(cons
|
||||
@@ -293,7 +353,8 @@ static bool qcom_mdt_bins_are_split(cons
|
||||
static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,
|
||||
const char *fw_name, int pas_id, void *mem_region,
|
||||
phys_addr_t mem_phys, size_t mem_size,
|
||||
@ -99,7 +99,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
{
|
||||
const struct elf32_phdr *phdrs;
|
||||
const struct elf32_phdr *phdr;
|
||||
@@ -349,6 +410,14 @@ static int __qcom_mdt_load(struct device
|
||||
@@ -347,6 +408,14 @@ static int __qcom_mdt_load(struct device
|
||||
if (!mdt_phdr_valid(phdr))
|
||||
continue;
|
||||
|
||||
@ -114,7 +114,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
offset = phdr->p_paddr - mem_reloc;
|
||||
if (offset < 0 || offset + phdr->p_memsz > mem_size) {
|
||||
dev_err(dev, "segment outside memory range\n");
|
||||
@@ -366,7 +435,11 @@ static int __qcom_mdt_load(struct device
|
||||
@@ -364,7 +433,11 @@ static int __qcom_mdt_load(struct device
|
||||
|
||||
ptr = mem_region + offset;
|
||||
|
||||
@ -127,7 +127,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
/* Firmware is large enough to be non-split */
|
||||
if (phdr->p_offset + phdr->p_filesz > fw->size) {
|
||||
dev_err(dev, "file %s segment %d would be truncated\n",
|
||||
@@ -383,7 +456,7 @@ static int __qcom_mdt_load(struct device
|
||||
@@ -381,7 +454,7 @@ static int __qcom_mdt_load(struct device
|
||||
break;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
memset(ptr + phdr->p_filesz, 0, phdr->p_memsz - phdr->p_filesz);
|
||||
}
|
||||
|
||||
@@ -418,7 +491,7 @@ int qcom_mdt_load(struct device *dev, co
|
||||
@@ -416,7 +489,7 @@ int qcom_mdt_load(struct device *dev, co
|
||||
return ret;
|
||||
|
||||
return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys,
|
||||
@ -145,7 +145,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_mdt_load);
|
||||
|
||||
@@ -441,9 +514,36 @@ int qcom_mdt_load_no_init(struct device
|
||||
@@ -439,9 +512,36 @@ int qcom_mdt_load_no_init(struct device
|
||||
size_t mem_size, phys_addr_t *reloc_base)
|
||||
{
|
||||
return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys,
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
@@ -77,6 +77,8 @@ struct q6_wcss {
|
||||
@@ -78,6 +78,8 @@ struct q6_wcss {
|
||||
phys_addr_t mem_reloc;
|
||||
void *mem_region;
|
||||
size_t mem_size;
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
const struct wcss_data *desc;
|
||||
const char **firmware;
|
||||
struct userpd *upd[MAX_UPD];
|
||||
@@ -718,6 +720,16 @@ static int q6_wcss_probe(struct platform
|
||||
@@ -719,6 +721,16 @@ static int q6_wcss_probe(struct platform
|
||||
if (ret)
|
||||
goto free_rproc;
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c
|
||||
@@ -155,6 +155,8 @@ static int q6_wcss_spawn_pd(struct rproc
|
||||
@@ -156,6 +156,8 @@ static int q6_wcss_spawn_pd(struct rproc
|
||||
static int wcss_pd_start(struct rproc *rproc)
|
||||
{
|
||||
struct userpd *upd = rproc->priv;
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
u32 pasid = (upd->pd_asid << 8) | UPD_SWID;
|
||||
int ret;
|
||||
|
||||
@@ -170,6 +172,14 @@ static int wcss_pd_start(struct rproc *r
|
||||
@@ -171,6 +173,14 @@ static int wcss_pd_start(struct rproc *r
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -179,6 +189,12 @@ static int q6_wcss_stop(struct rproc *rp
|
||||
@@ -180,6 +190,12 @@ static int q6_wcss_stop(struct rproc *rp
|
||||
const struct wcss_data *desc = wcss->desc;
|
||||
int ret;
|
||||
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
ret = qcom_scm_pas_shutdown(desc->pasid);
|
||||
if (ret) {
|
||||
dev_err(wcss->dev, "not able to shutdown\n");
|
||||
@@ -218,6 +234,7 @@ static int wcss_pd_stop(struct rproc *rp
|
||||
@@ -219,6 +235,7 @@ static int wcss_pd_stop(struct rproc *rp
|
||||
{
|
||||
struct userpd *upd = rproc->priv;
|
||||
struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent);
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
u32 pasid = (upd->pd_asid << 8) | UPD_SWID;
|
||||
int ret;
|
||||
|
||||
@@ -229,6 +246,14 @@ static int wcss_pd_stop(struct rproc *rp
|
||||
@@ -230,6 +247,14 @@ static int wcss_pd_stop(struct rproc *rp
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
ret = qcom_scm_msa_unlock(pasid);
|
||||
if (ret) {
|
||||
dev_err(upd->dev, "failed to power down pd\n");
|
||||
@@ -430,15 +455,14 @@ static int wcss_pd_load(struct rproc *rp
|
||||
@@ -431,15 +456,14 @@ static int wcss_pd_load(struct rproc *rp
|
||||
struct userpd *upd = rproc->priv;
|
||||
struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent);
|
||||
struct q6_wcss *wcss = rpd_rproc->priv;
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
wcss->mem_phys, wcss->mem_size,
|
||||
NULL);
|
||||
}
|
||||
@@ -775,6 +799,12 @@ static void q6_wcss_remove(struct platfo
|
||||
@@ -776,6 +800,12 @@ static void q6_wcss_remove(struct platfo
|
||||
rproc_free(rproc);
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
static const struct wcss_data q6_ipq5332_res_init = {
|
||||
.pasid = MPD_WCNSS_PAS_ID,
|
||||
.share_upd_info_to_q6 = true,
|
||||
@@ -785,6 +815,7 @@ static const struct wcss_data q6_ipq9574
|
||||
@@ -786,6 +816,7 @@ static const struct wcss_data q6_ipq9574
|
||||
};
|
||||
|
||||
static const struct of_device_id q6_wcss_of_match[] = {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user