Merge Official Soure

This commit is contained in:
CN_SZTL 2019-11-23 21:09:44 +08:00
commit d28aaa1953
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
95 changed files with 533 additions and 783 deletions

View File

@ -289,6 +289,7 @@ endef
define Download/default
FILE:=$(PKG_SOURCE)
URL:=$(PKG_SOURCE_URL)
URL_FILE:=$(PKG_SOURCE_URL_FILE)
SUBDIR:=$(PKG_SOURCE_SUBDIR)
PROTO:=$(PKG_SOURCE_PROTO)
$(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))

View File

@ -7,12 +7,12 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-4.9 = .202
LINUX_VERSION-4.14 = .154
LINUX_VERSION-4.19 = .84
LINUX_VERSION-4.14 = .155
LINUX_VERSION-4.19 = .85
LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf
LINUX_KERNEL_HASH-4.14.154 = 86de4a24379a78d67fc08b2e249ccf7b689eb6c37fbe329fc3dfbe8ab4300603
LINUX_KERNEL_HASH-4.19.84 = 868b4a92619cb00ab142a20a67f000525b9605820d1b66faa4a183133eac0660
LINUX_KERNEL_HASH-4.14.155 = 77d61979556b81c95b81452fa10e1fe9368cbe2f9f80a13e4669b0464722e481
LINUX_KERNEL_HASH-4.19.85 = 7bf435970aeeafd46263f49730087a61c4858d8b8fc5a4002ceac971b45f4fb7
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
PKG_RELEASE:=209
PKG_RELEASE:=210
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/

View File

@ -85,12 +85,16 @@ generate_network() {
set network.$1.proto='none'
EOF
[ -n "$macaddr" ] && uci -q batch <<-EOF
delete network.$1_dev
set network.$1_dev='device'
set network.$1_dev.name='$ifname'
set network.$1_dev.macaddr='$macaddr'
EOF
if [ -n "$macaddr" ]; then
for name in $ifname; do
uci -q batch <<-EOF
delete network.$1_${name/./_}_dev
set network.$1_${name/./_}_dev='device'
set network.$1_${name/./_}_dev.name='$name'
set network.$1_${name/./_}_dev.macaddr='$macaddr'
EOF
done
fi
case "$protocol" in
static)

View File

@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=5.4-rc2-1
PKG_RELEASE:=2
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.4-rc2/
PKG_HASH:=b3baedc135b455f09f266cb77e73276ca21bceeb0f24bac2184cc4b97d09cdbf
PKG_VERSION:=5.4-rc8-1
PKG_RELEASE:=1
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.4-rc8/
PKG_HASH:=707ffc50d0f6fe3398bcc3a7abd44ffa088d9309255a3a71d014620c20d3bbf9
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)

View File

@ -106,7 +106,9 @@ mac80211_hostapd_setup_base() {
json_get_vars noscan ht_coex
json_get_values ht_capab_list ht_capab tx_burst
[ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1
set_default noscan 0
[ "$noscan" -gt 0 ] && hostapd_noscan=1
[ "$tx_burst" = 0 ] && tx_burst=
ieee80211n=1

View File

@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -3071,6 +3071,16 @@ int ath10k_core_register(struct ath10k *
@@ -3074,6 +3074,16 @@ int ath10k_core_register(struct ath10k *
queue_work(ar->workqueue, &ar->register_work);

View File

@ -172,7 +172,7 @@ v13:
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -2788,6 +2794,10 @@ int ath10k_core_start(struct ath10k *ar,
@@ -2791,6 +2797,10 @@ int ath10k_core_start(struct ath10k *ar,
goto err_hif_stop;
}
@ -183,7 +183,7 @@ v13:
return 0;
err_hif_stop:
@@ -3044,9 +3054,18 @@ static void ath10k_core_register_work(st
@@ -3047,9 +3057,18 @@ static void ath10k_core_register_work(st
goto err_spectral_destroy;
}
@ -202,7 +202,7 @@ v13:
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
@@ -3092,6 +3111,8 @@ void ath10k_core_unregister(struct ath10
@@ -3095,6 +3114,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;

View File

@ -1,42 +0,0 @@
From: Miaoqing Pan <miaoqing@codeaurora.org>
Subject: [PATCH] ath10k: fix latency issue for QCA988x
Date: Thu, 29 Aug 2019 10:45:12 +0800
Bad latency is found on QCA988x, the issue was introduced by
commit 4504f0e5b571 ("ath10k: sdio: workaround firmware UART
pin configuration bug"). If uart_pin_workaround is false, this
change will set uart pin even if uart_print is false.
Tested HW: QCA9880
Tested FW: 10.2.4-1.0-00037
Fixes: 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug")
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
---
drivers/net/wireless/ath/ath10k/core.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2124,12 +2124,15 @@ static int ath10k_init_uart(struct ath10
return ret;
}
- if (!uart_print && ar->hw_params.uart_pin_workaround) {
- ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
- ar->hw_params.uart_pin);
- if (ret) {
- ath10k_warn(ar, "failed to set UART TX pin: %d", ret);
- return ret;
+ if (!uart_print) {
+ if (ar->hw_params.uart_pin_workaround) {
+ ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
+ ar->hw_params.uart_pin);
+ if (ret) {
+ ath10k_warn(ar, "failed to set UART TX pin: %d",
+ ret);
+ return ret;
+ }
}
return 0;

View File

@ -1,24 +0,0 @@
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Fri, 27 Sep 2019 23:12:08 +0200
Subject: [PATCH] backports: pci: Include linux/pci-aspm.h
In upstream commit 7ce2e76a0420 linux/pci-aspm.h was removed and the
content included into pci.h. Add an include to have the functions
defined in linux/pci-aspm.h available when linux/pci.h is included.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
--- a/backport-include/linux/pci.h
+++ b/backport-include/linux/pci.h
@@ -7,6 +7,10 @@
#include <linux/pci-aspm.h>
#endif
+#if LINUX_VERSION_IS_LESS(5,4,0)
+#include <linux/pci-aspm.h>
+#endif
+
#ifndef module_pci_driver
/**
* module_pci_driver() - Helper macro for registering a PCI driver

View File

@ -1,43 +0,0 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 28 Oct 2019 15:20:40 +0100
Subject: [PATCH] backport: add pci_disable_link_state wrapper with return code
The signature of pci_disable_link_state was changed to indicate if the state
was successfully disabled. Since the old version did not have this, add a
wrapper which checks the pcie register to determine the return code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/backport-include/linux/pci.h
+++ b/backport-include/linux/pci.h
@@ -240,4 +240,29 @@ static inline struct pci_dev *pcie_find_
(PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
#endif
+#if defined(CONFIG_PCI) && LINUX_VERSION_IS_LESS(5,3,0)
+
+static inline int
+LINUX_BACKPORT(pci_disable_link_state)(struct pci_dev *pdev, int state)
+{
+ u16 aspmc;
+
+ pci_disable_link_state(pdev, state);
+
+ pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &aspmc);
+ if ((state & PCIE_LINK_STATE_L0S) &&
+ (aspmc & PCI_EXP_LNKCTL_ASPM_L0S))
+ return -EPERM;
+
+ if ((state & PCIE_LINK_STATE_L1) &&
+ (aspmc & PCI_EXP_LNKCTL_ASPM_L1))
+ return -EPERM;
+
+ return 0;
+}
+
+#define pci_disable_link_state LINUX_BACKPORT(pci_disable_link_state)
+
+#endif
+
#endif /* _BACKPORT_LINUX_PCI_H */

View File

@ -1,68 +0,0 @@
From e3c57dd949835419cee8d3b45db38de58bf6ebd5 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon, 18 Nov 2019 01:13:37 +0100
Subject: [PATCH] backports: Adapt to changes to skb_get_hash_perturb()
The skb_get_hash_perturb() function now takes a siphash_key_t instead of
an u32. This was changed in commit 55667441c84f ("net/flow_dissector:
switch to siphash"). Use the correct type in the fq header file
depending on the kernel version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/net/fq.h | 8 ++++++++
include/net/fq_impl.h | 8 ++++++++
2 files changed, 16 insertions(+)
--- a/include/net/fq.h
+++ b/include/net/fq.h
@@ -69,7 +69,15 @@ struct fq {
struct list_head backlogs;
spinlock_t lock;
u32 flows_cnt;
+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
+ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \
+ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \
+ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \
+ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0)
+ siphash_key_t perturbation;
+#else
u32 perturbation;
+#endif
u32 limit;
u32 memory_limit;
u32 memory_usage;
--- a/include/net/fq_impl.h
+++ b/include/net/fq_impl.h
@@ -108,7 +108,15 @@ begin:
static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb)
{
+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
+ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \
+ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \
+ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \
+ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0)
+ u32 hash = skb_get_hash_perturb(skb, &fq->perturbation);
+#else
u32 hash = skb_get_hash_perturb(skb, fq->perturbation);
+#endif
return reciprocal_scale(hash, fq->flows_cnt);
}
@@ -308,7 +316,15 @@ static int fq_init(struct fq *fq, int fl
INIT_LIST_HEAD(&fq->backlogs);
spin_lock_init(&fq->lock);
fq->flows_cnt = max_t(u32, flows_cnt, 1);
+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
+ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \
+ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \
+ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \
+ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0)
+ get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
+#else
fq->perturbation = prandom_u32();
+#endif
fq->quantum = 300;
fq->limit = 8192;
fq->memory_limit = 16 << 20; /* 16 MBytes */

View File

@ -1,35 +0,0 @@
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
X-Patchwork-Id: 11161981
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Subject: [PATCH] rt2x00: initialize last_reset
Date: Thu, 26 Sep 2019 10:54:33 +0200
Message-Id: <20190926085433.1300-1-sgruszka@redhat.com>
Sender: linux-wireless-owner@vger.kernel.org
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org
Initialize last_reset variable to INITIAL_JIFFIES, otherwise it is not
possible to test H/W reset for first 5 minutes of system run.
Fixes: e403fa31ed71 ("rt2x00: add restart hw")
Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
@@ -555,7 +555,7 @@ static ssize_t rt2x00debug_write_restart
{
struct rt2x00debug_intf *intf = file->private_data;
struct rt2x00_dev *rt2x00dev = intf->rt2x00dev;
- static unsigned long last_reset;
+ static unsigned long last_reset = INITIAL_JIFFIES;
if (!rt2x00_has_cap_restart_hw(rt2x00dev))
return -EOPNOTSUPP;

View File

@ -22,7 +22,7 @@
+#endif /* _RT2X00_PLATFORM_H */
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -29,6 +29,7 @@
@@ -28,6 +28,7 @@
#include <linux/average.h>
#include <linux/usb.h>
#include <linux/clk.h>

View File

@ -105,7 +105,7 @@
.drv_init_registers = rt2800mmio_init_registers,
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -695,6 +695,7 @@ enum rt2x00_capability_flags {
@@ -694,6 +694,7 @@ enum rt2x00_capability_flags {
REQUIRE_HT_TX_DESC,
REQUIRE_PS_AUTOWAKE,
REQUIRE_DELAYED_RFKILL,
@ -113,7 +113,7 @@
/*
* Capabilities
@@ -971,6 +972,11 @@ struct rt2x00_dev {
@@ -970,6 +971,11 @@ struct rt2x00_dev {
const struct firmware *fw;
/*

View File

@ -37,7 +37,7 @@
num_rates += 4;
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -400,6 +400,7 @@ struct hw_mode_spec {
@@ -399,6 +399,7 @@ struct hw_mode_spec {
unsigned int supported_bands;
#define SUPPORT_BAND_2GHZ 0x00000001
#define SUPPORT_BAND_5GHZ 0x00000002

View File

@ -79,7 +79,7 @@
void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -563,6 +563,7 @@ struct rt2x00lib_ops {
@@ -562,6 +562,7 @@ struct rt2x00lib_ops {
struct link_qual *qual, const u32 count);
void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);

View File

@ -182,7 +182,7 @@
void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -564,6 +564,8 @@ struct rt2x00lib_ops {
@@ -563,6 +563,8 @@ struct rt2x00lib_ops {
void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
void (*rf_self_txdc_cal) (struct rt2x00_dev *rt2x00dev);

View File

@ -92,7 +92,7 @@
void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -566,6 +566,7 @@ struct rt2x00lib_ops {
@@ -565,6 +565,7 @@ struct rt2x00lib_ops {
void (*rf_self_txdc_cal) (struct rt2x00_dev *rt2x00dev);
int (*calcrcalibrationcode) (struct rt2x00_dev *rt2x00dev, int d1, int d2);
void (*r_calibration) (struct rt2x00_dev *rt2x00dev);

View File

@ -407,7 +407,7 @@
void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -567,6 +567,7 @@ struct rt2x00lib_ops {
@@ -566,6 +566,7 @@ struct rt2x00lib_ops {
int (*calcrcalibrationcode) (struct rt2x00_dev *rt2x00dev, int d1, int d2);
void (*r_calibration) (struct rt2x00_dev *rt2x00dev);
void (*rxdcoc_calibration) (struct rt2x00_dev *rt2x00dev);

View File

@ -992,7 +992,7 @@
void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -568,6 +568,7 @@ struct rt2x00lib_ops {
@@ -567,6 +567,7 @@ struct rt2x00lib_ops {
void (*r_calibration) (struct rt2x00_dev *rt2x00dev);
void (*rxdcoc_calibration) (struct rt2x00_dev *rt2x00dev);
void (*rxiq_calibration) (struct rt2x00_dev *rt2x00dev);

View File

@ -1,118 +0,0 @@
From dc0c18ed229cdcca283dd78fefa38273ec37a42c Mon Sep 17 00:00:00 2001
From: Aaron Komisar <aaron.komisar@tandemg.com>
Date: Wed, 2 Oct 2019 13:59:07 +0000
Subject: mac80211: fix scan when operating on DFS channels in ETSI domains
In non-ETSI regulatory domains scan is blocked when operating channel
is a DFS channel. For ETSI, however, once DFS channel is marked as
available after the CAC, this channel will remain available (for some
time) even after leaving this channel.
Therefore a scan can be done without any impact on the availability
of the DFS channel as no new CAC is required after the scan.
Enable scan in mac80211 in these cases.
Signed-off-by: Aaron Komisar <aaron.komisar@tandemg.com>
Link: https://lore.kernel.org/r/1570024728-17284-1-git-send-email-aaron.komisar@tandemg.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/net/cfg80211.h | 8 ++++++++
net/mac80211/scan.c | 30 ++++++++++++++++++++++++++++--
net/wireless/reg.c | 1 +
net/wireless/reg.h | 8 --------
4 files changed, 37 insertions(+), 10 deletions(-)
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5554,6 +5554,14 @@ const struct ieee80211_reg_rule *freq_re
const char *reg_initiator_name(enum nl80211_reg_initiator initiator);
/**
+ * regulatory_pre_cac_allowed - check if pre-CAC allowed in the current regdom
+ * @wiphy: wiphy for which pre-CAC capability is checked.
+ *
+ * Pre-CAC is allowed only in some regdomains (notable ETSI).
+ */
+bool regulatory_pre_cac_allowed(struct wiphy *wiphy);
+
+/**
* DOC: Internal regulatory db functions
*
*/
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -520,10 +520,33 @@ static int ieee80211_start_sw_scan(struc
return 0;
}
+static bool __ieee80211_can_leave_ch(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_sub_if_data *sdata_iter;
+
+ if (!ieee80211_is_radar_required(local))
+ return true;
+
+ if (!regulatory_pre_cac_allowed(local->hw.wiphy))
+ return false;
+
+ mutex_lock(&local->iflist_mtx);
+ list_for_each_entry(sdata_iter, &local->interfaces, list) {
+ if (sdata_iter->wdev.cac_started) {
+ mutex_unlock(&local->iflist_mtx);
+ return false;
+ }
+ }
+ mutex_unlock(&local->iflist_mtx);
+
+ return true;
+}
+
static bool ieee80211_can_scan(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
- if (ieee80211_is_radar_required(local))
+ if (!__ieee80211_can_leave_ch(sdata))
return false;
if (!list_empty(&local->roc_list))
@@ -630,7 +653,10 @@ static int __ieee80211_start_scan(struct
lockdep_assert_held(&local->mtx);
- if (local->scan_req || ieee80211_is_radar_required(local))
+ if (local->scan_req)
+ return -EBUSY;
+
+ if (!__ieee80211_can_leave_ch(sdata))
return -EBUSY;
if (!ieee80211_can_scan(local, sdata)) {
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -3883,6 +3883,7 @@ bool regulatory_pre_cac_allowed(struct w
return pre_cac_allowed;
}
+EXPORT_SYMBOL(regulatory_pre_cac_allowed);
void regulatory_propagate_dfs_state(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef,
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -156,14 +156,6 @@ bool regulatory_indoor_allowed(void);
#define REG_PRE_CAC_EXPIRY_GRACE_MS 2000
/**
- * regulatory_pre_cac_allowed - if pre-CAC allowed in the current dfs domain
- * @wiphy: wiphy for which pre-CAC capability is checked.
-
- * Pre-CAC is allowed only in ETSI domain.
- */
-bool regulatory_pre_cac_allowed(struct wiphy *wiphy);
-
-/**
* regulatory_propagate_dfs_state - Propagate DFS channel state to other wiphys
* @wiphy - wiphy on which radar is detected and the event will be propagated
* to other available wiphys having the same DFS domain

View File

@ -1,39 +0,0 @@
From 95697f9907bfe3eab0ef20265a766b22e27dde64 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Fri, 4 Oct 2019 15:37:05 +0300
Subject: [PATCH] mac80211: accept deauth frames in IBSS mode
We can process deauth frames and all, but we drop them very
early in the RX path today - this could never have worked.
Fixes: 2cc59e784b54 ("mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20191004123706.15768-2-luca@coelho.fi
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/rx.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3467,9 +3467,18 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
/* process for all: mesh, mlme, ibss */
break;
+ case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
+ if (is_multicast_ether_addr(mgmt->da) &&
+ !is_broadcast_ether_addr(mgmt->da))
+ return RX_DROP_MONITOR;
+
+ /* process only for station/IBSS */
+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_ADHOC)
+ return RX_DROP_MONITOR;
+ break;
case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
- case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
if (is_multicast_ether_addr(mgmt->da) &&
!is_broadcast_ether_addr(mgmt->da))

View File

@ -13,9 +13,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
PKG_SOURCE_DATE:=2019-09-23
PKG_SOURCE_VERSION:=daed0cf9831c07863e5a2a572c2dd242fe757a31
PKG_MIRROR_HASH:=363ef5da4165dc54340e311a2158bd86fd2e74cfcf8118e2f35680bd5ac556db
PKG_SOURCE_DATE:=2019-11-22
PKG_SOURCE_VERSION:=8174814a507489ebbe8bb85c1004e1f02919ca82
PKG_MIRROR_HASH:=84e0cca2d47470bdb1788a8ae044cc425be8ff650a1137474ba43a15040085da
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.80
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
PKG_RELEASE:=14
PKG_RELEASE:=15
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq

View File

@ -966,7 +966,8 @@ dnsmasq_start()
[ -f "$TIMEVALIDFILE" ] || xappend "--dnssec-no-timecheck"
}
}
append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
config_get_bool dnsseccheckunsigned "$cfg" dnsseccheckunsigned 1
[ "$dnsseccheckunsigned" -eq 0 ] && xappend "--dnssec-check-unsigned=no"
}
config_get addmac "$cfg" addmac 0

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=e2fsprogs
PKG_VERSION:=1.44.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/

View File

@ -0,0 +1,203 @@
From 09fe1fd2a1f9efc3091b4fc61f1876d0785956a8 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 1 Sep 2019 00:59:16 -0400
Subject: libsupport: add checks to prevent buffer overrun bugs in quota code
A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by e2fsck. To fix this, add sanity checks to the
quota header fields as well as to block number references in the quota
tree.
Addresses: CVE-2019-5094
Addresses: TALOS-2019-0887
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 8dbe7b475ec5e91ed767239f0e85880f416fc384)
---
lib/support/mkquota.c | 1 +
lib/support/quotaio_tree.c | 71 ++++++++++++++++++++++++++++++----------------
lib/support/quotaio_v2.c | 28 ++++++++++++++++++
3 files changed, 76 insertions(+), 24 deletions(-)
--- a/lib/support/mkquota.c
+++ b/lib/support/mkquota.c
@@ -671,6 +671,7 @@ errcode_t quota_compare_and_update(quota
err = qh.qh_ops->scan_dquots(&qh, scan_dquots_callback, &scan_data);
if (err) {
log_debug("Error scanning dquots");
+ *usage_inconsistent = 1;
goto out_close_qh;
}
--- a/lib/support/quotaio_tree.c
+++ b/lib/support/quotaio_tree.c
@@ -540,6 +540,17 @@ struct dquot *qtree_read_dquot(struct qu
return dquot;
}
+static int check_reference(struct quota_handle *h, unsigned int blk)
+{
+ if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks) {
+ log_err("Illegal reference (%u >= %u) in %s quota file",
+ blk, h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
+ quota_type2name(h->qh_type));
+ return -1;
+ }
+ return 0;
+}
+
/*
* Scan all dquots in file and call callback on each
*/
@@ -558,7 +569,7 @@ static int report_block(struct dquot *dq
int entries, i;
if (!buf)
- return 0;
+ return -1;
set_bit(bitmap, blk);
read_blk(dquot->dq_h, blk, buf);
@@ -580,23 +591,12 @@ static int report_block(struct dquot *dq
return entries;
}
-static void check_reference(struct quota_handle *h, unsigned int blk)
-{
- if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks)
- log_err("Illegal reference (%u >= %u) in %s quota file. "
- "Quota file is probably corrupted.\n"
- "Please run e2fsck (8) to fix it.",
- blk,
- h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
- quota_type2name(h->qh_type));
-}
-
static int report_tree(struct dquot *dquot, unsigned int blk, int depth,
char *bitmap,
int (*process_dquot) (struct dquot *, void *),
void *data)
{
- int entries = 0, i;
+ int entries = 0, ret, i;
dqbuf_t buf = getdqbuf();
__le32 *ref = (__le32 *) buf;
@@ -607,22 +607,40 @@ static int report_tree(struct dquot *dqu
if (depth == QT_TREEDEPTH - 1) {
for (i = 0; i < QT_BLKSIZE >> 2; i++) {
blk = ext2fs_le32_to_cpu(ref[i]);
- check_reference(dquot->dq_h, blk);
- if (blk && !get_bit(bitmap, blk))
- entries += report_block(dquot, blk, bitmap,
- process_dquot, data);
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ if (blk && !get_bit(bitmap, blk)) {
+ ret = report_block(dquot, blk, bitmap,
+ process_dquot, data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
+ }
}
} else {
for (i = 0; i < QT_BLKSIZE >> 2; i++) {
blk = ext2fs_le32_to_cpu(ref[i]);
if (blk) {
- check_reference(dquot->dq_h, blk);
- entries += report_tree(dquot, blk, depth + 1,
- bitmap, process_dquot,
- data);
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ ret = report_tree(dquot, blk, depth + 1,
+ bitmap, process_dquot,
+ data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
}
}
}
+errout:
freedqbuf(buf);
return entries;
}
@@ -642,6 +660,7 @@ int qtree_scan_dquots(struct quota_handl
int (*process_dquot) (struct dquot *, void *),
void *data)
{
+ int ret;
char *bitmap;
struct v2_mem_dqinfo *v2info = &h->qh_info.u.v2_mdqi;
struct qtree_mem_dqinfo *info = &v2info->dqi_qtree;
@@ -655,10 +674,14 @@ int qtree_scan_dquots(struct quota_handl
ext2fs_free_mem(&dquot);
return -1;
}
- v2info->dqi_used_entries = report_tree(dquot, QT_TREEOFF, 0, bitmap,
- process_dquot, data);
+ ret = report_tree(dquot, QT_TREEOFF, 0, bitmap, process_dquot, data);
+ if (ret < 0)
+ goto errout;
+ v2info->dqi_used_entries = ret;
v2info->dqi_data_blocks = find_set_bits(bitmap, info->dqi_blocks);
+ ret = 0;
+errout:
ext2fs_free_mem(&bitmap);
ext2fs_free_mem(&dquot);
- return 0;
+ return ret;
}
--- a/lib/support/quotaio_v2.c
+++ b/lib/support/quotaio_v2.c
@@ -175,6 +175,8 @@ static int v2_check_file(struct quota_ha
static int v2_init_io(struct quota_handle *h)
{
struct v2_disk_dqinfo ddqinfo;
+ struct v2_mem_dqinfo *info;
+ __u64 filesize;
h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
sizeof(struct v2r1_disk_dqblk);
@@ -185,6 +187,32 @@ static int v2_init_io(struct quota_handl
sizeof(ddqinfo)) != sizeof(ddqinfo))
return -1;
v2_disk2memdqinfo(&h->qh_info, &ddqinfo);
+
+ /* Check to make sure quota file info is sane */
+ info = &h->qh_info.u.v2_mdqi;
+ if (ext2fs_file_get_lsize(h->qh_qf.e2_file, &filesize))
+ return -1;
+ if ((filesize > (1U << 31)) ||
+ (info->dqi_qtree.dqi_blocks >
+ (filesize + QT_BLKSIZE - 1) >> QT_BLKSIZE_BITS)) {
+ log_err("Quota inode %u corrupted: file size %llu; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ filesize, info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_blk >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_blk %u; dqi_blocks %u",
+ h->qh_qf.ino, info->dqi_qtree.dqi_free_blk,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_entry >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_entry %u; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ info->dqi_qtree.dqi_free_entry,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
return 0;
}

View File

@ -15,7 +15,7 @@
label-mac-device = &wifi;
};
airrouter-leds {
leds {
compatible = "gpio-leds";
led_globe: globe {

View File

@ -78,30 +78,30 @@
read-only;
};
partition@1 {
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
partition@2 {
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0x750000>;
};
partition@3 {
partition@7a0000 {
label = "board_config";
reg = <0x7a0000 0x010000>;
read-only;
};
partition@4 {
partition@7b0000 {
label = "cfg";
reg = <0x7b0000 0x040000>;
read-only;
};
art: partition@5 {
art: partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;

View File

@ -9,12 +9,6 @@
compatible = "ubnt,xm", "qca,ar7241";
model = "Ubiquiti Networks XM (rev 1.0) board";
/* extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <40000000>;
};
*/
keys {
compatible = "gpio-keys";
@ -30,12 +24,9 @@
status = "okay";
};
/*&pll {
clocks = <&extosc>;
};*/
&spi {
status = "okay";
num-cs = <1>;
flash@0 {
@ -54,30 +45,30 @@
read-only;
};
partition@1 {
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
partition@2 {
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0x750000>;
};
partition@3 {
partition@7a0000 {
label = "board_config";
reg = <0x7a0000 0x010000>;
read-only;
};
partition@4 {
partition@7b0000 {
label = "cfg";
reg = <0x7b0000 0x040000>;
read-only;
};
art: partition@5 {
art: partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;

View File

@ -11,6 +11,7 @@
leds {
compatible = "gpio-leds";
link1 {
label = "ubnt:red:link1";
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx-v1.dtsi"
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,cpe210-v1", "qca,ar9344";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx-v1.dtsi"
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,cpe220-v2", "qca,ar9344";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx-v1.dtsi"
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,cpe510-v1", "qca,ar9344";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpe510.dtsi"
#include "ar9344_tplink_cpe_1port.dtsi"
/ {
compatible = "tplink,cpe510-v2", "qca,ar9344";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpe510.dtsi"
#include "ar9344_tplink_cpe_1port.dtsi"
/ {
compatible = "tplink,cpe510-v3", "qca,ar9344";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx.dtsi"
#include "ar9344_tplink_cpe.dtsi"
/ {
model = "TP-Link CPE610 v1";

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx.dtsi"
#include "ar9344_tplink_cpe.dtsi"
/ {
aliases {

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx.dtsi"
#include "ar9344_tplink_cpe.dtsi"
/ {
aliases {

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpexxx-v1.dtsi"
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,wbs210-v2", "qca,ar9344";

View File

@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,wbs510-v1", "qca,ar9344";
model = "TP-Link WBS510 v1";
};
&led_link4 {
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};

View File

@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar9344_tplink_cpe_2port.dtsi"
/ {
compatible = "tplink,wbs510-v2", "qca,ar9344";
model = "TP-Link WBS510 v2";
};
&led_link4 {
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};

View File

@ -175,7 +175,9 @@ tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v2)
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2)
ucidef_set_led_netdev "lan0" "LAN0" "tp-link:green:lan0" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
ucidef_set_rssimon "wlan0" "200000" "1"

View File

@ -92,6 +92,8 @@ ath79_setup_interfaces()
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2|\
ubnt,nanostation-m|\
ubnt,routerstation)
ucidef_set_interfaces_lan_wan "eth1" "eth0"

View File

@ -46,7 +46,9 @@ tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v2)
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
;;
ubnt,nanostation-ac)

View File

@ -548,3 +548,26 @@ define Device/tplink_wbs210-v2
TPLINK_BOARD_ID := WBS210V2
endef
TARGET_DEVICES += tplink_wbs210-v2
define Device/tplink_wbs510-v1
$(Device/tplink-loader-okli)
ATH_SOC := ar9344
IMAGE_SIZE := 7680k
DEVICE_MODEL := WBS510
DEVICE_VARIANT := v1
DEVICE_PACKAGES := rssileds
TPLINK_BOARD_ID := WBS510
SUPPORTED_DEVICES += wbs510
endef
TARGET_DEVICES += tplink_wbs510-v1
define Device/tplink_wbs510-v2
$(Device/tplink-loader-okli)
ATH_SOC := ar9344
IMAGE_SIZE := 7680k
DEVICE_MODEL := WBS510
DEVICE_VARIANT := v2
DEVICE_PACKAGES := rssileds
TPLINK_BOARD_ID := WBS510V2
endef
TARGET_DEVICES += tplink_wbs510-v2

View File

@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Device and char device-related information */
static DEFINE_IDA(gpio_ida);
static dev_t gpio_devt;
@@ -2634,7 +2636,7 @@ int gpiod_direction_output(struct gpio_d
@@ -2654,7 +2656,7 @@ int gpiod_direction_output(struct gpio_d
value = !!value;
/* GPIOs used for IRQs shall not be set as output */
@ -35,7 +35,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
gpiod_err(desc,
"%s: tried to set a GPIO tied to an IRQ as output\n",
__func__);
@@ -3333,7 +3335,7 @@ int gpiochip_lock_as_irq(struct gpio_chi
@@ -3353,7 +3355,7 @@ int gpiochip_lock_as_irq(struct gpio_chi
}
}

View File

@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
@@ -3006,8 +3015,14 @@ static int lan78xx_bind(struct lan78xx_n
@@ -3011,8 +3020,14 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_RX_CSUM_ENABLE)
dev->net->features |= NETIF_F_RXCSUM;

View File

@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
@@ -3819,7 +3824,12 @@ static int lan78xx_probe(struct usb_inte
@@ -3824,7 +3829,12 @@ static int lan78xx_probe(struct usb_inte
dev->pipe_intr = usb_rcvintpipe(dev->udev,
dev->ep_intr->desc.bEndpointAddress &
USB_ENDPOINT_NUMBER_MASK);

View File

@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing.
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3253,7 +3253,7 @@ static int rx_submit(struct lan78xx_net
@@ -3258,7 +3258,7 @@ static int rx_submit(struct lan78xx_net
size_t size = dev->rx_urb_size;
int ret = 0;

View File

@ -20,7 +20,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -286,6 +286,8 @@ int bcmgenet_mii_probe(struct net_device
@@ -285,6 +285,8 @@ int bcmgenet_mii_probe(struct net_device
/* Communicate the integrated PHY revision */
if (priv->internal_phy)
phy_flags = priv->gphy_rev;

View File

@ -41,7 +41,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -3959,8 +3959,23 @@ struct gpio_desc *__must_check gpiod_get
@@ -3979,8 +3979,23 @@ struct gpio_desc *__must_check gpiod_get
* the device name as label
*/
status = gpiod_request(desc, con_id ? con_id : devname);

View File

@ -23,7 +23,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4033,6 +4033,8 @@ struct gpio_desc *gpiod_get_from_of_node
@@ -4053,6 +4053,8 @@ struct gpio_desc *gpiod_get_from_of_node
transitory = flags & OF_GPIO_TRANSITORY;
ret = gpiod_request(desc, label);

View File

@ -1,48 +0,0 @@
From feef7918667b84f9d5653c501542dd8d84ae32af Mon Sep 17 00:00:00 2001
From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Date: Sun, 19 Aug 2018 22:20:23 +0300
Subject: [PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Setting GPIO 21 high seems to be required to enable power to USB ports
on the WNDR3400v3. As there is already similar code for WNR3500L,
make the existing USB power GPIO code generic and use that.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20259/
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
arch/mips/bcm47xx/workarounds.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/arch/mips/bcm47xx/workarounds.c
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -5,9 +5,8 @@
#include <bcm47xx_board.h>
#include <bcm47xx.h>
-static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
{
- const int usb_power = 12;
int err;
err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
@@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)
switch (board) {
case BCM47XX_BOARD_NETGEAR_WNR3500L:
- bcm47xx_workarounds_netgear_wnr3500l();
+ bcm47xx_workarounds_enable_usb_power(12);
+ break;
+ case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
+ bcm47xx_workarounds_enable_usb_power(21);
break;
default:
/* No workaround(s) needed */

View File

@ -1,48 +0,0 @@
From feef7918667b84f9d5653c501542dd8d84ae32af Mon Sep 17 00:00:00 2001
From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Date: Sun, 19 Aug 2018 22:20:23 +0300
Subject: [PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Setting GPIO 21 high seems to be required to enable power to USB ports
on the WNDR3400v3. As there is already similar code for WNR3500L,
make the existing USB power GPIO code generic and use that.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20259/
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
arch/mips/bcm47xx/workarounds.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/arch/mips/bcm47xx/workarounds.c
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -5,9 +5,8 @@
#include <bcm47xx_board.h>
#include <bcm47xx.h>
-static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
{
- const int usb_power = 12;
int err;
err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
@@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)
switch (board) {
case BCM47XX_BOARD_NETGEAR_WNR3500L:
- bcm47xx_workarounds_netgear_wnr3500l();
+ bcm47xx_workarounds_enable_usb_power(12);
+ break;
+ case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
+ bcm47xx_workarounds_enable_usb_power(21);
break;
default:
/* No workaround(s) needed */

View File

@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1722,10 +1722,8 @@ static int bcm_enet_probe(struct platfor
@@ -1723,10 +1723,8 @@ static int bcm_enet_probe(struct platfor
const char *clk_name;
int i, ret;
@ -26,7 +26,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
@@ -2700,11 +2698,8 @@ static int bcm_enetsw_probe(struct platf
@@ -2701,11 +2699,8 @@ static int bcm_enetsw_probe(struct platf
struct resource *res_mem;
int ret, irq_rx, irq_tx;

View File

@ -13,7 +13,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1767,14 +1767,14 @@ static int bcm_enet_probe(struct platfor
@@ -1768,14 +1768,14 @@ static int bcm_enet_probe(struct platfor
clk_name = "enet1";
}
@ -30,7 +30,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
/* initialize default and fetch platform data */
priv->rx_ring_size = BCMENET_DEF_RX_DESC;
@@ -1802,7 +1802,7 @@ static int bcm_enet_probe(struct platfor
@@ -1803,7 +1803,7 @@ static int bcm_enet_probe(struct platfor
if (priv->mac_id == 0 && priv->has_phy && !priv->use_external_mii) {
/* using internal PHY, enable clock */
@ -39,7 +39,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
if (IS_ERR(priv->phy_clk)) {
ret = PTR_ERR(priv->phy_clk);
priv->phy_clk = NULL;
@@ -1810,7 +1810,7 @@ static int bcm_enet_probe(struct platfor
@@ -1811,7 +1811,7 @@ static int bcm_enet_probe(struct platfor
}
ret = clk_prepare_enable(priv->phy_clk);
if (ret)
@ -48,7 +48,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
/* do minimal hardware init to be able to probe mii bus */
@@ -1907,14 +1907,8 @@ out_uninit_hw:
@@ -1908,14 +1908,8 @@ out_uninit_hw:
if (priv->phy_clk)
clk_disable_unprepare(priv->phy_clk);
@ -63,7 +63,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
out:
free_netdev(dev);
return ret;
@@ -1950,12 +1944,10 @@ static int bcm_enet_remove(struct platfo
@@ -1951,12 +1945,10 @@ static int bcm_enet_remove(struct platfo
}
/* disable hw block clocks */
@ -78,7 +78,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
free_netdev(dev);
return 0;
@@ -2738,26 +2730,20 @@ static int bcm_enetsw_probe(struct platf
@@ -2739,26 +2731,20 @@ static int bcm_enetsw_probe(struct platf
if (ret)
goto out;
@ -111,7 +111,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
priv->rx_chan = 0;
priv->tx_chan = 1;
@@ -2789,15 +2775,6 @@ static int bcm_enetsw_probe(struct platf
@@ -2790,15 +2776,6 @@ static int bcm_enetsw_probe(struct platf
out_disable_clk:
clk_disable_unprepare(priv->mac_clk);
@ -127,7 +127,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
out:
free_netdev(dev);
return ret;
@@ -2809,20 +2786,13 @@ static int bcm_enetsw_remove(struct plat
@@ -2810,20 +2787,13 @@ static int bcm_enetsw_remove(struct plat
{
struct bcm_enet_priv *priv;
struct net_device *dev;

View File

@ -13,7 +13,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1904,8 +1904,7 @@ out_free_mdio:
@@ -1905,8 +1905,7 @@ out_free_mdio:
out_uninit_hw:
/* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG);
@ -23,7 +23,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
out_disable_clk_mac:
clk_disable_unprepare(priv->mac_clk);
@@ -1944,9 +1943,7 @@ static int bcm_enet_remove(struct platfo
@@ -1945,9 +1944,7 @@ static int bcm_enet_remove(struct platfo
}
/* disable hw block clocks */

View File

@ -13,7 +13,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1719,7 +1719,6 @@ static int bcm_enet_probe(struct platfor
@@ -1720,7 +1720,6 @@ static int bcm_enet_probe(struct platfor
struct bcm63xx_enet_platform_data *pd;
struct resource *res_mem, *res_irq, *res_irq_rx, *res_irq_tx;
struct mii_bus *bus;
@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
int i, ret;
if (!bcm_enet_shared_base[0])
@@ -1760,14 +1759,12 @@ static int bcm_enet_probe(struct platfor
@@ -1761,14 +1760,12 @@ static int bcm_enet_probe(struct platfor
if (priv->mac_id == 0) {
priv->rx_chan = 0;
priv->tx_chan = 1;

View File

@ -45,7 +45,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
/*
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1755,15 +1755,6 @@ static int bcm_enet_probe(struct platfor
@@ -1756,15 +1756,6 @@ static int bcm_enet_probe(struct platfor
priv->irq_tx = res_irq_tx->start;
priv->mac_id = pdev->id;
@ -61,7 +61,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
if (IS_ERR(priv->mac_clk)) {
ret = PTR_ERR(priv->mac_clk);
@@ -1795,6 +1786,8 @@ static int bcm_enet_probe(struct platfor
@@ -1796,6 +1787,8 @@ static int bcm_enet_probe(struct platfor
priv->dma_chan_width = pd->dma_chan_width;
priv->dma_has_sram = pd->dma_has_sram;
priv->dma_desc_shift = pd->dma_desc_shift;

View File

@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1790,7 +1790,7 @@ static int bcm_enet_probe(struct platfor
@@ -1791,7 +1791,7 @@ static int bcm_enet_probe(struct platfor
priv->tx_chan = pd->tx_chan;
}

View File

@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1753,7 +1753,6 @@ static int bcm_enet_probe(struct platfor
@@ -1754,7 +1754,6 @@ static int bcm_enet_probe(struct platfor
dev->irq = priv->irq = res_irq->start;
priv->irq_rx = res_irq_rx->start;
priv->irq_tx = res_irq_tx->start;
@ -23,7 +23,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
if (IS_ERR(priv->mac_clk)) {
@@ -1821,7 +1820,7 @@ static int bcm_enet_probe(struct platfor
@@ -1822,7 +1821,7 @@ static int bcm_enet_probe(struct platfor
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;

View File

@ -1,26 +0,0 @@
From f1af8bb8e0879a3c2d9679a7274c2774335e9876 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Wed, 14 Nov 2018 12:06:41 +0100
Subject: [PATCH] MIPS: BCM63XX: fix switch core reset on BCM6368
The Ethernet Switch core mask was set to 0, causing the switch core to
be not reset on BCM6368 on boot. Provide the proper mask so the switch
core gets reset to a known good state.
Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
arch/mips/bcm63xx/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/bcm63xx/reset.c
+++ b/arch/mips/bcm63xx/reset.c
@@ -120,7 +120,7 @@
#define BCM6368_RESET_DSL 0
#define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK
#define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK
-#define BCM6368_RESET_ENETSW 0
+#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK
#define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK
#define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK
#define BCM6368_RESET_PCIE 0

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1636,7 +1636,7 @@ static int bcm_enet_change_mtu(struct ne
@@ -1637,7 +1637,7 @@ static int bcm_enet_change_mtu(struct ne
return -EBUSY;
/* add ethernet header + vlan tag size */

View File

@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -869,10 +869,8 @@ static int bcm_enet_open(struct net_devi
@@ -870,10 +870,8 @@ static int bcm_enet_open(struct net_devi
struct bcm_enet_priv *priv;
struct sockaddr addr;
struct device *kdev;
@ -26,7 +26,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
void *p;
u32 val;
@@ -880,40 +878,10 @@ static int bcm_enet_open(struct net_devi
@@ -881,40 +879,10 @@ static int bcm_enet_open(struct net_devi
kdev = &priv->pdev->dev;
if (priv->has_phy) {
@ -68,7 +68,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
/* mask all interrupts and request them */
@@ -923,7 +891,7 @@ static int bcm_enet_open(struct net_devi
@@ -924,7 +892,7 @@ static int bcm_enet_open(struct net_devi
ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev);
if (ret)
@ -77,7 +77,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0,
dev->name, dev);
@@ -1085,8 +1053,8 @@ static int bcm_enet_open(struct net_devi
@@ -1086,8 +1054,8 @@ static int bcm_enet_open(struct net_devi
enet_dmac_writel(priv, priv->dma_chan_int_mask,
ENETDMAC_IRMASK, priv->tx_chan);
@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
else
bcm_enet_adjust_link(dev);
@@ -1127,10 +1095,6 @@ out_freeirq_rx:
@@ -1128,10 +1096,6 @@ out_freeirq_rx:
out_freeirq:
free_irq(dev->irq, dev);
@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
return ret;
}
@@ -1235,10 +1199,6 @@ static int bcm_enet_stop(struct net_devi
@@ -1236,10 +1200,6 @@ static int bcm_enet_stop(struct net_devi
free_irq(priv->irq_rx, dev);
free_irq(dev->irq, dev);
@ -110,7 +110,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
return 0;
}
@@ -1804,14 +1764,49 @@ static int bcm_enet_probe(struct platfor
@@ -1805,14 +1765,49 @@ static int bcm_enet_probe(struct platfor
/* do minimal hardware init to be able to probe mii bus */
bcm_enet_hw_preinit(priv);
@ -161,7 +161,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
bus = priv->mii_bus;
@@ -1835,6 +1830,35 @@ static int bcm_enet_probe(struct platfor
@@ -1836,6 +1831,35 @@ static int bcm_enet_probe(struct platfor
dev_err(&pdev->dev, "unable to register mdio bus\n");
goto out_free_mdio;
}
@ -197,7 +197,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
} else {
/* run platform code to initialize PHY device */
@@ -1842,47 +1866,16 @@ static int bcm_enet_probe(struct platfor
@@ -1843,47 +1867,16 @@ static int bcm_enet_probe(struct platfor
pd->mii_config(dev, 1, bcm_enet_mdio_read_mii,
bcm_enet_mdio_write_mii)) {
dev_err(&pdev->dev, "unable to configure mdio bus\n");
@ -249,7 +249,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
if (priv->mii_bus)
mdiobus_unregister(priv->mii_bus);
@@ -1890,6 +1883,9 @@ out_free_mdio:
@@ -1891,6 +1884,9 @@ out_free_mdio:
if (priv->mii_bus)
mdiobus_free(priv->mii_bus);
@ -259,7 +259,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
out_uninit_hw:
/* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG);
@@ -1920,6 +1916,7 @@ static int bcm_enet_remove(struct platfo
@@ -1921,6 +1917,7 @@ static int bcm_enet_remove(struct platfo
enet_writel(priv, 0, ENET_MIISC_REG);
if (priv->has_phy) {

View File

@ -32,7 +32,7 @@ Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports
#define ENETSW_MDIOC_EXT_MASK (1 << 16)
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2191,6 +2191,18 @@ static int bcm_enetsw_open(struct net_de
@@ -2192,6 +2192,18 @@ static int bcm_enetsw_open(struct net_de
priv->sw_port_link[i] = 0;
}

View File

@ -20,7 +20,7 @@
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
@@ -1936,7 +1937,8 @@ static int bcm_enet_remove(struct platfo
@@ -1937,7 +1938,8 @@ static int bcm_enet_remove(struct platfo
return 0;
}
@ -30,7 +30,7 @@
.probe = bcm_enet_probe,
.remove = bcm_enet_remove,
.driver = {
@@ -1945,6 +1947,42 @@ struct platform_driver bcm63xx_enet_driv
@@ -1946,6 +1948,42 @@ struct platform_driver bcm63xx_enet_driv
},
};
@ -73,7 +73,7 @@
/*
* switch mii access callbacks
*/
@@ -2203,29 +2241,6 @@ static int bcm_enetsw_open(struct net_de
@@ -2204,29 +2242,6 @@ static int bcm_enetsw_open(struct net_de
enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
}
@ -103,7 +103,7 @@
/* initialize flow control buffer allocation */
enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0,
ENETDMA_BUFALLOC_REG(priv->rx_chan));
@@ -2684,6 +2699,9 @@ static int bcm_enetsw_probe(struct platf
@@ -2685,6 +2700,9 @@ static int bcm_enetsw_probe(struct platf
struct bcm63xx_enetsw_platform_data *pd;
struct resource *res_mem;
int ret, irq_rx, irq_tx;
@ -113,7 +113,7 @@
if (!bcm_enet_shared_base[0])
return -EPROBE_DEFER;
@@ -2766,6 +2784,43 @@ static int bcm_enetsw_probe(struct platf
@@ -2767,6 +2785,43 @@ static int bcm_enetsw_probe(struct platf
priv->pdev = pdev;
priv->net_dev = dev;
@ -157,7 +157,7 @@
return 0;
out_disable_clk:
@@ -2787,6 +2842,9 @@ static int bcm_enetsw_remove(struct plat
@@ -2788,6 +2843,9 @@ static int bcm_enetsw_remove(struct plat
priv = netdev_priv(dev);
unregister_netdev(dev);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2743,9 +2743,9 @@ static int bcm_enetsw_probe(struct platf
@@ -2744,9 +2744,9 @@ static int bcm_enetsw_probe(struct platf
if (ret)
goto out;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2238,6 +2238,10 @@ static int bcm_enetsw_open(struct net_de
@@ -2239,6 +2239,10 @@ static int bcm_enetsw_open(struct net_de
rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i));
rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;

View File

@ -1,26 +0,0 @@
From f1af8bb8e0879a3c2d9679a7274c2774335e9876 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Wed, 14 Nov 2018 12:06:41 +0100
Subject: [PATCH] MIPS: BCM63XX: fix switch core reset on BCM6368
The Ethernet Switch core mask was set to 0, causing the switch core to
be not reset on BCM6368 on boot. Provide the proper mask so the switch
core gets reset to a known good state.
Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
arch/mips/bcm63xx/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/bcm63xx/reset.c
+++ b/arch/mips/bcm63xx/reset.c
@@ -120,7 +120,7 @@
#define BCM6368_RESET_DSL 0
#define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK
#define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK
-#define BCM6368_RESET_ENETSW 0
+#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK
#define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK
#define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK
#define BCM6368_RESET_PCIE 0

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1633,7 +1633,7 @@ static int bcm_enet_change_mtu(struct ne
@@ -1634,7 +1634,7 @@ static int bcm_enet_change_mtu(struct ne
return -EBUSY;
/* add ethernet header + vlan tag size */

View File

@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -866,10 +866,8 @@ static int bcm_enet_open(struct net_devi
@@ -867,10 +867,8 @@ static int bcm_enet_open(struct net_devi
struct bcm_enet_priv *priv;
struct sockaddr addr;
struct device *kdev;
@ -26,7 +26,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
void *p;
u32 val;
@@ -877,40 +875,10 @@ static int bcm_enet_open(struct net_devi
@@ -878,40 +876,10 @@ static int bcm_enet_open(struct net_devi
kdev = &priv->pdev->dev;
if (priv->has_phy) {
@ -68,7 +68,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
/* mask all interrupts and request them */
@@ -920,7 +888,7 @@ static int bcm_enet_open(struct net_devi
@@ -921,7 +889,7 @@ static int bcm_enet_open(struct net_devi
ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev);
if (ret)
@ -77,7 +77,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0,
dev->name, dev);
@@ -1082,8 +1050,8 @@ static int bcm_enet_open(struct net_devi
@@ -1083,8 +1051,8 @@ static int bcm_enet_open(struct net_devi
enet_dmac_writel(priv, priv->dma_chan_int_mask,
ENETDMAC_IRMASK, priv->tx_chan);
@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
else
bcm_enet_adjust_link(dev);
@@ -1124,10 +1092,6 @@ out_freeirq_rx:
@@ -1125,10 +1093,6 @@ out_freeirq_rx:
out_freeirq:
free_irq(dev->irq, dev);
@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
return ret;
}
@@ -1232,10 +1196,6 @@ static int bcm_enet_stop(struct net_devi
@@ -1233,10 +1197,6 @@ static int bcm_enet_stop(struct net_devi
free_irq(priv->irq_rx, dev);
free_irq(dev->irq, dev);
@ -110,7 +110,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
return 0;
}
@@ -1801,14 +1761,47 @@ static int bcm_enet_probe(struct platfor
@@ -1802,14 +1762,47 @@ static int bcm_enet_probe(struct platfor
/* do minimal hardware init to be able to probe mii bus */
bcm_enet_hw_preinit(priv);
@ -159,7 +159,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
bus = priv->mii_bus;
@@ -1832,6 +1825,35 @@ static int bcm_enet_probe(struct platfor
@@ -1833,6 +1826,35 @@ static int bcm_enet_probe(struct platfor
dev_err(&pdev->dev, "unable to register mdio bus\n");
goto out_free_mdio;
}
@ -195,7 +195,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
} else {
/* run platform code to initialize PHY device */
@@ -1839,45 +1861,16 @@ static int bcm_enet_probe(struct platfor
@@ -1840,45 +1862,16 @@ static int bcm_enet_probe(struct platfor
pd->mii_config(dev, 1, bcm_enet_mdio_read_mii,
bcm_enet_mdio_write_mii)) {
dev_err(&pdev->dev, "unable to configure mdio bus\n");
@ -245,7 +245,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
if (priv->mii_bus)
mdiobus_unregister(priv->mii_bus);
@@ -1885,6 +1878,9 @@ out_free_mdio:
@@ -1886,6 +1879,9 @@ out_free_mdio:
if (priv->mii_bus)
mdiobus_free(priv->mii_bus);
@ -255,7 +255,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
out_uninit_hw:
/* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG);
@@ -1915,6 +1911,7 @@ static int bcm_enet_remove(struct platfo
@@ -1916,6 +1912,7 @@ static int bcm_enet_remove(struct platfo
enet_writel(priv, 0, ENET_MIISC_REG);
if (priv->has_phy) {

View File

@ -32,7 +32,7 @@ Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports
#define ENETSW_MDIOC_EXT_MASK (1 << 16)
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2184,6 +2184,18 @@ static int bcm_enetsw_open(struct net_de
@@ -2185,6 +2185,18 @@ static int bcm_enetsw_open(struct net_de
priv->sw_port_link[i] = 0;
}

View File

@ -20,7 +20,7 @@
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
@@ -1931,7 +1932,8 @@ static int bcm_enet_remove(struct platfo
@@ -1932,7 +1933,8 @@ static int bcm_enet_remove(struct platfo
return 0;
}
@ -30,7 +30,7 @@
.probe = bcm_enet_probe,
.remove = bcm_enet_remove,
.driver = {
@@ -1940,6 +1942,42 @@ struct platform_driver bcm63xx_enet_driv
@@ -1941,6 +1943,42 @@ struct platform_driver bcm63xx_enet_driv
},
};
@ -73,7 +73,7 @@
/*
* switch mii access callbacks
*/
@@ -2196,29 +2234,6 @@ static int bcm_enetsw_open(struct net_de
@@ -2197,29 +2235,6 @@ static int bcm_enetsw_open(struct net_de
enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
}
@ -103,7 +103,7 @@
/* initialize flow control buffer allocation */
enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0,
ENETDMA_BUFALLOC_REG(priv->rx_chan));
@@ -2674,6 +2689,9 @@ static int bcm_enetsw_probe(struct platf
@@ -2675,6 +2690,9 @@ static int bcm_enetsw_probe(struct platf
struct bcm63xx_enetsw_platform_data *pd;
struct resource *res_mem;
int ret, irq_rx, irq_tx;
@ -113,7 +113,7 @@
if (!bcm_enet_shared_base[0])
return -EPROBE_DEFER;
@@ -2754,6 +2772,43 @@ static int bcm_enetsw_probe(struct platf
@@ -2755,6 +2773,43 @@ static int bcm_enetsw_probe(struct platf
priv->pdev = pdev;
priv->net_dev = dev;
@ -157,7 +157,7 @@
return 0;
out_disable_clk:
@@ -2775,6 +2830,9 @@ static int bcm_enetsw_remove(struct plat
@@ -2776,6 +2831,9 @@ static int bcm_enetsw_remove(struct plat
priv = netdev_priv(dev);
unregister_netdev(dev);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2733,9 +2733,9 @@ static int bcm_enetsw_probe(struct platf
@@ -2734,9 +2734,9 @@ static int bcm_enetsw_probe(struct platf
if (ret)
goto out;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2231,6 +2231,10 @@ static int bcm_enetsw_open(struct net_de
@@ -2232,6 +2232,10 @@ static int bcm_enetsw_open(struct net_de
rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i));
rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;

View File

@ -114,16 +114,17 @@ static struct laguna_board_info laguna_info __initdata;
static struct mtd_partition laguna_nor_partitions[] = {
{
.name = "uboot",
.size = SZ_256K,
.offset = 0,
.size = SZ_256K,
.mask_flags = MTD_WRITEABLE,
}, {
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
.offset = SZ_256K,
}, {
.name = "firmware",
.offset = SZ_256K + SZ_128K,
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};
@ -155,16 +156,17 @@ static struct platform_device laguna_nor_pdev = {
static struct mtd_partition laguna_spi_partitions[] = {
{
.name = "uboot",
.size = SZ_256K,
.offset = 0,
.size = SZ_256K,
.mask_flags = MTD_WRITEABLE,
}, {
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = SZ_256K,
.offset = SZ_256K,
}, {
.name = "firmware",
.offset = SZ_512K,
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};

View File

@ -1,6 +1,6 @@
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -37,12 +37,23 @@ static struct scsi_host_template ahci_pl
@@ -44,11 +44,18 @@ static struct scsi_host_template ahci_pl
AHCI_SHT(DRV_NAME),
};
@ -15,12 +15,26 @@
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
+ const struct ata_port_info *info = &ahci_port_info;
- const struct ata_port_info *port;
+ const struct ata_port_info *port = &ahci_port_info;
int rc;
+ if (IS_ENABLED(CONFIG_ARCH_CNS3XXX))
+ info = &cns3xxx_port_info;
+
hpriv = ahci_platform_get_resources(pdev,
AHCI_PLATFORM_GET_RESETS);
if (IS_ERR(hpriv))
@@ -66,9 +73,14 @@ static int ahci_probe(struct platform_de
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
- port = acpi_device_get_match_data(dev);
- if (!port)
- port = &ahci_port_info;
+ if (IS_ENABLED(CONFIG_ARCH_CNS3XXX)) {
+ port = &cns3xxx_port_info;
+ }
+ else {
+ port = acpi_device_get_match_data(dev);
+ if (!port)
+ port = &ahci_port_info;
+ }
rc = ahci_platform_init_host(pdev, hpriv, port,
&ahci_platform_sht);

View File

@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
# netlink interface for nf_conntrack
--- /dev/null
+++ b/net/netfilter/nf_conntrack_rtcache.c
@@ -0,0 +1,428 @@
@@ -0,0 +1,440 @@
+/* route cache for netfilter.
+ *
+ * (C) 2014 Red Hat GmbH
@ -444,6 +444,11 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ .destroy = nf_conn_rtcache_destroy,
+};
+
+static int __net_init rtcache_net_init(struct net *net)
+{
+ return nf_register_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
+}
+
+static void __net_exit rtcache_net_exit(struct net *net)
+{
+ /* remove hooks so no new connections get rtcache extension */
@ -451,6 +456,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+}
+
+static struct pernet_operations rtcache_ops_net_ops = {
+ .init = rtcache_net_init,
+ .exit = rtcache_net_exit,
+};
+
@ -531,6 +537,11 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ synchronize_net();
+
+ unregister_netdevice_notifier(&nf_rtcache_notifier);
+ unregister_pernet_subsys(&rtcache_ops_net_ops);
+ for_each_net(net)
+ nf_unregister_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
+
+ synchronize_net();
+
+ rtnl_lock();
+
@ -547,6 +558,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ }
+
+ rtnl_unlock();
+
+ synchronize_net();
+ nf_ct_extend_unregister(&rtcache_extend);
+}

View File

@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
# netlink interface for nf_conntrack
--- /dev/null
+++ b/net/netfilter/nf_conntrack_rtcache.c
@@ -0,0 +1,428 @@
@@ -0,0 +1,440 @@
+/* route cache for netfilter.
+ *
+ * (C) 2014 Red Hat GmbH
@ -444,6 +444,11 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ .destroy = nf_conn_rtcache_destroy,
+};
+
+static int __net_init rtcache_net_init(struct net *net)
+{
+ return nf_register_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
+}
+
+static void __net_exit rtcache_net_exit(struct net *net)
+{
+ /* remove hooks so no new connections get rtcache extension */
@ -451,6 +456,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+}
+
+static struct pernet_operations rtcache_ops_net_ops = {
+ .init = rtcache_net_init,
+ .exit = rtcache_net_exit,
+};
+
@ -531,6 +537,11 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ synchronize_net();
+
+ unregister_netdevice_notifier(&nf_rtcache_notifier);
+ unregister_pernet_subsys(&rtcache_ops_net_ops);
+ for_each_net(net)
+ nf_unregister_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
+
+ synchronize_net();
+
+ rtnl_lock();
+
@ -547,6 +558,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
+ }
+
+ rtnl_unlock();
+
+ synchronize_net();
+ nf_ct_extend_unregister(&rtcache_extend);
+}

View File

@ -1127,6 +1127,7 @@ CONFIG_DEVPORT=y
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_ENGINE is not set
# CONFIG_DMA_FENCE_TRACE is not set
# CONFIG_DMA_JZ4780 is not set
# CONFIG_DMA_NOOP_OPS is not set
# CONFIG_DMA_SHARED_BUFFER is not set
# CONFIG_DMA_VIRT_OPS is not set

View File

@ -1187,6 +1187,7 @@ CONFIG_DEVPORT=y
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_ENGINE is not set
# CONFIG_DMA_FENCE_TRACE is not set
# CONFIG_DMA_JZ4780 is not set
# CONFIG_DMA_NOOP_OPS is not set
# CONFIG_DMA_SHARED_BUFFER is not set
# CONFIG_DMA_VIRT_OPS is not set

View File

@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+MODULE_ALIAS("nf-flow-table-hw");
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5471,6 +5471,13 @@ static int nf_tables_flowtable_parse_hoo
@@ -5473,6 +5473,13 @@ static int nf_tables_flowtable_parse_hoo
if (err < 0)
return err;
@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
if (!ops)
return -ENOMEM;
@@ -5602,10 +5609,19 @@ static int nf_tables_newflowtable(struct
@@ -5604,10 +5611,19 @@ static int nf_tables_newflowtable(struct
}
flowtable->data.type = type;
@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
flowtable);
if (err < 0)
@@ -5731,7 +5747,8 @@ static int nf_tables_fill_flowtable_info
@@ -5733,7 +5749,8 @@ static int nf_tables_fill_flowtable_info
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),

View File

@ -1,33 +0,0 @@
From d60e006ec0e425877aacc61c7ece3da0434a8fce Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@gmail.com>
Date: Mon, 23 Jul 2018 16:34:54 +0200
Subject: [PATCH 7/8] qcom: ipq4019: fix cpu0's qcom,saw2 reg value
while compiling an ipq4019 target, dtc will complain:
regulator@b089000 unit address format error, expected "2089000"
The saw0 regulator reg value seems to be
copied and pasted from qcom-ipq8064.dtsi.
This patch fixes the reg value to match that of the
unit address which in turn silences the warning.
(There is no driver for qcom,saw2 right now.
So this went unnoticed)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
---
arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -266,7 +266,7 @@
saw0: regulator@b089000 {
compatible = "qcom,saw2";
- reg = <0x02089000 0x1000>, <0x0b009000 0x1000>;
+ reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>;
regulator;
};

View File

@ -1,34 +0,0 @@
From bd73a3dd257fb838bd456a18eeee0ef0224b7a40 Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@gmail.com>
Date: Wed, 25 Jul 2018 10:37:47 +0200
Subject: [PATCH] ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value
while compiling an ipq4019 target, dtc will complain:
regulator@b089000 unit address format error, expected "2089000"
The saw0 regulator reg value seems to be
copied and pasted from qcom-ipq8064.dtsi.
This patch fixes the reg value to match that of the
unit address which in turn silences the warning.
(There is no driver for qcom,saw2 right now.
So this went unnoticed)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
---
arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -325,7 +325,7 @@
saw0: regulator@b089000 {
compatible = "qcom,saw2";
- reg = <0x02089000 0x1000>, <0x0b009000 0x1000>;
+ reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>;
regulator;
};

View File

@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1280,11 +1280,13 @@ struct opp_table *dev_pm_opp_set_regulat
@@ -1292,11 +1292,13 @@ struct opp_table *dev_pm_opp_set_regulat
if (!opp_table)
return ERR_PTR(-ENOMEM);

View File

@ -27,7 +27,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1608,6 +1608,83 @@ put_table:
@@ -1620,6 +1620,83 @@ put_table:
}
/**

View File

@ -12,7 +12,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -126,6 +126,27 @@ unsigned long dev_pm_opp_get_freq(struct
@@ -131,6 +131,27 @@ unsigned long dev_pm_opp_get_freq(struct
}
EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq);

View File

@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1652,6 +1652,7 @@ int dev_pm_opp_adjust_voltage(struct dev
@@ -1664,6 +1664,7 @@ int dev_pm_opp_adjust_voltage(struct dev
struct opp_table *opp_table;
struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
int r = 0;
@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
/* keep the node allocated */
new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL);
@@ -1688,6 +1689,10 @@ int dev_pm_opp_adjust_voltage(struct dev
@@ -1700,6 +1701,10 @@ int dev_pm_opp_adjust_voltage(struct dev
/* plug in new node */
new_opp->supplies[0].u_volt = u_volt;

View File

@ -922,7 +922,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
*
* We must do this before dma_map_single(DMA_TO_DEVICE), because we may
* need to write into the skb.
@@ -2036,12 +2091,129 @@ static inline int dpaa_xmit(struct dpaa_
@@ -2036,6 +2091,121 @@ static inline int dpaa_xmit(struct dpaa_
return 0;
}
@ -935,15 +935,15 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
+ * the buffers
+ */
+
+#define DPAA_A010022_HEADROOM 256
+#define DPAA_A010022_HEADROOM 256
+#define CROSS_4K_BOUND(start, size) \
+ (((start) + (size)) > (((start) + 0x1000) & ~0xFFF))
+ (((start) + (size)) > (((start) + 0x1000) & ~0xFFF))
+
+static bool dpaa_errata_a010022_has_dma_issue(struct sk_buff *skb,
+ struct dpaa_priv *priv)
+{
+ int nr_frags, i = 0;
+ skb_frag_t *frag;
+ skb_frag_t *frag;
+
+ /* Transfers that do not start at 16B aligned addresses will be split;
+ * Transfers that cross a 4K page boundary will also be split
@ -1023,7 +1023,6 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
+ goto err;
+ }
+ copy_skb_header(nskb, skb);
+
+ /* We move the headroom when we align it so we have to reset the
+ * network and transport header offsets relative to the new data
+ * pointer. The checksum offload relies on these offsets.
@ -1042,9 +1041,10 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
+}
+#endif
+
static int dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
static netdev_tx_t
dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
{
const int queue_mapping = skb_get_queue_mapping(skb);
@@ -2043,6 +2213,7 @@ dpaa_start_xmit(struct sk_buff *skb, str
bool nonlinear = skb_is_nonlinear(skb);
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
@ -1052,7 +1052,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
struct dpaa_priv *priv;
struct qm_fd fd;
int offset = 0;
@@ -2069,24 +2241,47 @@ static int dpaa_start_xmit(struct sk_buf
@@ -2070,24 +2241,47 @@ dpaa_start_xmit(struct sk_buff *skb, str
/* MAX_SKB_FRAGS is equal or larger than our dpaa_SGT_MAX_ENTRIES;
* make sure we don't feed FMan with more fragments than it supports.
*/
@ -1108,7 +1108,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
if (likely(dpaa_xmit(priv, percpu_stats, queue_mapping, &fd) == 0))
return NETDEV_TX_OK;
@@ -2218,14 +2413,8 @@ static enum qman_cb_dqrr_result rx_error
@@ -2219,14 +2413,8 @@ static enum qman_cb_dqrr_result rx_error
if (dpaa_eth_napi_schedule(percpu_priv, portal))
return qman_cb_dqrr_stop;
@ -1125,7 +1125,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
return qman_cb_dqrr_consume;
}
@@ -2234,6 +2423,7 @@ static enum qman_cb_dqrr_result rx_defau
@@ -2235,6 +2423,7 @@ static enum qman_cb_dqrr_result rx_defau
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
@ -1133,7 +1133,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
const struct qm_fd *fd = &dq->fd;
@@ -2247,6 +2437,7 @@ static enum qman_cb_dqrr_result rx_defau
@@ -2248,6 +2437,7 @@ static enum qman_cb_dqrr_result rx_defau
struct sk_buff *skb;
int *count_ptr;
void *vaddr;
@ -1141,7 +1141,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
fd_status = be32_to_cpu(fd->status);
fd_format = qm_fd_get_format(fd);
@@ -2289,12 +2480,12 @@ static enum qman_cb_dqrr_result rx_defau
@@ -2290,12 +2480,12 @@ static enum qman_cb_dqrr_result rx_defau
if (!dpaa_bp)
return qman_cb_dqrr_consume;
@ -1157,7 +1157,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* The only FD types that we may receive are contig and S/G */
WARN_ON((fd_format != qm_fd_contig) && (fd_format != qm_fd_sg));
@@ -2305,12 +2496,22 @@ static enum qman_cb_dqrr_result rx_defau
@@ -2306,12 +2496,22 @@ static enum qman_cb_dqrr_result rx_defau
(*count_ptr)--;
if (likely(fd_format == qm_fd_contig))
@ -1182,7 +1182,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
skb->protocol = eth_type_trans(skb, net_dev);
if (net_dev->features & NETIF_F_RXHASH && priv->keygen_in_use &&
@@ -2439,6 +2640,44 @@ static void dpaa_eth_napi_disable(struct
@@ -2440,6 +2640,44 @@ static void dpaa_eth_napi_disable(struct
}
}
@ -1227,7 +1227,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
static int dpaa_open(struct net_device *net_dev)
{
struct mac_device *mac_dev;
@@ -2449,12 +2688,9 @@ static int dpaa_open(struct net_device *
@@ -2450,12 +2688,9 @@ static int dpaa_open(struct net_device *
mac_dev = priv->mac_dev;
dpaa_eth_napi_enable(priv);
@ -1242,7 +1242,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) {
err = fman_port_enable(mac_dev->port[i]);
@@ -2495,11 +2731,58 @@ static int dpaa_eth_stop(struct net_devi
@@ -2496,11 +2731,58 @@ static int dpaa_eth_stop(struct net_devi
return err;
}
@ -1304,7 +1304,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
static const struct net_device_ops dpaa_ops = {
@@ -2653,7 +2936,6 @@ static inline u16 dpaa_get_headroom(stru
@@ -2654,7 +2936,6 @@ static inline u16 dpaa_get_headroom(stru
static int dpaa_eth_probe(struct platform_device *pdev)
{
struct dpaa_bp *dpaa_bps[DPAA_BPS_NUM] = {NULL};
@ -1312,7 +1312,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
struct net_device *net_dev = NULL;
struct dpaa_fq *dpaa_fq, *tmp;
struct dpaa_priv *priv = NULL;
@@ -2662,7 +2944,51 @@ static int dpaa_eth_probe(struct platfor
@@ -2663,7 +2944,51 @@ static int dpaa_eth_probe(struct platfor
int err = 0, i, channel;
struct device *dev;
@ -1365,7 +1365,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* Allocate this early, so we can store relevant information in
* the private area
@@ -2670,7 +2996,7 @@ static int dpaa_eth_probe(struct platfor
@@ -2671,7 +2996,7 @@ static int dpaa_eth_probe(struct platfor
net_dev = alloc_etherdev_mq(sizeof(*priv), DPAA_ETH_TXQ_NUM);
if (!net_dev) {
dev_err(dev, "alloc_etherdev_mq() failed\n");
@ -1374,7 +1374,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
/* Do this here, so we can be verbose early */
@@ -2682,13 +3008,6 @@ static int dpaa_eth_probe(struct platfor
@@ -2683,13 +3008,6 @@ static int dpaa_eth_probe(struct platfor
priv->msg_enable = netif_msg_init(debug, DPAA_MSG_DEFAULT);
@ -1388,7 +1388,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* If fsl_fm_max_frm is set to a higher value than the all-common 1500,
* we choose conservatively and let the user explicitly set a higher
* MTU via ifconfig. Otherwise, the user may end up with different MTUs
@@ -2704,21 +3023,13 @@ static int dpaa_eth_probe(struct platfor
@@ -2705,21 +3023,13 @@ static int dpaa_eth_probe(struct platfor
priv->buf_layout[RX].priv_data_size = DPAA_RX_PRIV_DATA_SIZE; /* Rx */
priv->buf_layout[TX].priv_data_size = DPAA_TX_PRIV_DATA_SIZE; /* Tx */
@ -1414,7 +1414,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* the raw size of the buffers used for reception */
dpaa_bps[i]->raw_size = bpool_buffer_raw_size(i, DPAA_BPS_NUM);
/* avoid runtime computations by keeping the usable size here */
@@ -2726,11 +3037,8 @@ static int dpaa_eth_probe(struct platfor
@@ -2727,11 +3037,8 @@ static int dpaa_eth_probe(struct platfor
dpaa_bps[i]->dev = dev;
err = dpaa_bp_alloc_pool(dpaa_bps[i]);
@ -1428,7 +1428,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
priv->dpaa_bps[i] = dpaa_bps[i];
}
@@ -2741,7 +3049,7 @@ static int dpaa_eth_probe(struct platfor
@@ -2742,7 +3049,7 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_alloc_all_fqs(dev, &priv->dpaa_fq_list, &port_fqs);
if (err < 0) {
dev_err(dev, "dpaa_alloc_all_fqs() failed\n");
@ -1437,7 +1437,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
priv->mac_dev = mac_dev;
@@ -2750,12 +3058,12 @@ static int dpaa_eth_probe(struct platfor
@@ -2751,12 +3058,12 @@ static int dpaa_eth_probe(struct platfor
if (channel < 0) {
dev_err(dev, "dpaa_get_channel() failed\n");
err = channel;
@ -1452,7 +1452,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
* and add this pool channel to each's dequeue mask.
*/
dpaa_eth_add_channel(priv->channel);
@@ -2770,20 +3078,20 @@ static int dpaa_eth_probe(struct platfor
@@ -2771,20 +3078,20 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_eth_cgr_init(priv);
if (err < 0) {
dev_err(dev, "Error initializing CGR\n");
@ -1476,7 +1476,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
priv->tx_headroom = dpaa_get_headroom(&priv->buf_layout[TX]);
@@ -2793,7 +3101,7 @@ static int dpaa_eth_probe(struct platfor
@@ -2794,7 +3101,7 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_eth_init_ports(mac_dev, dpaa_bps, DPAA_BPS_NUM, &port_fqs,
&priv->buf_layout[0], dev);
if (err)
@ -1485,7 +1485,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* Rx traffic distribution based on keygen hashing defaults to on */
priv->keygen_in_use = true;
@@ -2802,11 +3110,7 @@ static int dpaa_eth_probe(struct platfor
@@ -2803,11 +3110,7 @@ static int dpaa_eth_probe(struct platfor
if (!priv->percpu_priv) {
dev_err(dev, "devm_alloc_percpu() failed\n");
err = -ENOMEM;
@ -1498,7 +1498,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
priv->num_tc = 1;
@@ -2815,11 +3119,11 @@ static int dpaa_eth_probe(struct platfor
@@ -2816,11 +3119,11 @@ static int dpaa_eth_probe(struct platfor
/* Initialize NAPI */
err = dpaa_napi_add(net_dev);
if (err < 0)
@ -1512,7 +1512,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
dpaa_eth_sysfs_init(&net_dev->dev);
@@ -2828,32 +3132,21 @@ static int dpaa_eth_probe(struct platfor
@@ -2829,32 +3132,21 @@ static int dpaa_eth_probe(struct platfor
return 0;
@ -1551,7 +1551,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
return err;
}
@@ -2890,6 +3183,23 @@ static int dpaa_remove(struct platform_d
@@ -2891,6 +3183,23 @@ static int dpaa_remove(struct platform_d
return err;
}
@ -1575,7 +1575,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
static const struct platform_device_id dpaa_devtype[] = {
{
.name = "dpaa-ethernet",
@@ -2914,6 +3224,10 @@ static int __init dpaa_load(void)
@@ -2915,6 +3224,10 @@ static int __init dpaa_load(void)
pr_debug("FSL DPAA Ethernet driver\n");

View File

@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_
@@ -289,12 +289,13 @@ static bool need_bw_sch(struct usb_host_
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{

View File

@ -362,7 +362,7 @@
return err;
}
@@ -1125,34 +1126,6 @@ static int mtk_pcie_request_resources(st
@@ -1127,34 +1128,6 @@ static int mtk_pcie_request_resources(st
return 0;
}
@ -397,7 +397,7 @@
static int mtk_pcie_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -1179,7 +1152,14 @@ static int mtk_pcie_probe(struct platfor
@@ -1181,7 +1154,14 @@ static int mtk_pcie_probe(struct platfor
if (err)
goto put_resources;
@ -413,7 +413,7 @@
if (err)
goto put_resources;
@@ -1192,6 +1172,80 @@ put_resources:
@@ -1194,6 +1174,80 @@ put_resources:
return err;
}
@ -494,7 +494,7 @@
static const struct mtk_pcie_soc mtk_pcie_soc_v1 = {
.ops = &mtk_pcie_ops,
.startup = mtk_pcie_startup_port,
@@ -1220,10 +1274,13 @@ static const struct of_device_id mtk_pci
@@ -1222,10 +1276,13 @@ static const struct of_device_id mtk_pci
static struct platform_driver mtk_pcie_driver = {
.probe = mtk_pcie_probe,

View File

@ -511,9 +511,9 @@ static struct device_info boards[] = {
.vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n",
.support_list =
"SupportList:\r\n"
"WBS210(TP-LINK|UN|N300-2|00000000):2.00\r\n"
"WBS210(TP-LINK|US|N300-2|55530000):2.00\r\n"
"WBS210(TP-LINK|EU|N300-2|45550000):2.00\r\n",
"WBS210(TP-LINK|UN|N300-2|00000000):2.0\r\n"
"WBS210(TP-LINK|US|N300-2|55530000):2.0\r\n"
"WBS210(TP-LINK|EU|N300-2|45550000):2.0\r\n",
.support_trail = '\xff',
.soft_ver = NULL,
@ -545,7 +545,41 @@ static struct device_info boards[] = {
"SupportList:\r\n"
"WBS510(TP-LINK|UN|N300-5):1.20\r\n"
"WBS510(TP-LINK|US|N300-5):1.20\r\n"
"WBS510(TP-LINK|EU|N300-5):1.20\r\n",
"WBS510(TP-LINK|EU|N300-5):1.20\r\n"
"WBS510(TP-LINK|CA|N300-5):1.20\r\n",
.support_trail = '\xff',
.soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
{"partition-table", 0x20000, 0x02000},
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
{"os-image", 0x40000, 0x200000},
{"file-system", 0x240000, 0x570000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
{"default-config", 0x7d0000, 0x10000},
{"log", 0x7e0000, 0x10000},
{"radio", 0x7f0000, 0x10000},
{NULL, 0, 0}
},
.first_sysupgrade_partition = "os-image",
.last_sysupgrade_partition = "support-list",
},
{
.id = "WBS510V2",
.vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n",
.support_list =
"SupportList:\r\n"
"WBS510(TP-LINK|UN|N300-5|00000000):2.0\r\n"
"WBS510(TP-LINK|US|N300-5|55530000):2.0\r\n"
"WBS510(TP-LINK|EU|N300-5|45550000):2.0\r\n"
"WBS510(TP-LINK|CA|N300-5|43410000):2.0\r\n",
.support_trail = '\xff',
.soft_ver = NULL,