mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2026-06-12 03:47:26 -04:00
Compare commits
19 Commits
v23.05.6
...
openwrt-23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00b6462cb0 | ||
|
|
be13eed2ed | ||
|
|
b13a7deab2 | ||
|
|
8166bba3fe | ||
|
|
d36411269c | ||
|
|
4e5e2076e1 | ||
|
|
4286bd30f4 | ||
|
|
b6d7048c8b | ||
|
|
a25c76d8c7 | ||
|
|
26433c2168 | ||
|
|
1ff42fc429 | ||
|
|
93a08f1534 | ||
|
|
fd7b88447c | ||
|
|
6cd2232298 | ||
|
|
3971b15868 | ||
|
|
3cf0c26074 | ||
|
|
c42affc98f | ||
|
|
1e30446f0a | ||
|
|
40326394fa |
@@ -1,4 +1,4 @@
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^e59d9ef823bcb581e3939789b4eaeaf900b79759
|
||||
src-git luci https://git.openwrt.org/project/luci.git^7ce34fe1a53db10bb9dd0223467f5bb71a29a659
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^4a06b031dc16628c9b8351ac297ecdbc92695dc2
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^98c8a5aa4624312ed758e2e2b6d4039050a1649d
|
||||
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
|
||||
src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
|
||||
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .189
|
||||
LINUX_KERNEL_HASH-5.15.189 = e3d0025b87278e14733cb326700f17c7cceb54d920622b0d5fcd58a88c6850c3
|
||||
LINUX_VERSION-5.15 = .198
|
||||
LINUX_KERNEL_HASH-5.15.198 = 5d4c0994580dd3bbd5ffc5fcb81c22dd305b844c9d8c7b176cc41b28f7e29743
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.6)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05-SNAPSHOT)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r24232-539228933c)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.6)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -190,7 +190,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/23.05.6"
|
||||
default "https://downloads.openwrt.org/releases/23.05-SNAPSHOT"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
@@ -266,7 +266,7 @@ if VERSIONOPT
|
||||
config VERSION_CODE_FILENAMES
|
||||
bool
|
||||
prompt "Revision code in filenames"
|
||||
default n
|
||||
default y
|
||||
help
|
||||
Enable this to include the revision identifier or the configured
|
||||
version code into the firmware image, SDK- and Image Builder archive
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.016.00
|
||||
PKG_VERSION:=9.016.01
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=cd1955dd07d2f5a6faaa210ffc4e8af992421295a32ab6ddcfa759bed9eba922
|
||||
PKG_HASH:=5434b26500538a62541c55cd09eea099177f59bd9cc48d16969089a9bcdbbd41
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -5045,6 +5046,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
@@ -5051,6 +5052,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static void
|
||||
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
|
||||
{
|
||||
@@ -5057,11 +5090,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
@@ -5063,11 +5096,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
if (link_state == R8125_LINK_STATE_ON) {
|
||||
rtl8125_link_on_patch(dev);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8126
|
||||
PKG_VERSION:=10.015.00
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=10.016.00
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=fac513aa925264a95b053e7532fcda56022d29db288f6625fafee2759a8a6124
|
||||
PKG_HASH:=50c8d3d49592d2e8f372bd7ece8e7df9b50a71b055c077d42eacc42302914440
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
--- a/src/r8126.h
|
||||
+++ b/src/r8126.h
|
||||
@@ -1756,6 +1756,10 @@ enum RTL8126_register_content {
|
||||
@@ -1752,6 +1752,10 @@ enum RTL8126_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
@@ -39,8 +39,8 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -4661,6 +4662,40 @@ rtl8126_link_down_patch(struct net_devic
|
||||
#endif
|
||||
@@ -4410,6 +4411,40 @@ rtl8126_link_down_patch(struct net_devic
|
||||
//rtl8126_set_speed(dev, tp->autoneg, tp->speed, tp->duplex, tp->advertising);
|
||||
}
|
||||
|
||||
+static unsigned int rtl8126_phy_duplex(u32 status)
|
||||
@@ -80,7 +80,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static void
|
||||
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
|
||||
{
|
||||
@@ -4673,11 +4708,18 @@ _rtl8126_check_link_status(struct net_de
|
||||
@@ -4422,11 +4457,18 @@ _rtl8126_check_link_status(struct net_de
|
||||
if (link_state == R8126_LINK_STATE_ON) {
|
||||
rtl8126_link_on_patch(dev);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8127
|
||||
PKG_VERSION:=11.014.00
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=11.015.00
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8127/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=f496bc16c32d2e8f9482c57d006604c70d9e8d55b4f1f999b88c602de9104094
|
||||
PKG_HASH:=ab21bf69368fb9de7f591b2e81cf1a815988bbf086ecbf41af7de9787b10594b
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
--- a/src/r8127.h
|
||||
+++ b/src/r8127.h
|
||||
@@ -1753,6 +1753,11 @@ enum RTL8127_register_content {
|
||||
@@ -1770,6 +1770,11 @@ enum RTL8127_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -4746,6 +4747,42 @@ rtl8127_link_down_patch(struct net_devic
|
||||
@@ -4734,6 +4735,42 @@ rtl8127_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static void
|
||||
_rtl8127_check_link_status(struct net_device *dev, unsigned int link_state)
|
||||
{
|
||||
@@ -4758,11 +4795,18 @@ _rtl8127_check_link_status(struct net_de
|
||||
@@ -4746,11 +4783,18 @@ _rtl8127_check_link_status(struct net_de
|
||||
if (link_state == R8127_LINK_STATE_ON) {
|
||||
rtl8127_link_on_patch(dev);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8168
|
||||
PKG_VERSION:=8.055.00
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION)
|
||||
@@ -40,6 +40,7 @@ endif
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
$(PKG_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)/src" \
|
||||
modules
|
||||
endef
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_VERSION:=3.0.16
|
||||
PKG_VERSION:=3.0.19
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
@@ -17,18 +17,14 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_BASE:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION))))
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:= \
|
||||
http://www.openssl.org/source/ \
|
||||
http://www.openssl.org/source/old/$(PKG_BASE)/ \
|
||||
https://github.com/openssl/openssl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ \
|
||||
http://ftp.fi.muni.cz/pub/openssl/source/ \
|
||||
http://ftp.fi.muni.cz/pub/openssl/source/old/$(PKG_BASE)/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
https://www.openssl.org/source/ \
|
||||
https://www.openssl.org/source/old/$(PKG_BASE)/ \
|
||||
https://github.com/openssl/openssl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
|
||||
|
||||
PKG_HASH:=57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86
|
||||
PKG_HASH:=fa5a4143b8aae18be53ef2f3caf29a2e0747430b8bc74d32d88335b94ab63072
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||
PKG_CPE_ID:=cpe:/a:openssl:openssl
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
@@ -74,7 +70,7 @@ endif
|
||||
|
||||
define Package/openssl/Default
|
||||
TITLE:=Open source SSL toolkit
|
||||
URL:=http://www.openssl.org/
|
||||
URL:=https://www.openssl.org/
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
endef
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -1677,7 +1677,9 @@ $config{CFLAGS} = [ map { $_ eq '--ossl-
|
||||
@@ -1678,7 +1678,9 @@ $config{CFLAGS} = [ map { $_ eq '--ossl-
|
||||
|
||||
unless ($disabled{afalgeng}) {
|
||||
$config{afalgeng}="";
|
||||
|
||||
@@ -16,9 +16,9 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/ssl/ssl_ciph.c
|
||||
+++ b/ssl/ssl_ciph.c
|
||||
@@ -1506,11 +1506,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
@@ -1490,11 +1490,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
|
||||
&tail);
|
||||
&tail);
|
||||
|
||||
+ /*
|
||||
+ * If OPENSSL_PREFER_CHACHA_OVER_GCM is defined, ChaCha20_Poly1305
|
||||
@@ -33,20 +33,20 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
+
|
||||
+#ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
|
||||
+ ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
|
||||
+ &head, &tail);
|
||||
+ &head, &tail);
|
||||
+ ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
|
||||
+ &head, &tail);
|
||||
+ &head, &tail);
|
||||
+#else
|
||||
/* Within each strength group, we prefer GCM over CHACHA... */
|
||||
ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
|
||||
&head, &tail);
|
||||
&head, &tail);
|
||||
ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
|
||||
&head, &tail);
|
||||
&head, &tail);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* ...and generally, our preferred cipher is AES.
|
||||
@@ -1565,7 +1583,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
@@ -1549,7 +1567,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
* Within each group, ciphers remain sorted by strength and previous
|
||||
* preference, i.e.,
|
||||
* 1) ECDHE > DHE
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
* 3) AES > rest
|
||||
* 4) TLS 1.2 > legacy
|
||||
*
|
||||
@@ -2236,7 +2254,13 @@ const char *OSSL_default_cipher_list(voi
|
||||
@@ -2222,7 +2240,13 @@ const char *OSSL_default_cipher_list(voi
|
||||
*/
|
||||
const char *OSSL_default_ciphersuites(void)
|
||||
{
|
||||
@@ -71,22 +71,20 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
}
|
||||
--- a/include/openssl/ssl.h.in
|
||||
+++ b/include/openssl/ssl.h.in
|
||||
@@ -195,9 +195,15 @@ extern "C" {
|
||||
@@ -197,10 +197,16 @@ extern "C" {
|
||||
* DEPRECATED IN 3.0.0, in favor of OSSL_default_ciphersuites()
|
||||
* Update both macro and function simultaneously
|
||||
*/
|
||||
-# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
- "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
- "TLS_AES_128_GCM_SHA256"
|
||||
+# ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
|
||||
+# define TLS_DEFAULT_CIPHERSUITES "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
+ "TLS_AES_256_GCM_SHA384:" \
|
||||
+ "TLS_AES_128_GCM_SHA256"
|
||||
+# else
|
||||
+# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
+ "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
+ "TLS_AES_128_GCM_SHA256"
|
||||
+# endif
|
||||
# endif
|
||||
+#ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
|
||||
+#define TLS_DEFAULT_CIPHERSUITES "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
+ "TLS_AES_256_GCM_SHA384:" \
|
||||
+ "TLS_AES_128_GCM_SHA256"
|
||||
+#else
|
||||
#define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
"TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
"TLS_AES_128_GCM_SHA256"
|
||||
#endif
|
||||
+#endif
|
||||
/*
|
||||
* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
|
||||
* starts with a reasonable order, and all we have to do for DEFAULT is
|
||||
|
||||
@@ -21,21 +21,21 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/engines/e_devcrypto.c
|
||||
+++ b/engines/e_devcrypto.c
|
||||
@@ -905,7 +905,7 @@ static void prepare_digest_methods(void)
|
||||
@@ -886,7 +886,7 @@ static void prepare_digest_methods(void)
|
||||
for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data);
|
||||
i++) {
|
||||
i++) {
|
||||
|
||||
- selected_digests[i] = 1;
|
||||
+ selected_digests[i] = 0;
|
||||
|
||||
/*
|
||||
* Check that the digest is usable
|
||||
@@ -1119,7 +1119,7 @@ static const ENGINE_CMD_DEFN devcrypto_c
|
||||
@@ -1095,7 +1095,7 @@ static const ENGINE_CMD_DEFN devcrypto_c
|
||||
#ifdef IMPLEMENT_DIGEST
|
||||
{DEVCRYPTO_CMD_DIGESTS,
|
||||
"DIGESTS",
|
||||
- "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
||||
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=NONE]",
|
||||
ENGINE_CMD_FLAG_STRING},
|
||||
{ DEVCRYPTO_CMD_DIGESTS,
|
||||
"DIGESTS",
|
||||
- "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
||||
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=NONE]",
|
||||
ENGINE_CMD_FLAG_STRING },
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,12 +10,11 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/engines/e_devcrypto.c
|
||||
+++ b/engines/e_devcrypto.c
|
||||
@@ -211,9 +211,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
|
||||
@@ -210,8 +210,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
|
||||
int ret;
|
||||
|
||||
/* cleanup a previous session */
|
||||
- if (cipher_ctx->sess.ses != 0 &&
|
||||
- clean_devcrypto_session(&cipher_ctx->sess) == 0)
|
||||
- if (cipher_ctx->sess.ses != 0 && clean_devcrypto_session(&cipher_ctx->sess) == 0)
|
||||
- return 0;
|
||||
+ if (cipher_ctx->sess.ses != 0)
|
||||
+ clean_devcrypto_session(&cipher_ctx->sess);
|
||||
|
||||
@@ -128,8 +128,14 @@ sub update_index($)
|
||||
-d "./feeds/$name.tmp/info" or mkdir "./feeds/$name.tmp/info" or return 1;
|
||||
|
||||
system("$mk -s prepare-mk OPENWRT_BUILD= TMP_DIR=\"$ENV{TOPDIR}/feeds/$name.tmp\"");
|
||||
system("$mk -s -f include/scan.mk IS_TTY=1 SCAN_TARGET=\"packageinfo\" SCAN_DIR=\"feeds/$name\" SCAN_NAME=\"package\" SCAN_DEPTH=5 SCAN_EXTRA=\"\" TMP_DIR=\"$ENV{TOPDIR}/feeds/$name.tmp\"");
|
||||
system("$mk -s -f include/scan.mk IS_TTY=1 SCAN_TARGET=\"targetinfo\" SCAN_DIR=\"feeds/$name\" SCAN_NAME=\"target\" SCAN_DEPTH=5 SCAN_EXTRA=\"\" SCAN_MAKEOPTS=\"TARGET_BUILD=1\" TMP_DIR=\"$ENV{TOPDIR}/feeds/$name.tmp\"");
|
||||
|
||||
my $is_tty = $ENV{IS_TTY};
|
||||
$is_tty = defined $is_tty ? $is_tty : $ENV{MAKE_TERMOUT};
|
||||
$is_tty = defined $is_tty ? $is_tty : 1;
|
||||
|
||||
system("$mk -s -f include/scan.mk IS_TTY=$is_tty SCAN_TARGET=\"packageinfo\" SCAN_DIR=\"feeds/$name\" SCAN_NAME=\"package\" SCAN_DEPTH=5 SCAN_EXTRA=\"\" TMP_DIR=\"$ENV{TOPDIR}/feeds/$name.tmp\"");
|
||||
system("$mk -s -f include/scan.mk IS_TTY=$is_tty SCAN_TARGET=\"targetinfo\" SCAN_DIR=\"feeds/$name\" SCAN_NAME=\"target\" SCAN_DEPTH=5 SCAN_EXTRA=\"\" SCAN_MAKEOPTS=\"TARGET_BUILD=1\" TMP_DIR=\"$ENV{TOPDIR}/feeds/$name.tmp\"");
|
||||
|
||||
system("ln -sf $name.tmp/.packageinfo ./feeds/$name.index");
|
||||
system("ln -sf $name.tmp/.targetinfo ./feeds/$name.targetindex");
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
};
|
||||
|
||||
static struct clk_hw * __init
|
||||
@@ -539,20 +682,21 @@ static int clk_sama7g5_master_set_parent
|
||||
@@ -542,20 +685,21 @@ static int clk_sama7g5_master_set_parent
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
(master->div << MASTER_DIV_SHIFT) |
|
||||
PMC_MCR_CMD | PMC_MCR_ID(master->id));
|
||||
|
||||
@@ -563,6 +707,13 @@ static int clk_sama7g5_master_enable(str
|
||||
@@ -566,6 +710,13 @@ static int clk_sama7g5_master_enable(str
|
||||
cpu_relax();
|
||||
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
@@ -548,7 +548,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -620,6 +771,23 @@ static int clk_sama7g5_master_set_rate(s
|
||||
@@ -623,6 +774,23 @@ static int clk_sama7g5_master_set_rate(s
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
static const struct clk_ops sama7g5_master_ops = {
|
||||
.enable = clk_sama7g5_master_enable,
|
||||
.disable = clk_sama7g5_master_disable,
|
||||
@@ -629,6 +797,8 @@ static const struct clk_ops sama7g5_mast
|
||||
@@ -632,6 +800,8 @@ static const struct clk_ops sama7g5_mast
|
||||
.set_rate = clk_sama7g5_master_set_rate,
|
||||
.get_parent = clk_sama7g5_master_get_parent,
|
||||
.set_parent = clk_sama7g5_master_set_parent,
|
||||
@@ -630,7 +630,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
static void clk_sam9x5_peripheral_disable(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
|
||||
@@ -393,6 +401,23 @@ static int clk_sam9x5_peripheral_set_rat
|
||||
@@ -396,6 +404,23 @@ static int clk_sam9x5_peripheral_set_rat
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
static const struct clk_ops sam9x5_peripheral_ops = {
|
||||
.enable = clk_sam9x5_peripheral_enable,
|
||||
.disable = clk_sam9x5_peripheral_disable,
|
||||
@@ -400,6 +425,8 @@ static const struct clk_ops sam9x5_perip
|
||||
@@ -403,6 +428,8 @@ static const struct clk_ops sam9x5_perip
|
||||
.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
|
||||
.round_rate = clk_sam9x5_peripheral_round_rate,
|
||||
.set_rate = clk_sam9x5_peripheral_set_rate,
|
||||
@@ -663,7 +663,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
};
|
||||
|
||||
static const struct clk_ops sam9x5_peripheral_chg_ops = {
|
||||
@@ -409,6 +436,8 @@ static const struct clk_ops sam9x5_perip
|
||||
@@ -412,6 +439,8 @@ static const struct clk_ops sam9x5_perip
|
||||
.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
|
||||
.determine_rate = clk_sam9x5_peripheral_determine_rate,
|
||||
.set_rate = clk_sam9x5_peripheral_set_rate,
|
||||
@@ -672,7 +672,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
};
|
||||
|
||||
struct clk_hw * __init
|
||||
@@ -460,7 +489,6 @@ at91_clk_register_sam9x5_peripheral(stru
|
||||
@@ -463,7 +492,6 @@ at91_clk_register_sam9x5_peripheral(stru
|
||||
hw = ERR_PTR(ret);
|
||||
} else {
|
||||
clk_sam9x5_peripheral_autodiv(periph);
|
||||
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
#define MASTER_MAX_ID 4
|
||||
|
||||
@@ -687,20 +679,22 @@ static void clk_sama7g5_master_set(struc
|
||||
@@ -690,20 +682,22 @@ static void clk_sama7g5_master_set(struc
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int val, cparent;
|
||||
@@ -74,7 +74,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
/* Wait here only if parent is being changed. */
|
||||
while ((cparent != master->parent) && !clk_master_ready(master))
|
||||
@@ -725,10 +719,12 @@ static void clk_sama7g5_master_disable(s
|
||||
@@ -728,10 +722,12 @@ static void clk_sama7g5_master_disable(s
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
@@ -91,7 +91,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
}
|
||||
@@ -741,12 +737,12 @@ static int clk_sama7g5_master_is_enabled
|
||||
@@ -744,12 +740,12 @@ static int clk_sama7g5_master_is_enabled
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
}
|
||||
|
||||
static int clk_sama7g5_master_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
@@ -842,10 +838,10 @@ at91_clk_sama7g5_register_master(struct
|
||||
@@ -845,10 +841,10 @@ at91_clk_sama7g5_register_master(struct
|
||||
master->mux_table = mux_table;
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -680,6 +680,8 @@ static void clk_sama7g5_master_set(struc
|
||||
@@ -683,6 +683,8 @@ static void clk_sama7g5_master_set(struc
|
||||
unsigned long flags;
|
||||
unsigned int val, cparent;
|
||||
unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
@@ -689,9 +691,7 @@ static void clk_sama7g5_master_set(struc
|
||||
@@ -692,9 +694,7 @@ static void clk_sama7g5_master_set(struc
|
||||
regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
|
||||
enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
|
||||
AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
|
||||
|
||||
@@ -579,7 +579,7 @@ SVN-Revision: 35130
|
||||
goto next_ht;
|
||||
--- a/net/ipv6/ip6_offload.c
|
||||
+++ b/net/ipv6/ip6_offload.c
|
||||
@@ -240,7 +240,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
@@ -242,7 +242,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
continue;
|
||||
|
||||
iph2 = (struct ipv6hdr *)(p->data + off);
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From b99d91f044ff9360ac03ce7d27eb6aead6cd2d42 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Mon, 1 Mar 2021 09:12:44 +0000
|
||||
Subject: [PATCH] Revert "Bluetooth: Always request for user
|
||||
confirmation for Just Works (LE SC)"
|
||||
|
||||
This reverts commit ffee202a78c2980688bc5d2f7d56480e69a5e0c9.
|
||||
|
||||
The commit "Bluetooth: Always request for user confirmation for Just
|
||||
Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
|
||||
GUI. After reverting it, pairing works again. Although this companion
|
||||
commit ("... (LE SC)") has not been demonstrated to be problematic,
|
||||
it follows the same logic and therefore could affect some use cases.
|
||||
|
||||
If another solution to the problem is found then this reversion will
|
||||
be removed.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/4139
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
net/bluetooth/smp.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
--- a/net/bluetooth/smp.c
|
||||
+++ b/net/bluetooth/smp.c
|
||||
@@ -2208,7 +2208,7 @@ mackey_and_ltk:
|
||||
if (err)
|
||||
return SMP_UNSPECIFIED;
|
||||
|
||||
- if (smp->method == REQ_OOB) {
|
||||
+ if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
|
||||
if (test_bit(SMP_FLAG_INITIATOR, &smp->flags)) {
|
||||
sc_dhkey_check(smp);
|
||||
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
|
||||
@@ -2223,9 +2223,6 @@ mackey_and_ltk:
|
||||
confirm_hint = 0;
|
||||
|
||||
confirm:
|
||||
- if (smp->method == JUST_WORKS)
|
||||
- confirm_hint = 1;
|
||||
-
|
||||
err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
|
||||
hcon->dst_type, passkey, confirm_hint);
|
||||
if (err)
|
||||
@@ -1,43 +0,0 @@
|
||||
From 0d96dec62add659cc6189c629b465a903a1ff235 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Mon, 1 Mar 2021 09:14:35 +0000
|
||||
Subject: [PATCH] Revert "Bluetooth: Always request for user
|
||||
confirmation for Just Works"
|
||||
|
||||
This reverts commit 92516cd97fd4d8ad5b1421a0d51771044f453a5f.
|
||||
|
||||
Thi commit "Bluetooth: Always request for user confirmation for Just
|
||||
Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
|
||||
GUI. After reverting it, pairing works again.
|
||||
|
||||
If another solution to the problem is found then this reversion will
|
||||
be removed.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/4139
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
net/bluetooth/smp.c | 11 ++---------
|
||||
1 file changed, 2 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/net/bluetooth/smp.c
|
||||
+++ b/net/bluetooth/smp.c
|
||||
@@ -883,16 +883,9 @@ static int tk_request(struct l2cap_conn
|
||||
hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
|
||||
smp->method = JUST_WORKS;
|
||||
|
||||
- /* If Just Works, Continue with Zero TK and ask user-space for
|
||||
- * confirmation */
|
||||
+ /* If Just Works, Continue with Zero TK */
|
||||
if (smp->method == JUST_WORKS) {
|
||||
- ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst,
|
||||
- hcon->type,
|
||||
- hcon->dst_type,
|
||||
- passkey, 1);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
- set_bit(SMP_FLAG_WAIT_USER, &smp->flags);
|
||||
+ set_bit(SMP_FLAG_TK_VALID, &smp->flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/kernel/cgroup/cgroup.c
|
||||
+++ b/kernel/cgroup/cgroup.c
|
||||
@@ -5889,6 +5889,9 @@ int __init cgroup_init_early(void)
|
||||
@@ -5912,6 +5912,9 @@ int __init cgroup_init_early(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
/**
|
||||
* cgroup_init - cgroup initialization
|
||||
*
|
||||
@@ -5927,6 +5930,12 @@ int __init cgroup_init(void)
|
||||
@@ -5950,6 +5953,12 @@ int __init cgroup_init(void)
|
||||
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
for_each_subsys(ss, ssid) {
|
||||
if (ss->early_init) {
|
||||
struct cgroup_subsys_state *css =
|
||||
@@ -6527,6 +6536,10 @@ static int __init cgroup_disable(char *s
|
||||
@@ -6556,6 +6565,10 @@ static int __init cgroup_disable(char *s
|
||||
strcmp(token, ss->legacy_name))
|
||||
continue;
|
||||
|
||||
@@ -51,7 +51,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
||||
pr_info("Disabling %s control group subsystem\n",
|
||||
ss->name);
|
||||
@@ -6545,6 +6558,31 @@ static int __init cgroup_disable(char *s
|
||||
@@ -6574,6 +6587,31 @@ static int __init cgroup_disable(char *s
|
||||
}
|
||||
__setup("cgroup_disable=", cgroup_disable);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/sound/soc/soc-core.c
|
||||
+++ b/sound/soc/soc-core.c
|
||||
@@ -1017,7 +1017,7 @@ int snd_soc_add_pcm_runtime(struct snd_s
|
||||
@@ -1020,7 +1020,7 @@ int snd_soc_add_pcm_runtime(struct snd_s
|
||||
for_each_link_cpus(dai_link, i, cpu) {
|
||||
asoc_rtd_to_cpu(rtd, i) = snd_soc_find_dai(cpu);
|
||||
if (!asoc_rtd_to_cpu(rtd, i)) {
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
cpu->dai_name);
|
||||
goto _err_defer;
|
||||
}
|
||||
@@ -1028,7 +1028,7 @@ int snd_soc_add_pcm_runtime(struct snd_s
|
||||
@@ -1031,7 +1031,7 @@ int snd_soc_add_pcm_runtime(struct snd_s
|
||||
for_each_link_codecs(dai_link, i, codec) {
|
||||
asoc_rtd_to_codec(rtd, i) = snd_soc_find_dai(codec);
|
||||
if (!asoc_rtd_to_codec(rtd, i)) {
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2692,6 +2692,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2710,6 +2710,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
int ret;
|
||||
u32 buf;
|
||||
u8 sig;
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
if (ret < 0)
|
||||
@@ -2773,6 +2778,10 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2793,6 +2798,10 @@ static int lan78xx_reset(struct lan78xx_
|
||||
|
||||
buf |= HW_CFG_MEF_;
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
ret = lan78xx_write_reg(dev, HW_CFG, buf);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -2872,6 +2881,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2892,6 +2901,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
}
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5689,7 +5689,7 @@ static void port_event(struct usb_hub *h
|
||||
@@ -5721,7 +5721,7 @@ static void port_event(struct usb_hub *h
|
||||
port_dev->over_current_count++;
|
||||
port_over_current_notify(port_dev);
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static int bcm2708_fb_register(struct bcm2708_fb *fb)
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -1099,6 +1099,30 @@ fb_blank(struct fb_info *info, int blank
|
||||
@@ -1098,6 +1098,30 @@ fb_blank(struct fb_info *info, int blank
|
||||
}
|
||||
EXPORT_SYMBOL(fb_blank);
|
||||
|
||||
@@ -275,7 +275,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
@@ -1107,6 +1131,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1106,6 +1130,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
struct fb_fix_screeninfo fix;
|
||||
struct fb_cmap cmap_from;
|
||||
struct fb_cmap_user cmap;
|
||||
@@ -283,7 +283,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
void __user *argp = (void __user *)arg;
|
||||
long ret = 0;
|
||||
|
||||
@@ -1186,6 +1211,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1185,6 +1210,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
unlock_fb_info(info);
|
||||
console_unlock();
|
||||
break;
|
||||
@@ -299,7 +299,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
default:
|
||||
lock_fb_info(info);
|
||||
fb = info->fbops;
|
||||
@@ -1325,6 +1359,7 @@ static long fb_compat_ioctl(struct file
|
||||
@@ -1324,6 +1358,7 @@ static long fb_compat_ioctl(struct file
|
||||
case FBIOPAN_DISPLAY:
|
||||
case FBIOGET_CON2FBMAP:
|
||||
case FBIOPUT_CON2FBMAP:
|
||||
|
||||
@@ -16797,7 +16797,7 @@ Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
|
||||
+#endif /* _TAS5713_H */
|
||||
--- a/sound/soc/soc-core.c
|
||||
+++ b/sound/soc/soc-core.c
|
||||
@@ -1234,7 +1234,7 @@ found:
|
||||
@@ -1237,7 +1237,7 @@ found:
|
||||
* Returns 0 on success, otherwise a negative error code.
|
||||
*/
|
||||
int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
|
||||
@@ -16806,7 +16806,7 @@ Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
|
||||
{
|
||||
struct snd_soc_dai *cpu_dai;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
@@ -1243,7 +1243,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
|
||||
@@ -1246,7 +1246,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
|
||||
int ret;
|
||||
|
||||
for_each_rtd_codec_dais(rtd, i, codec_dai) {
|
||||
@@ -16823,7 +16823,7 @@ Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
|
||||
if (ret != 0 && ret != -ENOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
@@ -1252,8 +1260,21 @@ int snd_soc_runtime_set_dai_fmt(struct s
|
||||
@@ -1255,8 +1263,21 @@ int snd_soc_runtime_set_dai_fmt(struct s
|
||||
* Flip the polarity for the "CPU" end of a CODEC<->CODEC link
|
||||
* the component which has non_legacy_dai_naming is Codec
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2937,6 +2937,22 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2957,6 +2957,22 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -3266,8 +3275,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
@@ -3286,8 +3295,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
if (DEFAULT_RX_CSUM_ENABLE)
|
||||
dev->net->features |= NETIF_F_RXCSUM;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2253,6 +2253,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
@@ -2271,6 +2271,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
mii_adv_to_linkmode_adv_t(fc, mii_adv);
|
||||
linkmode_or(phydev->advertising, fc, phydev->advertising);
|
||||
|
||||
@@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
if (phydev->mdio.dev.of_node) {
|
||||
u32 reg;
|
||||
int len;
|
||||
@@ -2946,22 +2962,6 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2966,22 +2982,6 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -4128,7 +4133,13 @@ static int lan78xx_probe(struct usb_inte
|
||||
@@ -4148,7 +4153,13 @@ static int lan78xx_probe(struct usb_inte
|
||||
netdev->max_mtu = MAX_SINGLE_PACKET_SIZE;
|
||||
netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2258,7 +2258,7 @@ static int lan78xx_phy_init(struct lan78
|
||||
@@ -2276,7 +2276,7 @@ static int lan78xx_phy_init(struct lan78
|
||||
mii_adv_to_linkmode_adv_t(fc, mii_adv);
|
||||
linkmode_or(phydev->advertising, fc, phydev->advertising);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing.
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -3505,7 +3505,7 @@ static int rx_submit(struct lan78xx_net
|
||||
@@ -3525,7 +3525,7 @@ static int rx_submit(struct lan78xx_net
|
||||
size_t size = dev->rx_urb_size;
|
||||
int ret = 0;
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From dc5f634e99c4d31ce4b43f42ce789ebb943c38a5 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
Date: Wed, 31 Oct 2018 14:56:59 +0000
|
||||
Subject: [PATCH] media: tc358743: Increase FIFO level to 374.
|
||||
|
||||
The existing fixed value of 16 worked for UYVY 720P60 over
|
||||
2 lanes at 594MHz, or UYVY 1080P60 over 4 lanes. (RGB888
|
||||
1080P60 needs 6 lanes at 594MHz).
|
||||
It doesn't allow for lower resolutions to work as the FIFO
|
||||
underflows.
|
||||
|
||||
374 is required for 1080P24-30 UYVY over 2 lanes @ 972Mbit/s, but
|
||||
>374 means that the FIFO underflows on 1080P50 UYVY over 2 lanes
|
||||
@ 972Mbit/s.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
---
|
||||
drivers/media/i2c/tc358743.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -1954,7 +1954,7 @@ static int tc358743_probe_of(struct tc35
|
||||
state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS;
|
||||
state->pdata.enable_hdcp = false;
|
||||
/* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */
|
||||
- state->pdata.fifo_level = 16;
|
||||
+ state->pdata.fifo_level = 374;
|
||||
/*
|
||||
* The PLL input clock is obtained by dividing refclk by pll_prd.
|
||||
* It must be between 6 MHz and 40 MHz, lower frequency is better.
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -1613,11 +1613,20 @@ static int tc358743_get_mbus_config(stru
|
||||
@@ -1630,11 +1630,20 @@ static int tc358743_get_mbus_config(stru
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct tc358743_state *state = to_state(sd);
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
|
||||
switch (state->csi_lanes_in_use) {
|
||||
case 1:
|
||||
@@ -2060,6 +2069,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
@@ -2079,6 +2088,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
if (pdata) {
|
||||
state->pdata = *pdata;
|
||||
state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -1983,6 +1983,7 @@ static int tc358743_probe_of(struct tc35
|
||||
@@ -2001,6 +2001,7 @@ static int tc358743_probe_of(struct tc35
|
||||
/*
|
||||
* The CSI bps per lane must be between 62.5 Mbps and 1 Gbps.
|
||||
* The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60.
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
*/
|
||||
bps_pr_lane = 2 * endpoint.link_frequencies[0];
|
||||
if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
|
||||
@@ -1996,23 +1997,41 @@ static int tc358743_probe_of(struct tc35
|
||||
@@ -2014,23 +2015,41 @@ static int tc358743_probe_of(struct tc35
|
||||
state->pdata.refclk_hz * state->pdata.pll_prd;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
From 6e37652fbafcec197fb7de4ec25e5073b261551b Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
Date: Wed, 31 Oct 2018 14:57:34 +0000
|
||||
Subject: [PATCH] media: tc358743: Check I2C succeeded during probe.
|
||||
|
||||
The probe for the TC358743 reads the CHIPID register from
|
||||
the device and compares it to the expected value of 0.
|
||||
If the I2C request fails then that also returns 0, so
|
||||
the driver loads thinking that the device is there.
|
||||
|
||||
Generally I2C communications are reliable so there is
|
||||
limited need to check the return value on every transfer,
|
||||
therefore only amend the one read during probe to check
|
||||
for I2C errors.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
---
|
||||
drivers/media/i2c/tc358743.c | 27 +++++++++++++++++++++++----
|
||||
1 file changed, 23 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -110,7 +110,7 @@ static inline struct tc358743_state *to_
|
||||
|
||||
/* --------------- I2C --------------- */
|
||||
|
||||
-static void i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
|
||||
+static int i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
|
||||
{
|
||||
struct tc358743_state *state = to_state(sd);
|
||||
struct i2c_client *client = state->i2c_client;
|
||||
@@ -136,6 +136,7 @@ static void i2c_rd(struct v4l2_subdev *s
|
||||
v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed\n",
|
||||
__func__, reg, client->addr);
|
||||
}
|
||||
+ return err != ARRAY_SIZE(msgs);
|
||||
}
|
||||
|
||||
static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
|
||||
@@ -192,15 +193,24 @@ static void i2c_wr(struct v4l2_subdev *s
|
||||
}
|
||||
}
|
||||
|
||||
-static noinline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
|
||||
+static noinline u32 i2c_rdreg_err(struct v4l2_subdev *sd, u16 reg, u32 n,
|
||||
+ int *err)
|
||||
{
|
||||
+ int error;
|
||||
__le32 val = 0;
|
||||
|
||||
- i2c_rd(sd, reg, (u8 __force *)&val, n);
|
||||
+ error = i2c_rd(sd, reg, (u8 __force *)&val, n);
|
||||
+ if (err)
|
||||
+ *err = error;
|
||||
|
||||
return le32_to_cpu(val);
|
||||
}
|
||||
|
||||
+static inline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
|
||||
+{
|
||||
+ return i2c_rdreg_err(sd, reg, n, NULL);
|
||||
+}
|
||||
+
|
||||
static noinline void i2c_wrreg(struct v4l2_subdev *sd, u16 reg, u32 val, u32 n)
|
||||
{
|
||||
__le32 raw = cpu_to_le32(val);
|
||||
@@ -229,6 +239,13 @@ static u16 i2c_rd16(struct v4l2_subdev *
|
||||
return i2c_rdreg(sd, reg, 2);
|
||||
}
|
||||
|
||||
+static int i2c_rd16_err(struct v4l2_subdev *sd, u16 reg, u16 *value)
|
||||
+{
|
||||
+ int err;
|
||||
+ *value = i2c_rdreg_err(sd, reg, 2, &err);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
|
||||
{
|
||||
i2c_wrreg(sd, reg, val, 2);
|
||||
@@ -2070,6 +2087,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
struct tc358743_platform_data *pdata = client->dev.platform_data;
|
||||
struct v4l2_subdev *sd;
|
||||
u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK;
|
||||
+ u16 chipid;
|
||||
int err;
|
||||
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
@@ -2102,7 +2120,8 @@ static int tc358743_probe(struct i2c_cli
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
|
||||
|
||||
/* i2c access */
|
||||
- if ((i2c_rd16(sd, CHIPID) & MASK_CHIPID) != 0) {
|
||||
+ if (i2c_rd16_err(sd, CHIPID, &chipid) ||
|
||||
+ (chipid & MASK_CHIPID) != 0) {
|
||||
v4l2_info(sd, "not a TC358743 on address 0x%x\n",
|
||||
client->addr << 1);
|
||||
return -ENODEV;
|
||||
@@ -1,98 +0,0 @@
|
||||
From 15d83e43c7eae44c48cdd3b2cd239c9ff2f74b2f Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
Date: Thu, 22 Nov 2018 17:31:06 +0000
|
||||
Subject: [PATCH] media: tc358743: Return an appropriate colorspace
|
||||
from tc358743_set_fmt
|
||||
|
||||
When calling tc358743_set_fmt, the code was calling tc358743_get_fmt
|
||||
to choose a valid format. However that sets the colorspace
|
||||
based on what was read back from the chip. When you set the format,
|
||||
then the driver would choose and program the colorspace based
|
||||
on the format code.
|
||||
|
||||
The result was that if you called try or set format for UYVY
|
||||
when the current format was RGB3 then you would get told sRGB,
|
||||
and try RGB3 when current was UYVY and you would get told
|
||||
SMPTE170M.
|
||||
|
||||
The value programmed into the chip is determined by this driver,
|
||||
therefore there is no need to read back the value. Return the
|
||||
colorspace based on the format set/tried instead.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
---
|
||||
drivers/media/i2c/tc358743.c | 40 +++++++++++++-----------------------
|
||||
1 file changed, 14 insertions(+), 26 deletions(-)
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -1695,12 +1695,23 @@ static int tc358743_enum_mbus_code(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static u32 tc358743_g_colorspace(u32 code)
|
||||
+{
|
||||
+ switch (code) {
|
||||
+ case MEDIA_BUS_FMT_RGB888_1X24:
|
||||
+ return V4L2_COLORSPACE_SRGB;
|
||||
+ case MEDIA_BUS_FMT_UYVY8_1X16:
|
||||
+ return V4L2_COLORSPACE_SMPTE170M;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int tc358743_get_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *format)
|
||||
{
|
||||
struct tc358743_state *state = to_state(sd);
|
||||
- u8 vi_rep = i2c_rd8(sd, VI_REP);
|
||||
|
||||
if (format->pad != 0)
|
||||
return -EINVAL;
|
||||
@@ -1710,23 +1721,7 @@ static int tc358743_get_fmt(struct v4l2_
|
||||
format->format.height = state->timings.bt.height;
|
||||
format->format.field = V4L2_FIELD_NONE;
|
||||
|
||||
- switch (vi_rep & MASK_VOUT_COLOR_SEL) {
|
||||
- case MASK_VOUT_COLOR_RGB_FULL:
|
||||
- case MASK_VOUT_COLOR_RGB_LIMITED:
|
||||
- format->format.colorspace = V4L2_COLORSPACE_SRGB;
|
||||
- break;
|
||||
- case MASK_VOUT_COLOR_601_YCBCR_LIMITED:
|
||||
- case MASK_VOUT_COLOR_601_YCBCR_FULL:
|
||||
- format->format.colorspace = V4L2_COLORSPACE_SMPTE170M;
|
||||
- break;
|
||||
- case MASK_VOUT_COLOR_709_YCBCR_FULL:
|
||||
- case MASK_VOUT_COLOR_709_YCBCR_LIMITED:
|
||||
- format->format.colorspace = V4L2_COLORSPACE_REC709;
|
||||
- break;
|
||||
- default:
|
||||
- format->format.colorspace = 0;
|
||||
- break;
|
||||
- }
|
||||
+ format->format.colorspace = tc358743_g_colorspace(format->format.code);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1741,18 +1736,11 @@ static int tc358743_set_fmt(struct v4l2_
|
||||
int ret = tc358743_get_fmt(sd, sd_state, format);
|
||||
|
||||
format->format.code = code;
|
||||
+ format->format.colorspace = tc358743_g_colorspace(code);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- switch (code) {
|
||||
- case MEDIA_BUS_FMT_RGB888_1X24:
|
||||
- case MEDIA_BUS_FMT_UYVY8_1X16:
|
||||
- break;
|
||||
- default:
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_TRY)
|
||||
return 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -1643,6 +1643,109 @@ command_cleanup:
|
||||
@@ -1645,6 +1645,109 @@ command_cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5510,6 +5613,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5520,6 +5623,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1346,6 +1349,9 @@
|
||||
@@ -1350,6 +1353,9 @@
|
||||
#define USB_VENDOR_ID_XAT 0x2505
|
||||
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
@@ -202,6 +203,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -203,6 +204,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET },
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -2282,6 +2282,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
@@ -2278,6 +2278,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
{
|
||||
struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
|
||||
struct xhci_interrupter *ir;
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
u64 erst_base;
|
||||
u32 erst_size;
|
||||
int ret;
|
||||
@@ -2302,7 +2303,11 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
@@ -2298,7 +2299,11 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
return NULL;
|
||||
|
||||
ir->ir_set = &xhci->run_regs->ir_set[intr_num];
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
0, flags);
|
||||
if (!ir->event_ring) {
|
||||
xhci_warn(xhci, "Failed to allocate interrupter %d event ring\n", intr_num);
|
||||
@@ -2318,7 +2323,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
@@ -2314,7 +2319,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
|
||||
/* set ERST count with the number of entries in the segment table */
|
||||
erst_size = readl(&ir->ir_set->erst_size);
|
||||
erst_size &= ERST_SIZE_MASK;
|
||||
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/spi/spi.c
|
||||
+++ b/drivers/spi/spi.c
|
||||
@@ -3503,6 +3503,7 @@ static int __spi_validate_bits_per_word(
|
||||
@@ -3513,6 +3513,7 @@ static int __spi_validate_bits_per_word(
|
||||
*/
|
||||
int spi_setup(struct spi_device *spi)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
unsigned bad_bits, ugly_bits;
|
||||
int status;
|
||||
|
||||
@@ -3524,6 +3525,14 @@ int spi_setup(struct spi_device *spi)
|
||||
@@ -3534,6 +3535,14 @@ int spi_setup(struct spi_device *spi)
|
||||
(SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
|
||||
SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Jacko Dirks <jdirks.linuxdev@gmail.com>
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -2010,6 +2010,7 @@ static int tc358743_probe_of(struct tc35
|
||||
@@ -2023,6 +2023,7 @@ static int tc358743_probe_of(struct tc35
|
||||
switch (bps_pr_lane) {
|
||||
default:
|
||||
dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane);
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/pci/controller/pcie-brcmstb.c
|
||||
+++ b/drivers/pci/controller/pcie-brcmstb.c
|
||||
@@ -116,8 +116,9 @@
|
||||
@@ -115,8 +115,9 @@
|
||||
PCIE_MISC_CPU_2_PCIE_MEM_WIN0_LIMIT_HI + ((win) * 8)
|
||||
|
||||
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG 0x4204
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
|
||||
#define PCIE_INTR2_CPU_BASE 0x4300
|
||||
@@ -283,6 +284,7 @@ struct brcm_pcie {
|
||||
@@ -282,6 +283,7 @@ struct brcm_pcie {
|
||||
struct clk *clk;
|
||||
struct device_node *np;
|
||||
bool ssc;
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
int gen;
|
||||
u64 msi_target_addr;
|
||||
struct brcm_msi *msi;
|
||||
@@ -1033,12 +1035,25 @@ static int brcm_pcie_setup(struct brcm_p
|
||||
@@ -1029,12 +1031,25 @@ static int brcm_pcie_setup(struct brcm_p
|
||||
PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1_ENDIAN_MODE_BAR2_MASK);
|
||||
writel(tmp, base + PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1);
|
||||
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
|
||||
|
||||
return 0;
|
||||
@@ -1267,6 +1282,7 @@ static int brcm_pcie_probe(struct platfo
|
||||
@@ -1263,6 +1278,7 @@ static int brcm_pcie_probe(struct platfo
|
||||
pcie->gen = (ret < 0) ? 0 : ret;
|
||||
|
||||
pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From fcdf09ccef256160d3d87a49a900fabff20286a4 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Fri, 10 Jul 2020 12:40:50 +0100
|
||||
Subject: [PATCH] media: i2c: tc358743: Only allow supported pixel fmts
|
||||
in set_fmt
|
||||
|
||||
Fix commit "media: tc358743: Return an appropriate colorspace from
|
||||
tc358743_set_fmt" to ensure that the format passed in to set_fmt
|
||||
is checked to be valid, and reset to the current format if not.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/media/i2c/tc358743.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -1735,8 +1735,10 @@ static int tc358743_set_fmt(struct v4l2_
|
||||
u32 code = format->format.code; /* is overwritten by get_fmt */
|
||||
int ret = tc358743_get_fmt(sd, sd_state, format);
|
||||
|
||||
- format->format.code = code;
|
||||
- format->format.colorspace = tc358743_g_colorspace(code);
|
||||
+ if (code == MEDIA_BUS_FMT_RGB888_1X24 ||
|
||||
+ code == MEDIA_BUS_FMT_UYVY8_1X16)
|
||||
+ format->format.code = code;
|
||||
+ format->format.colorspace = tc358743_g_colorspace(format->format.code);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17542,6 +17542,14 @@ T: git git://linuxtv.org/media_tree.git
|
||||
@@ -17543,6 +17543,14 @@ T: git git://linuxtv.org/media_tree.git
|
||||
F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
|
||||
F: drivers/media/i2c/imx412.c
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
@@ -1186,6 +1188,7 @@ static struct fbtft_platform_data *fbtft
|
||||
@@ -1187,6 +1189,7 @@ static struct fbtft_platform_data *fbtft
|
||||
* @display: Display properties
|
||||
* @sdev: SPI device
|
||||
* @pdev: Platform device
|
||||
@@ -103,7 +103,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
*
|
||||
* Allocates, initializes and registers a framebuffer
|
||||
*
|
||||
@@ -1195,12 +1198,15 @@ static struct fbtft_platform_data *fbtft
|
||||
@@ -1196,12 +1199,15 @@ static struct fbtft_platform_data *fbtft
|
||||
*/
|
||||
int fbtft_probe_common(struct fbtft_display *display,
|
||||
struct spi_device *sdev,
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
int ret;
|
||||
|
||||
if (sdev)
|
||||
@@ -1216,6 +1222,14 @@ int fbtft_probe_common(struct fbtft_disp
|
||||
@@ -1217,6 +1223,14 @@ int fbtft_probe_common(struct fbtft_disp
|
||||
pdata = fbtft_properties_read(dev);
|
||||
if (IS_ERR(pdata))
|
||||
return PTR_ERR(pdata);
|
||||
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/pci/controller/pcie-brcmstb.c
|
||||
+++ b/drivers/pci/controller/pcie-brcmstb.c
|
||||
@@ -879,6 +879,8 @@ static int brcm_pcie_setup(struct brcm_p
|
||||
@@ -878,6 +878,8 @@ static int brcm_pcie_setup(struct brcm_p
|
||||
|
||||
/* Reset the bridge */
|
||||
pcie->bridge_sw_init_set(pcie, 1);
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/pci/controller/pcie-brcmstb.c
|
||||
+++ b/drivers/pci/controller/pcie-brcmstb.c
|
||||
@@ -471,7 +471,8 @@ static struct irq_chip brcm_msi_irq_chip
|
||||
@@ -470,7 +470,8 @@ static struct irq_chip brcm_msi_irq_chip
|
||||
|
||||
static struct msi_domain_info brcm_msi_domain_info = {
|
||||
/* Multi MSI is supported by the controller, but not by this driver */
|
||||
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
|
||||
+...
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17556,6 +17556,7 @@ M: Raspberry Pi Kernel Maintenance <kern
|
||||
@@ -17557,6 +17557,7 @@ M: Raspberry Pi Kernel Maintenance <kern
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://linuxtv.org/media_tree.git
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/media/i2c/tc358743.c
|
||||
+++ b/drivers/media/i2c/tc358743.c
|
||||
@@ -2012,7 +2012,7 @@ static int tc358743_probe_of(struct tc35
|
||||
@@ -2023,7 +2023,7 @@ static int tc358743_probe_of(struct tc35
|
||||
switch (bps_pr_lane) {
|
||||
default:
|
||||
dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane);
|
||||
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: John Cox <jc@kynesim.co.uk>
|
||||
case V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS:
|
||||
p_hevc_decode_params = p;
|
||||
|
||||
@@ -1250,6 +1253,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1249,6 +1252,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS:
|
||||
elem_size = sizeof(struct v4l2_ctrl_hevc_slice_params);
|
||||
break;
|
||||
|
||||
@@ -401,7 +401,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
kvfree(ctrl);
|
||||
}
|
||||
kvfree(hdl->buckets);
|
||||
@@ -1105,7 +1187,7 @@ int handler_new_ref(struct v4l2_ctrl_han
|
||||
@@ -1104,7 +1186,7 @@ int handler_new_ref(struct v4l2_ctrl_han
|
||||
if (hdl->error)
|
||||
return hdl->error;
|
||||
|
||||
@@ -410,7 +410,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
size_extra_req = ctrl->elems * ctrl->elem_size;
|
||||
new_ref = kzalloc(sizeof(*new_ref) + size_extra_req, GFP_KERNEL);
|
||||
if (!new_ref)
|
||||
@@ -1273,7 +1355,6 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1272,7 +1354,6 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
elem_size = sizeof(s32);
|
||||
break;
|
||||
}
|
||||
@@ -418,7 +418,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
|
||||
/* Sanity checks */
|
||||
if (id == 0 || name == NULL || !elem_size ||
|
||||
@@ -1294,17 +1375,33 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1293,17 +1374,33 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
handler_set_err(hdl, -EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
sz_extra += 2 * tot_ctrl_size;
|
||||
|
||||
if (type >= V4L2_CTRL_COMPOUND_TYPES && p_def.p_const)
|
||||
@@ -1333,7 +1430,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1332,7 +1429,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
ctrl->is_ptr = is_array || type >= V4L2_CTRL_COMPOUND_TYPES || ctrl->is_string;
|
||||
ctrl->is_int = !ctrl->is_ptr && type != V4L2_CTRL_TYPE_INTEGER64;
|
||||
ctrl->is_array = is_array;
|
||||
@@ -466,7 +466,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
ctrl->nr_of_dims = nr_of_dims;
|
||||
if (nr_of_dims)
|
||||
memcpy(ctrl->dims, dims, nr_of_dims * sizeof(dims[0]));
|
||||
@@ -1346,6 +1445,16 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1345,6 +1444,16 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
ctrl->cur.val = ctrl->val = def;
|
||||
data = &ctrl[1];
|
||||
|
||||
@@ -483,7 +483,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
if (!ctrl->is_int) {
|
||||
ctrl->p_new.p = data;
|
||||
ctrl->p_cur.p = data + tot_ctrl_size;
|
||||
@@ -1355,7 +1464,10 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1354,7 +1463,10 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
}
|
||||
|
||||
if (type >= V4L2_CTRL_COMPOUND_TYPES && p_def.p_const) {
|
||||
@@ -495,7 +495,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
memcpy(ctrl->p_def.p, p_def.p_const, elem_size);
|
||||
}
|
||||
|
||||
@@ -1365,6 +1477,7 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
@@ -1364,6 +1476,7 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s
|
||||
}
|
||||
|
||||
if (handler_new_ref(hdl, ctrl, NULL, false, false)) {
|
||||
@@ -503,7 +503,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
kvfree(ctrl);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1702,6 +1815,9 @@ static int cluster_changed(struct v4l2_c
|
||||
@@ -1701,6 +1814,9 @@ static int cluster_changed(struct v4l2_c
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -677,9 +677,9 @@ deq_found:
|
||||
@@ -675,9 +675,9 @@ deq_found:
|
||||
}
|
||||
|
||||
if ((ep->ep_state & SET_DEQ_PENDING)) {
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -862,8 +862,14 @@ static int usb_audio_probe(struct usb_in
|
||||
@@ -868,8 +868,14 @@ static int usb_audio_probe(struct usb_in
|
||||
if (ignore_ctl_error)
|
||||
chip->quirk_flags |= QUIRK_FLAG_IGNORE_CTL_ERROR;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: Lee Jackson <info@arducam.com>
|
||||
+...
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17560,6 +17560,14 @@ F: Documentation/devicetree/bindings/med
|
||||
@@ -17561,6 +17561,14 @@ F: Documentation/devicetree/bindings/med
|
||||
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
|
||||
F: drivers/media/i2c/imx477.c
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -667,6 +667,15 @@ static int xhci_move_dequeue_past_td(str
|
||||
@@ -665,6 +665,15 @@ static int xhci_move_dequeue_past_td(str
|
||||
} while (!cycle_found || !td_last_trb_found);
|
||||
|
||||
deq_found:
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -310,6 +310,12 @@ static inline int room_on_ring(struct xh
|
||||
@@ -308,6 +308,12 @@ static inline int room_on_ring(struct xh
|
||||
return 0;
|
||||
|
||||
if (ring->type != TYPE_COMMAND && ring->type != TYPE_EVENT) {
|
||||
|
||||
@@ -46,8 +46,8 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,15 +140,17 @@ static void xhci_link_rings(struct xhci_
|
||||
(xhci->quirks & XHCI_AMD_0x96_HOST)));
|
||||
@@ -136,15 +137,17 @@ static void xhci_link_rings(struct xhci_
|
||||
chain_links = xhci_link_chain_quirk(xhci, ring->type);
|
||||
|
||||
next = ring->enq_seg->next;
|
||||
- xhci_link_segments(ring->enq_seg, first, ring->type, chain_links);
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|= cpu_to_le32(LINK_TOGGLE);
|
||||
ring->last_seg = last;
|
||||
}
|
||||
@@ -314,14 +317,15 @@ void xhci_initialize_ring_info(struct xh
|
||||
@@ -311,14 +314,15 @@ void xhci_initialize_ring_info(struct xh
|
||||
* Each segment has a link TRB, and leave an extra TRB for SW
|
||||
* accounting purpose
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
{
|
||||
struct xhci_segment *prev;
|
||||
bool chain_links;
|
||||
@@ -350,12 +354,12 @@ static int xhci_alloc_segments_for_ring(
|
||||
@@ -344,12 +348,12 @@ static int xhci_alloc_segments_for_ring(
|
||||
}
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
*last = prev;
|
||||
|
||||
return 0;
|
||||
@@ -387,16 +391,17 @@ struct xhci_ring *xhci_ring_alloc(struct
|
||||
@@ -381,16 +385,17 @@ struct xhci_ring *xhci_ring_alloc(struct
|
||||
if (num_segs == 0)
|
||||
return ring;
|
||||
|
||||
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
cpu_to_le32(LINK_TOGGLE);
|
||||
}
|
||||
xhci_initialize_ring_info(ring, cycle_state);
|
||||
@@ -429,16 +434,15 @@ int xhci_ring_expansion(struct xhci_hcd
|
||||
@@ -423,16 +428,15 @@ int xhci_ring_expansion(struct xhci_hcd
|
||||
unsigned int num_segs_needed;
|
||||
int ret;
|
||||
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
if (ret)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1826,7 +1830,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc
|
||||
@@ -1822,7 +1826,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc
|
||||
for (val = 0; val < evt_ring->num_segs; val++) {
|
||||
entry = &erst->entries[val];
|
||||
entry->seg_addr = cpu_to_le64(seg->dma);
|
||||
@@ -205,7 +205,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
xhci_err(xhci, "Tried to move enqueue past ring segment\n");
|
||||
return;
|
||||
}
|
||||
@@ -3319,7 +3322,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
|
||||
@@ -3322,7 +3325,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
|
||||
* that clears the EHB.
|
||||
*/
|
||||
while (xhci_handle_event(xhci, ir) > 0) {
|
||||
@@ -214,7 +214,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
continue;
|
||||
xhci_update_erst_dequeue(xhci, ir, event_ring_deq);
|
||||
event_ring_deq = ir->event_ring->dequeue;
|
||||
@@ -3461,7 +3464,8 @@ static int prepare_ring(struct xhci_hcd
|
||||
@@ -3462,7 +3465,8 @@ static int prepare_ring(struct xhci_hcd
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
}
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -899,8 +899,8 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -901,8 +901,8 @@ static void xhci_clear_command_ring(stru
|
||||
seg = ring->deq_seg;
|
||||
do {
|
||||
memset(seg->trbs, 0,
|
||||
@@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
cpu_to_le32(~TRB_CYCLE);
|
||||
seg = seg->next;
|
||||
} while (seg != ring->deq_seg);
|
||||
@@ -911,7 +911,7 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -913,7 +913,7 @@ static void xhci_clear_command_ring(stru
|
||||
ring->enq_seg = ring->deq_seg;
|
||||
ring->enqueue = ring->dequeue;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -392,6 +392,17 @@ struct xhci_ring *xhci_ring_alloc(struct
|
||||
@@ -386,6 +386,17 @@ struct xhci_ring *xhci_ring_alloc(struct
|
||||
return ring;
|
||||
|
||||
ring->trbs_per_seg = TRBS_PER_SEGMENT;
|
||||
|
||||
@@ -17,4 +17,4 @@ Subject: [PATCH] Patching lan78xx for SOF_TIMESTAMPING_TX_SOFTWARE
|
||||
+ .get_ts_info = ethtool_op_get_ts_info,
|
||||
};
|
||||
|
||||
static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
static int lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -3774,14 +3774,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3775,14 +3775,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
unsigned int num_trbs;
|
||||
unsigned int start_cycle, num_sgs = 0;
|
||||
unsigned int enqd_len, block_len, trb_buff_len, full_len;
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
full_len = urb->transfer_buffer_length;
|
||||
/* If we have scatter/gather list, we use it. */
|
||||
if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) {
|
||||
@@ -3818,6 +3819,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3819,6 +3820,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
start_cycle = ring->cycle_state;
|
||||
send_addr = addr;
|
||||
|
||||
@@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
/* Queue the TRBs, even if they are zero-length */
|
||||
for (enqd_len = 0; first_trb || enqd_len < full_len;
|
||||
enqd_len += trb_buff_len) {
|
||||
@@ -3830,6 +3842,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3831,6 +3843,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
if (enqd_len + trb_buff_len > full_len)
|
||||
trb_buff_len = full_len - enqd_len;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -3774,7 +3774,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3775,7 +3775,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
unsigned int num_trbs;
|
||||
unsigned int start_cycle, num_sgs = 0;
|
||||
unsigned int enqd_len, block_len, trb_buff_len, full_len;
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
u32 field, length_field, remainder, maxpacket;
|
||||
u64 addr, send_addr;
|
||||
|
||||
@@ -3820,14 +3820,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3821,14 +3821,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
send_addr = addr;
|
||||
|
||||
if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
}
|
||||
|
||||
/* Queue the TRBs, even if they are zero-length */
|
||||
@@ -3842,7 +3837,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3843,7 +3838,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
if (enqd_len + trb_buff_len > full_len)
|
||||
trb_buff_len = full_len - enqd_len;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ This reverts commit 2388f826cdc9af2651991adc0feb79de9bdf2232.
|
||||
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -1637,14 +1637,7 @@ static void do_remove_conflicting_frameb
|
||||
@@ -1636,14 +1636,7 @@ static void do_remove_conflicting_frameb
|
||||
* If it's not a platform device, at least print a warning. A
|
||||
* fix would add code to remove the device from the system.
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a.
|
||||
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -26,7 +26,6 @@
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/linux_logo.h>
|
||||
#include <linux/proc_fs.h>
|
||||
@@ -20,7 +20,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a.
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/kmod.h>
|
||||
@@ -1614,36 +1613,18 @@ static void do_remove_conflicting_frameb
|
||||
@@ -1613,36 +1612,18 @@ static void do_remove_conflicting_frameb
|
||||
/* check all firmware fbs and kick off if the base addr overlaps */
|
||||
for_each_registered_fb(i) {
|
||||
struct apertures_struct *gen_aper;
|
||||
@@ -58,7 +58,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1981,13 +1962,9 @@ EXPORT_SYMBOL(register_framebuffer);
|
||||
@@ -1969,13 +1950,9 @@ EXPORT_SYMBOL(register_framebuffer);
|
||||
void
|
||||
unregister_framebuffer(struct fb_info *fb_info)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
@@ -2247,6 +2249,69 @@ static void b44_adjust_link(struct net_d
|
||||
@@ -2250,6 +2252,69 @@ static void b44_adjust_link(struct net_d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
static int b44_register_phy_one(struct b44 *bp)
|
||||
{
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
|
||||
@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b
|
||||
@@ -2286,6 +2351,9 @@ static int b44_register_phy_one(struct b
|
||||
if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
|
||||
(sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
|
||||
|
||||
@@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
dev_info(sdev->dev,
|
||||
"could not find PHY at %i, use fixed one\n",
|
||||
bp->phy_addr);
|
||||
@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de
|
||||
@@ -2480,6 +2548,7 @@ static void b44_remove_one(struct ssb_de
|
||||
unregister_netdev(dev);
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
b44_unregister_phy_one(bp);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
return 0;
|
||||
@@ -2177,6 +2202,8 @@ static int b44_get_invariants(struct b44
|
||||
@@ -2180,6 +2205,8 @@ static int b44_get_invariants(struct b44
|
||||
* valid PHY address. */
|
||||
bp->phy_addr &= 0x1F;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ it on BCM4708 family.
|
||||
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
struct xhci_plat_priv *priv = xhci_to_priv(xhci);
|
||||
+ struct platform_device*pdev = to_platform_device(dev);
|
||||
+ struct platform_device *pdev = to_platform_device(dev);
|
||||
+ struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
/*
|
||||
@@ -40,7 +40,7 @@ it on BCM4708 family.
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -159,6 +159,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
@@ -160,6 +160,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ it on BCM4708 family.
|
||||
+ }
|
||||
+
|
||||
+ /* Free virt device */
|
||||
+ xhci_free_virt_device(xhci, slot_id);
|
||||
+ xhci_free_virt_device(xhci, xhci->devs[slot_id], slot_id);
|
||||
+
|
||||
+ /* We're done if controller is already running */
|
||||
+ if (readl(&xhci->op_regs->command) & CMD_RUN)
|
||||
@@ -90,7 +90,7 @@ it on BCM4708 family.
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -636,6 +679,16 @@ static int xhci_run_finished(struct xhci
|
||||
@@ -638,6 +681,16 @@ static int xhci_run_finished(struct xhci
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
|
||||
--- a/drivers/pinctrl/Kconfig
|
||||
+++ b/drivers/pinctrl/Kconfig
|
||||
@@ -429,6 +429,7 @@ config PINCTRL_KEEMBAY
|
||||
@@ -430,6 +430,7 @@ config PINCTRL_KEEMBAY
|
||||
source "drivers/pinctrl/actions/Kconfig"
|
||||
source "drivers/pinctrl/aspeed/Kconfig"
|
||||
source "drivers/pinctrl/bcm/Kconfig"
|
||||
|
||||
@@ -329,7 +329,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
||||
--- a/arch/arm64/include/asm/pgtable.h
|
||||
+++ b/arch/arm64/include/asm/pgtable.h
|
||||
@@ -1006,23 +1006,13 @@ static inline void update_mmu_cache(stru
|
||||
@@ -1007,23 +1007,13 @@ static inline void update_mmu_cache(stru
|
||||
* page after fork() + CoW for pfn mappings. We don't always have a
|
||||
* hardware-managed access flag on arm64.
|
||||
*/
|
||||
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
}
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1093,6 +1093,8 @@ vm_fault_t finish_mkwrite_fault(struct v
|
||||
@@ -1104,6 +1104,8 @@ vm_fault_t finish_mkwrite_fault(struct v
|
||||
#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
|
||||
#define LAST_CPUPID_PGOFF (ZONES_PGOFF - LAST_CPUPID_WIDTH)
|
||||
#define KASAN_TAG_PGOFF (LAST_CPUPID_PGOFF - KASAN_TAG_WIDTH)
|
||||
|
||||
@@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/* forking complete and child started to run, tell ptracer */
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -5014,6 +5014,7 @@ context_switch(struct rq *rq, struct tas
|
||||
@@ -5033,6 +5033,7 @@ context_switch(struct rq *rq, struct tas
|
||||
* finish_task_switch()'s mmdrop().
|
||||
*/
|
||||
switch_mm_irqs_off(prev->active_mm, next->mm, next);
|
||||
|
||||
@@ -354,7 +354,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -7714,6 +7714,7 @@ static void __init free_area_init_node(i
|
||||
@@ -7727,6 +7727,7 @@ static void __init free_area_init_node(i
|
||||
pgdat_set_deferred_range(pgdat);
|
||||
|
||||
free_area_init_core(pgdat);
|
||||
|
||||
@@ -34,7 +34,7 @@ Link: https://lore.kernel.org/linux-mtd/20220418132803.664103-1-felix@matouschek
|
||||
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
|
||||
--- a/drivers/mtd/nand/spi/core.c
|
||||
+++ b/drivers/mtd/nand/spi/core.c
|
||||
@@ -902,6 +902,7 @@ static const struct spinand_manufacturer
|
||||
@@ -905,6 +905,7 @@ static const struct spinand_manufacturer
|
||||
¶gon_spinand_manufacturer,
|
||||
&toshiba_spinand_manufacturer,
|
||||
&winbond_spinand_manufacturer,
|
||||
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
||||
.init_quirk = xhci_mvebu_a3700_init_quirk,
|
||||
};
|
||||
|
||||
@@ -344,14 +333,7 @@ static int xhci_plat_probe(struct platfo
|
||||
@@ -345,14 +334,7 @@ static int xhci_plat_probe(struct platfo
|
||||
|
||||
hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node);
|
||||
xhci->shared_hcd->tpl_support = hcd->tpl_support;
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
|
||||
map->format.buf_size = DIV_ROUND_UP(config->reg_bits +
|
||||
config->val_bits + config->pad_bits, 8);
|
||||
@@ -1762,6 +1763,7 @@ static int _regmap_raw_write_impl(struct
|
||||
@@ -1764,6 +1765,7 @@ static int _regmap_raw_write_impl(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
map->format.format_reg(map->work_buf, reg, map->reg_shift);
|
||||
regmap_set_work_buf_flag_mask(map, map->format.reg_bytes,
|
||||
map->write_flag_mask);
|
||||
@@ -1932,6 +1934,7 @@ static int _regmap_bus_formatted_write(v
|
||||
@@ -1934,6 +1936,7 @@ static int _regmap_bus_formatted_write(v
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
map->format.format_write(map, reg, val);
|
||||
|
||||
trace_regmap_hw_write_start(map, reg, 1);
|
||||
@@ -2372,6 +2375,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||
@@ -2374,6 +2377,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||
unsigned int reg = regs[i].reg;
|
||||
unsigned int val = regs[i].def;
|
||||
trace_regmap_hw_write_start(map, reg, 1);
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
map->format.format_reg(u8, reg, map->reg_shift);
|
||||
u8 += reg_bytes + pad_bytes;
|
||||
map->format.format_val(u8, val, 0);
|
||||
@@ -2697,6 +2701,7 @@ static int _regmap_raw_read(struct regma
|
||||
@@ -2699,6 +2703,7 @@ static int _regmap_raw_read(struct regma
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);
|
||||
map->format.pad_bytes = config->pad_bits / 8;
|
||||
map->format.reg_downshift = config->reg_downshift;
|
||||
@@ -1763,6 +1765,7 @@ static int _regmap_raw_write_impl(struct
|
||||
@@ -1765,6 +1767,7 @@ static int _regmap_raw_write_impl(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
reg >>= map->format.reg_downshift;
|
||||
map->format.format_reg(map->work_buf, reg, map->reg_shift);
|
||||
regmap_set_work_buf_flag_mask(map, map->format.reg_bytes,
|
||||
@@ -1934,6 +1937,7 @@ static int _regmap_bus_formatted_write(v
|
||||
@@ -1936,6 +1939,7 @@ static int _regmap_bus_formatted_write(v
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
reg >>= map->format.reg_downshift;
|
||||
map->format.format_write(map, reg, val);
|
||||
|
||||
@@ -2375,6 +2379,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||
@@ -2377,6 +2381,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||
unsigned int reg = regs[i].reg;
|
||||
unsigned int val = regs[i].def;
|
||||
trace_regmap_hw_write_start(map, reg, 1);
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
reg >>= map->format.reg_downshift;
|
||||
map->format.format_reg(u8, reg, map->reg_shift);
|
||||
u8 += reg_bytes + pad_bytes;
|
||||
@@ -2701,6 +2706,7 @@ static int _regmap_raw_read(struct regma
|
||||
@@ -2703,6 +2708,7 @@ static int _regmap_raw_read(struct regma
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
--- a/drivers/base/regmap/regmap.c
|
||||
+++ b/drivers/base/regmap/regmap.c
|
||||
@@ -1955,6 +1955,8 @@ static int _regmap_bus_reg_write(void *c
|
||||
@@ -1957,6 +1957,8 @@ static int _regmap_bus_reg_write(void *c
|
||||
{
|
||||
struct regmap *map = context;
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
return map->bus->reg_write(map->bus_context, reg, val);
|
||||
}
|
||||
|
||||
@@ -2727,6 +2729,8 @@ static int _regmap_bus_reg_read(void *co
|
||||
@@ -2729,6 +2731,8 @@ static int _regmap_bus_reg_read(void *co
|
||||
{
|
||||
struct regmap *map = context;
|
||||
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
return map->bus->reg_read(map->bus_context, reg, val);
|
||||
}
|
||||
|
||||
@@ -3096,6 +3100,8 @@ static int _regmap_update_bits(struct re
|
||||
@@ -3098,6 +3102,8 @@ static int _regmap_update_bits(struct re
|
||||
*change = false;
|
||||
|
||||
if (regmap_volatile(map, reg) && map->reg_update_bits) {
|
||||
|
||||
@@ -128,7 +128,7 @@ Link: https://lore.kernel.org/linux-mtd/20220629125737.14418-4-kernel@kempniu.pl
|
||||
}
|
||||
--- a/drivers/mtd/nand/spi/core.c
|
||||
+++ b/drivers/mtd/nand/spi/core.c
|
||||
@@ -629,6 +629,7 @@ static int spinand_mtd_read(struct mtd_i
|
||||
@@ -632,6 +632,7 @@ static int spinand_mtd_read(struct mtd_i
|
||||
{
|
||||
struct spinand_device *spinand = mtd_to_spinand(mtd);
|
||||
struct nand_device *nand = mtd_to_nanddev(mtd);
|
||||
@@ -136,7 +136,7 @@ Link: https://lore.kernel.org/linux-mtd/20220629125737.14418-4-kernel@kempniu.pl
|
||||
unsigned int max_bitflips = 0;
|
||||
struct nand_io_iter iter;
|
||||
bool disable_ecc = false;
|
||||
@@ -640,6 +641,8 @@ static int spinand_mtd_read(struct mtd_i
|
||||
@@ -643,6 +644,8 @@ static int spinand_mtd_read(struct mtd_i
|
||||
|
||||
mutex_lock(&spinand->lock);
|
||||
|
||||
@@ -145,7 +145,7 @@ Link: https://lore.kernel.org/linux-mtd/20220629125737.14418-4-kernel@kempniu.pl
|
||||
nanddev_io_for_each_page(nand, NAND_PAGE_READ, from, ops, &iter) {
|
||||
if (disable_ecc)
|
||||
iter.req.mode = MTD_OPS_RAW;
|
||||
@@ -662,6 +665,13 @@ static int spinand_mtd_read(struct mtd_i
|
||||
@@ -665,6 +668,13 @@ static int spinand_mtd_read(struct mtd_i
|
||||
ops->oobretlen += iter.req.ooblen;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int page_pool_init(struct page_pool *pool,
|
||||
const struct page_pool_params *params)
|
||||
{
|
||||
@@ -140,8 +147,10 @@ static struct page *page_pool_refill_all
|
||||
@@ -136,8 +143,10 @@ static struct page *page_pool_refill_all
|
||||
int pref_nid; /* preferred NUMA node */
|
||||
|
||||
/* Quicker fallback, avoid locks when ring is empty */
|
||||
@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Softirq guarantee CPU and thus NUMA node is stable. This,
|
||||
* assumes CPU refilling driver RX-ring will also run RX-NAPI.
|
||||
@@ -171,14 +180,17 @@ static struct page *page_pool_refill_all
|
||||
@@ -167,14 +176,17 @@ static struct page *page_pool_refill_all
|
||||
* This limit stress on page buddy alloactor.
|
||||
*/
|
||||
page_pool_return_page(pool, page);
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
spin_unlock(&r->consumer_lock);
|
||||
return page;
|
||||
@@ -193,6 +205,7 @@ static struct page *__page_pool_get_cach
|
||||
@@ -189,6 +201,7 @@ static struct page *__page_pool_get_cach
|
||||
if (likely(pool->alloc.count)) {
|
||||
/* Fast-path */
|
||||
page = pool->alloc.cache[--pool->alloc.count];
|
||||
@@ -140,7 +140,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
} else {
|
||||
page = page_pool_refill_alloc_cache(pool);
|
||||
}
|
||||
@@ -264,6 +277,7 @@ static struct page *__page_pool_alloc_pa
|
||||
@@ -260,6 +273,7 @@ static struct page *__page_pool_alloc_pa
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
page_pool_set_pp_info(pool, page);
|
||||
|
||||
/* Track how many pages are held 'in-flight' */
|
||||
@@ -318,10 +332,12 @@ static struct page *__page_pool_alloc_pa
|
||||
@@ -320,10 +334,12 @@ static struct page *__page_pool_alloc_pa
|
||||
}
|
||||
|
||||
/* Return last page */
|
||||
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#endif
|
||||
|
||||
static int page_pool_init(struct page_pool *pool,
|
||||
@@ -103,6 +110,12 @@ static int page_pool_init(struct page_po
|
||||
@@ -99,6 +106,12 @@ static int page_pool_init(struct page_po
|
||||
pool->p.flags & PP_FLAG_PAGE_FRAG)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -82,21 +82,16 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (ptr_ring_init(&pool->ring, ring_qsize, GFP_KERNEL) < 0)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -435,7 +448,12 @@ static bool page_pool_recycle_in_ring(st
|
||||
else
|
||||
ret = ptr_ring_produce_bh(&pool->ring, page);
|
||||
|
||||
- return (ret == 0) ? true : false;
|
||||
+ if (!ret) {
|
||||
@@ -435,6 +448,8 @@ static bool page_pool_recycle_in_ring(st
|
||||
/* BH protection not needed if current is softirq */
|
||||
in_softirq = page_pool_producer_lock(pool);
|
||||
ret = !__ptr_ring_produce(&pool->ring, page);
|
||||
+ if (ret)
|
||||
+ recycle_stat_inc(pool, ring);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
}
|
||||
page_pool_producer_unlock(pool, in_softirq);
|
||||
|
||||
/* Only allow direct recycling in special circumstances, into the
|
||||
@@ -446,11 +464,14 @@ static bool page_pool_recycle_in_ring(st
|
||||
return ret;
|
||||
@@ -448,11 +463,14 @@ static bool page_pool_recycle_in_ring(st
|
||||
static bool page_pool_recycle_in_cache(struct page *page,
|
||||
struct page_pool *pool)
|
||||
{
|
||||
@@ -112,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -505,6 +526,7 @@ __page_pool_put_page(struct page_pool *p
|
||||
@@ -507,6 +525,7 @@ __page_pool_put_page(struct page_pool *p
|
||||
* doing refcnt based recycle tricks, meaning another process
|
||||
* will be invoking put_page.
|
||||
*/
|
||||
@@ -120,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Do not replace this with page_pool_return_page() */
|
||||
page_pool_release_page(pool, page);
|
||||
put_page(page);
|
||||
@@ -518,6 +540,7 @@ void page_pool_put_page(struct page_pool
|
||||
@@ -520,6 +539,7 @@ void page_pool_put_page(struct page_pool
|
||||
page = __page_pool_put_page(pool, page, dma_sync_size, allow_direct);
|
||||
if (page && !page_pool_recycle_in_ring(pool, page)) {
|
||||
/* Cache full, fallback to free pages */
|
||||
@@ -128,7 +123,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
page_pool_return_page(pool, page);
|
||||
}
|
||||
}
|
||||
@@ -665,6 +688,9 @@ static void page_pool_free(struct page_p
|
||||
@@ -667,6 +687,9 @@ static void page_pool_free(struct page_p
|
||||
if (pool->p.flags & PP_FLAG_DMA_MAP)
|
||||
put_device(pool->p.dev);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
#endif
|
||||
|
||||
static int page_pool_init(struct page_pool *pool,
|
||||
@@ -593,9 +600,13 @@ void page_pool_put_page_bulk(struct page
|
||||
@@ -592,9 +599,13 @@ void page_pool_put_page_bulk(struct page
|
||||
/* Bulk producer into ptr_ring page_pool cache */
|
||||
in_softirq = page_pool_producer_lock(pool);
|
||||
for (i = 0; i < bulk_len; i++) {
|
||||
|
||||
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
goto err_dma;
|
||||
|
||||
if (i == nr_frags - 1 &&
|
||||
@@ -1341,18 +1342,18 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1349,18 +1350,18 @@ static int mtk_poll_rx(struct napi_struc
|
||||
netdev->stats.rx_dropped++;
|
||||
goto release_desc;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ring->buf_size, DMA_FROM_DEVICE);
|
||||
|
||||
/* receive data */
|
||||
@@ -1625,7 +1626,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1633,7 +1634,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
if (!ring->buf)
|
||||
goto no_tx_mem;
|
||||
|
||||
@@ -129,7 +129,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
&ring->phys, GFP_ATOMIC);
|
||||
if (!ring->dma)
|
||||
goto no_tx_mem;
|
||||
@@ -1643,7 +1644,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1651,7 +1652,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
* descriptors in ring->dma_pdma.
|
||||
*/
|
||||
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
&ring->phys_pdma,
|
||||
GFP_ATOMIC);
|
||||
if (!ring->dma_pdma)
|
||||
@@ -1702,7 +1703,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -1710,7 +1711,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
}
|
||||
|
||||
if (ring->dma) {
|
||||
@@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
MTK_DMA_SIZE * sizeof(*ring->dma),
|
||||
ring->dma,
|
||||
ring->phys);
|
||||
@@ -1710,7 +1711,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -1718,7 +1719,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
}
|
||||
|
||||
if (ring->dma_pdma) {
|
||||
@@ -156,7 +156,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
MTK_DMA_SIZE * sizeof(*ring->dma_pdma),
|
||||
ring->dma_pdma,
|
||||
ring->phys_pdma);
|
||||
@@ -1758,18 +1759,18 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1766,18 +1767,18 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return -ENOMEM;
|
||||
ring->dma[i].rxd1 = (unsigned int)dma_addr;
|
||||
|
||||
@@ -1805,7 +1806,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
@@ -1813,7 +1814,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
continue;
|
||||
if (!ring->dma[i].rxd1)
|
||||
continue;
|
||||
@@ -187,7 +187,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ring->dma[i].rxd1,
|
||||
ring->buf_size,
|
||||
DMA_FROM_DEVICE);
|
||||
@@ -1816,7 +1817,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
@@ -1824,7 +1825,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
}
|
||||
|
||||
if (ring->dma) {
|
||||
@@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ring->dma_size * sizeof(*ring->dma),
|
||||
ring->dma,
|
||||
ring->phys);
|
||||
@@ -2175,7 +2176,7 @@ static void mtk_dma_free(struct mtk_eth
|
||||
@@ -2183,7 +2184,7 @@ static void mtk_dma_free(struct mtk_eth
|
||||
if (eth->netdev[i])
|
||||
netdev_reset_queue(eth->netdev[i]);
|
||||
if (eth->scratch_ring) {
|
||||
@@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
|
||||
eth->scratch_ring,
|
||||
eth->phy_scratch_ring);
|
||||
@@ -2527,6 +2528,8 @@ static void mtk_dim_tx(struct work_struc
|
||||
@@ -2535,6 +2536,8 @@ static void mtk_dim_tx(struct work_struc
|
||||
|
||||
static int mtk_hw_init(struct mtk_eth *eth)
|
||||
{
|
||||
@@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int i, val, ret;
|
||||
|
||||
if (test_and_set_bit(MTK_HW_INIT, ð->state))
|
||||
@@ -2539,6 +2542,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -2547,6 +2550,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
if (ret)
|
||||
goto err_disable_pm;
|
||||
|
||||
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||
ret = device_reset(eth->dev);
|
||||
if (ret) {
|
||||
@@ -3085,6 +3092,35 @@ free_netdev:
|
||||
@@ -3093,6 +3100,35 @@ free_netdev:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static int mtk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *mac_np;
|
||||
@@ -3098,6 +3134,7 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3106,6 +3142,7 @@ static int mtk_probe(struct platform_dev
|
||||
eth->soc = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
eth->dev = &pdev->dev;
|
||||
@@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
eth->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(eth->base))
|
||||
return PTR_ERR(eth->base);
|
||||
@@ -3146,6 +3183,16 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3154,6 +3191,16 @@ static int mtk_probe(struct platform_dev
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
static int mtk_msg_level = -1;
|
||||
module_param_named(msg_level, mtk_msg_level, int, 0);
|
||||
@@ -3215,6 +3216,22 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3223,6 +3224,22 @@ static int mtk_probe(struct platform_dev
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2348,7 +2348,7 @@ static int mtk_open(struct net_device *d
|
||||
@@ -2356,7 +2356,7 @@ static int mtk_open(struct net_device *d
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
gdm_config = MTK_GDMA_TO_PPE;
|
||||
|
||||
mtk_gdm_config(eth, gdm_config);
|
||||
@@ -2422,7 +2422,7 @@ static int mtk_stop(struct net_device *d
|
||||
@@ -2430,7 +2430,7 @@ static int mtk_stop(struct net_device *d
|
||||
mtk_dma_free(eth);
|
||||
|
||||
if (eth->soc->offload_version)
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3307,10 +3307,11 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3315,10 +3315,11 @@ static int mtk_probe(struct platform_dev
|
||||
}
|
||||
|
||||
if (eth->soc->offload_version) {
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#include <net/dsa.h>
|
||||
|
||||
#include "mtk_eth_soc.h"
|
||||
@@ -1303,7 +1304,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1311,7 +1312,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
struct net_device *netdev;
|
||||
unsigned int pktlen;
|
||||
dma_addr_t dma_addr;
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int mac;
|
||||
|
||||
ring = mtk_get_rx_ring(eth);
|
||||
@@ -1382,6 +1383,11 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1390,6 +1391,11 @@ static int mtk_poll_rx(struct napi_struc
|
||||
skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
||||
(trxd.rxd2 & RX_DMA_VTAG))
|
||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
||||
@@ -3307,7 +3313,7 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3315,7 +3321,7 @@ static int mtk_probe(struct platform_dev
|
||||
}
|
||||
|
||||
if (eth->soc->offload_version) {
|
||||
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mediatek,hifsys = <&hifsys>;
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3194,7 +3194,7 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3202,7 +3202,7 @@ static int mtk_probe(struct platform_dev
|
||||
struct regmap *cci;
|
||||
|
||||
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (unlikely(!eth->scratch_ring))
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1634,7 +1634,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1642,7 +1642,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
goto no_tx_mem;
|
||||
|
||||
ring->dma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz,
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (!ring->dma)
|
||||
goto no_tx_mem;
|
||||
|
||||
@@ -1652,8 +1652,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1660,8 +1660,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
*/
|
||||
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
|
||||
ring->dma_pdma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz,
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (!ring->dma_pdma)
|
||||
goto no_tx_mem;
|
||||
|
||||
@@ -1768,7 +1767,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1776,7 +1775,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
|
||||
ring->dma = dma_alloc_coherent(eth->dma_dev,
|
||||
rx_dma_size * sizeof(*ring->dma),
|
||||
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
mtk_w32(eth, eth->phy_scratch_ring, MTK_QDMA_FQ_HEAD);
|
||||
@@ -2183,6 +2186,7 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
@@ -2191,6 +2194,7 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
|
||||
static void mtk_dma_free(struct mtk_eth *eth)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MTK_MAC_COUNT; i++)
|
||||
@@ -2190,9 +2194,8 @@ static void mtk_dma_free(struct mtk_eth
|
||||
@@ -2198,9 +2202,8 @@ static void mtk_dma_free(struct mtk_eth
|
||||
netdev_reset_queue(eth->netdev[i]);
|
||||
if (eth->scratch_ring) {
|
||||
dma_free_coherent(eth->dma_dev,
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
eth->scratch_ring = NULL;
|
||||
eth->phy_scratch_ring = 0;
|
||||
}
|
||||
@@ -3397,6 +3400,9 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -3405,6 +3408,9 @@ static const struct mtk_soc_data mt2701_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
.required_pctl = true,
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7621_data = {
|
||||
@@ -3405,6 +3411,9 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -3413,6 +3419,9 @@ static const struct mtk_soc_data mt7621_
|
||||
.required_clks = MT7621_CLKS_BITMAP,
|
||||
.required_pctl = false,
|
||||
.offload_version = 2,
|
||||
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7622_data = {
|
||||
@@ -3414,6 +3423,9 @@ static const struct mtk_soc_data mt7622_
|
||||
@@ -3422,6 +3431,9 @@ static const struct mtk_soc_data mt7622_
|
||||
.required_clks = MT7622_CLKS_BITMAP,
|
||||
.required_pctl = false,
|
||||
.offload_version = 2,
|
||||
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7623_data = {
|
||||
@@ -3422,6 +3434,9 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -3430,6 +3442,9 @@ static const struct mtk_soc_data mt7623_
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
.required_pctl = true,
|
||||
.offload_version = 2,
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7629_data = {
|
||||
@@ -3430,6 +3445,9 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -3438,6 +3453,9 @@ static const struct mtk_soc_data mt7629_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7629_CLKS_BITMAP,
|
||||
.required_pctl = false,
|
||||
@@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data rt5350_data = {
|
||||
@@ -3437,6 +3455,9 @@ static const struct mtk_soc_data rt5350_
|
||||
@@ -3445,6 +3463,9 @@ static const struct mtk_soc_data rt5350_
|
||||
.hw_features = MTK_HW_FEATURES_MT7628,
|
||||
.required_clks = MT7628_CLKS_BITMAP,
|
||||
.required_pctl = false,
|
||||
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1635,8 +1635,10 @@ static int mtk_napi_rx(struct napi_struc
|
||||
@@ -1643,8 +1643,10 @@ static int mtk_napi_rx(struct napi_struc
|
||||
|
||||
static int mtk_tx_alloc(struct mtk_eth *eth)
|
||||
{
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ring->buf = kcalloc(MTK_DMA_SIZE, sizeof(*ring->buf),
|
||||
GFP_KERNEL);
|
||||
@@ -1652,8 +1654,10 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1660,8 +1662,10 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
int next = (i + 1) % MTK_DMA_SIZE;
|
||||
u32 next_ptr = ring->phys + next * sz;
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
/* On MT7688 (PDMA only) this driver uses the ring->dma structs
|
||||
@@ -1675,7 +1679,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1683,7 +1687,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
ring->dma_size = MTK_DMA_SIZE;
|
||||
atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
|
||||
ring->next_free = &ring->dma[0];
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->last_free_ptr = (u32)(ring->phys + ((MTK_DMA_SIZE - 1) * sz));
|
||||
ring->thresh = MAX_SKB_FRAGS;
|
||||
|
||||
@@ -1708,6 +1712,7 @@ no_tx_mem:
|
||||
@@ -1716,6 +1720,7 @@ no_tx_mem:
|
||||
|
||||
static void mtk_tx_clean(struct mtk_eth *eth)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
int i;
|
||||
|
||||
@@ -1720,17 +1725,15 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -1728,17 +1733,15 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
|
||||
if (ring->dma) {
|
||||
dma_free_coherent(eth->dma_dev,
|
||||
|
||||
@@ -97,7 +97,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
itxd_pdma->txd2 = TX_DMA_DESP2_DEF;
|
||||
|
||||
itxd = mtk_qdma_phys_to_virt(ring, itxd->txd2);
|
||||
@@ -1460,7 +1463,8 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
@@ -1468,7 +1471,8 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
if ((desc->txd3 & TX_DMA_OWNER_CPU) == 0)
|
||||
break;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1786,7 +1786,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1794,7 +1794,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
}
|
||||
|
||||
ring->dma = dma_alloc_coherent(eth->dma_dev,
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
&ring->phys, GFP_KERNEL);
|
||||
if (!ring->dma)
|
||||
return -ENOMEM;
|
||||
@@ -1844,9 +1844,8 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
@@ -1852,9 +1852,8 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
|
||||
if (ring->dma) {
|
||||
dma_free_coherent(eth->dma_dev,
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->dma = NULL;
|
||||
}
|
||||
}
|
||||
@@ -3412,6 +3411,7 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -3420,6 +3419,7 @@ static const struct mtk_soc_data mt2701_
|
||||
.required_pctl = true,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3423,6 +3423,7 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -3431,6 +3431,7 @@ static const struct mtk_soc_data mt7621_
|
||||
.offload_version = 2,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
@@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3435,6 +3436,7 @@ static const struct mtk_soc_data mt7622_
|
||||
@@ -3443,6 +3444,7 @@ static const struct mtk_soc_data mt7622_
|
||||
.offload_version = 2,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3446,6 +3448,7 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -3454,6 +3456,7 @@ static const struct mtk_soc_data mt7623_
|
||||
.offload_version = 2,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3457,6 +3460,7 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -3465,6 +3468,7 @@ static const struct mtk_soc_data mt7629_
|
||||
.required_pctl = false,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
@@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3467,6 +3471,7 @@ static const struct mtk_soc_data rt5350_
|
||||
@@ -3475,6 +3479,7 @@ static const struct mtk_soc_data rt5350_
|
||||
.required_pctl = false,
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1275,9 +1275,12 @@ static struct mtk_rx_ring *mtk_get_rx_ri
|
||||
@@ -1283,9 +1283,12 @@ static struct mtk_rx_ring *mtk_get_rx_ri
|
||||
return ð->rx_ring[0];
|
||||
|
||||
for (i = 0; i < MTK_MAX_RX_RING_NUM; i++) {
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->calc_idx_update = true;
|
||||
return ring;
|
||||
}
|
||||
@@ -1328,7 +1331,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1336,7 +1339,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
goto rx_done;
|
||||
|
||||
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
data = ring->data[idx];
|
||||
|
||||
if (!mtk_rx_get_desc(&trxd, rxd))
|
||||
@@ -1520,7 +1523,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
@@ -1528,7 +1531,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
|
||||
mtk_tx_unmap(eth, tx_buf, true);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1795,18 +1795,25 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1803,18 +1803,25 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < rx_dma_size; i++) {
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
ring->dma_size = rx_dma_size;
|
||||
ring->calc_idx_update = false;
|
||||
@@ -1831,14 +1838,17 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
@@ -1839,14 +1846,17 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
|
||||
if (ring->data && ring->dma) {
|
||||
for (i = 0; i < ring->dma_size; i++) {
|
||||
|
||||
@@ -196,7 +196,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
} else {
|
||||
int next_idx;
|
||||
|
||||
@@ -1450,6 +1503,7 @@ rx_done:
|
||||
@@ -1458,6 +1511,7 @@ rx_done:
|
||||
static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget,
|
||||
unsigned int *done, unsigned int *bytes)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
struct mtk_tx_dma *desc;
|
||||
struct sk_buff *skb;
|
||||
@@ -1457,7 +1511,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
@@ -1465,7 +1519,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
u32 cpu, dma;
|
||||
|
||||
cpu = ring->last_free_ptr;
|
||||
@@ -213,7 +213,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
desc = mtk_qdma_phys_to_virt(ring, cpu);
|
||||
|
||||
@@ -1492,7 +1546,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
@@ -1500,7 +1554,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
}
|
||||
|
||||
ring->last_free_ptr = cpu;
|
||||
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
return budget;
|
||||
}
|
||||
@@ -1585,24 +1639,25 @@ static void mtk_handle_status_irq(struct
|
||||
@@ -1593,24 +1647,25 @@ static void mtk_handle_status_irq(struct
|
||||
static int mtk_napi_tx(struct napi_struct *napi, int budget)
|
||||
{
|
||||
struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi);
|
||||
@@ -252,7 +252,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return budget;
|
||||
|
||||
if (napi_complete_done(napi, tx_done))
|
||||
@@ -1614,6 +1669,7 @@ static int mtk_napi_tx(struct napi_struc
|
||||
@@ -1622,6 +1677,7 @@ static int mtk_napi_tx(struct napi_struc
|
||||
static int mtk_napi_rx(struct napi_struct *napi, int budget)
|
||||
{
|
||||
struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi);
|
||||
@@ -260,7 +260,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int rx_done_total = 0;
|
||||
|
||||
mtk_handle_status_irq(eth);
|
||||
@@ -1621,21 +1677,21 @@ static int mtk_napi_rx(struct napi_struc
|
||||
@@ -1629,21 +1685,21 @@ static int mtk_napi_rx(struct napi_struc
|
||||
do {
|
||||
int rx_done;
|
||||
|
||||
@@ -286,7 +286,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (napi_complete_done(napi, rx_done_total))
|
||||
mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
|
||||
@@ -1698,20 +1754,20 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1706,20 +1762,20 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
*/
|
||||
wmb();
|
||||
|
||||
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1750,6 +1806,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -1758,6 +1814,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
|
||||
static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag)
|
||||
{
|
||||
@@ -322,7 +322,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct mtk_rx_ring *ring;
|
||||
int rx_data_len, rx_dma_size;
|
||||
int i;
|
||||
@@ -1818,16 +1875,18 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1826,16 +1883,18 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
ring->dma_size = rx_dma_size;
|
||||
ring->calc_idx_update = false;
|
||||
ring->calc_idx = rx_dma_size - 1;
|
||||
@@ -345,7 +345,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2139,9 +2198,9 @@ static int mtk_dma_busy_wait(struct mtk_
|
||||
@@ -2147,9 +2206,9 @@ static int mtk_dma_busy_wait(struct mtk_
|
||||
u32 val;
|
||||
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
|
||||
@@ -357,7 +357,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ret = readx_poll_timeout_atomic(__raw_readl, eth->base + reg, val,
|
||||
!(val & (MTK_RX_DMA_BUSY | MTK_TX_DMA_BUSY)),
|
||||
@@ -2199,8 +2258,8 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
@@ -2207,8 +2266,8 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
* automatically
|
||||
*/
|
||||
mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN |
|
||||
@@ -368,7 +368,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2274,13 +2333,14 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
@@ -2282,13 +2341,14 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
static irqreturn_t mtk_handle_irq(int irq, void *_eth)
|
||||
{
|
||||
struct mtk_eth *eth = _eth;
|
||||
@@ -387,7 +387,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mtk_handle_irq_tx(irq, _eth);
|
||||
}
|
||||
|
||||
@@ -2304,6 +2364,7 @@ static void mtk_poll_controller(struct n
|
||||
@@ -2312,6 +2372,7 @@ static void mtk_poll_controller(struct n
|
||||
static int mtk_start_dma(struct mtk_eth *eth)
|
||||
{
|
||||
u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0;
|
||||
@@ -395,7 +395,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int err;
|
||||
|
||||
err = mtk_dma_init(eth);
|
||||
@@ -2318,16 +2379,15 @@ static int mtk_start_dma(struct mtk_eth
|
||||
@@ -2326,16 +2387,15 @@ static int mtk_start_dma(struct mtk_eth
|
||||
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
|
||||
MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
|
||||
MTK_RX_BT_32DWORDS,
|
||||
@@ -415,7 +415,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2453,8 +2513,8 @@ static int mtk_stop(struct net_device *d
|
||||
@@ -2461,8 +2521,8 @@ static int mtk_stop(struct net_device *d
|
||||
cancel_work_sync(ð->tx_dim.work);
|
||||
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
|
||||
@@ -426,7 +426,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
mtk_dma_free(eth);
|
||||
|
||||
@@ -2508,6 +2568,7 @@ static void mtk_dim_rx(struct work_struc
|
||||
@@ -2516,6 +2576,7 @@ static void mtk_dim_rx(struct work_struc
|
||||
{
|
||||
struct dim *dim = container_of(work, struct dim, work);
|
||||
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim);
|
||||
@@ -434,7 +434,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct dim_cq_moder cur_profile;
|
||||
u32 val, cur;
|
||||
|
||||
@@ -2515,7 +2576,7 @@ static void mtk_dim_rx(struct work_struc
|
||||
@@ -2523,7 +2584,7 @@ static void mtk_dim_rx(struct work_struc
|
||||
dim->profile_ix);
|
||||
spin_lock_bh(ð->dim_lock);
|
||||
|
||||
@@ -443,7 +443,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
val &= MTK_PDMA_DELAY_TX_MASK;
|
||||
val |= MTK_PDMA_DELAY_RX_EN;
|
||||
|
||||
@@ -2525,9 +2586,9 @@ static void mtk_dim_rx(struct work_struc
|
||||
@@ -2533,9 +2594,9 @@ static void mtk_dim_rx(struct work_struc
|
||||
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
|
||||
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT;
|
||||
|
||||
@@ -455,7 +455,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
spin_unlock_bh(ð->dim_lock);
|
||||
|
||||
@@ -2538,6 +2599,7 @@ static void mtk_dim_tx(struct work_struc
|
||||
@@ -2546,6 +2607,7 @@ static void mtk_dim_tx(struct work_struc
|
||||
{
|
||||
struct dim *dim = container_of(work, struct dim, work);
|
||||
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim);
|
||||
@@ -463,7 +463,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct dim_cq_moder cur_profile;
|
||||
u32 val, cur;
|
||||
|
||||
@@ -2545,7 +2607,7 @@ static void mtk_dim_tx(struct work_struc
|
||||
@@ -2553,7 +2615,7 @@ static void mtk_dim_tx(struct work_struc
|
||||
dim->profile_ix);
|
||||
spin_lock_bh(ð->dim_lock);
|
||||
|
||||
@@ -472,7 +472,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
val &= MTK_PDMA_DELAY_RX_MASK;
|
||||
val |= MTK_PDMA_DELAY_TX_EN;
|
||||
|
||||
@@ -2555,9 +2617,9 @@ static void mtk_dim_tx(struct work_struc
|
||||
@@ -2563,9 +2625,9 @@ static void mtk_dim_tx(struct work_struc
|
||||
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
|
||||
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT;
|
||||
|
||||
@@ -484,7 +484,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
spin_unlock_bh(ð->dim_lock);
|
||||
|
||||
@@ -2568,6 +2630,7 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -2576,6 +2638,7 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
{
|
||||
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
|
||||
ETHSYS_DMA_AG_MAP_PPE;
|
||||
@@ -492,7 +492,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int i, val, ret;
|
||||
|
||||
if (test_and_set_bit(MTK_HW_INIT, ð->state))
|
||||
@@ -2642,10 +2705,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -2650,10 +2713,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
mtk_rx_irq_disable(eth, ~0);
|
||||
|
||||
/* FE int grouping */
|
||||
@@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
|
||||
|
||||
return 0;
|
||||
@@ -3177,14 +3240,6 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3185,14 +3248,6 @@ static int mtk_probe(struct platform_dev
|
||||
if (IS_ERR(eth->base))
|
||||
return PTR_ERR(eth->base);
|
||||
|
||||
@@ -522,7 +522,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
|
||||
eth->ip_align = NET_IP_ALIGN;
|
||||
@@ -3418,6 +3473,7 @@ static int mtk_remove(struct platform_de
|
||||
@@ -3426,6 +3481,7 @@ static int mtk_remove(struct platform_de
|
||||
}
|
||||
|
||||
static const struct mtk_soc_data mt2701_data = {
|
||||
@@ -530,7 +530,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
.caps = MT7623_CAPS | MTK_HWLRO,
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
@@ -3429,6 +3485,7 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -3437,6 +3493,7 @@ static const struct mtk_soc_data mt2701_
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7621_data = {
|
||||
@@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
.caps = MT7621_CAPS,
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7621_CLKS_BITMAP,
|
||||
@@ -3441,6 +3498,7 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -3449,6 +3506,7 @@ static const struct mtk_soc_data mt7621_
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7622_data = {
|
||||
@@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
.ana_rgc3 = 0x2028,
|
||||
.caps = MT7622_CAPS | MTK_HWLRO,
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
@@ -3454,6 +3512,7 @@ static const struct mtk_soc_data mt7622_
|
||||
@@ -3462,6 +3520,7 @@ static const struct mtk_soc_data mt7622_
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7623_data = {
|
||||
@@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
.caps = MT7623_CAPS | MTK_HWLRO,
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
@@ -3466,6 +3525,7 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -3474,6 +3533,7 @@ static const struct mtk_soc_data mt7623_
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data mt7629_data = {
|
||||
@@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
.ana_rgc3 = 0x128,
|
||||
.caps = MT7629_CAPS | MTK_HWLRO,
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
@@ -3478,6 +3538,7 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -3486,6 +3546,7 @@ static const struct mtk_soc_data mt7629_
|
||||
};
|
||||
|
||||
static const struct mtk_soc_data rt5350_data = {
|
||||
|
||||
@@ -172,7 +172,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
} else {
|
||||
nfrags += skb_shinfo(skb)->nr_frags;
|
||||
@@ -1277,7 +1344,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1284,7 +1351,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
if (unlikely(test_bit(MTK_RESETTING, ð->state)))
|
||||
goto drop;
|
||||
|
||||
@@ -181,7 +181,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
|
||||
netif_stop_queue(dev);
|
||||
netif_err(eth, tx_queued, dev,
|
||||
@@ -1369,7 +1436,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1377,7 +1444,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
int idx;
|
||||
struct sk_buff *skb;
|
||||
u8 *data, *new_data;
|
||||
@@ -190,7 +190,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int done = 0, bytes = 0;
|
||||
|
||||
while (done < budget) {
|
||||
@@ -1377,7 +1444,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1385,7 +1452,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
unsigned int pktlen;
|
||||
dma_addr_t dma_addr;
|
||||
u32 hash, reason;
|
||||
@@ -199,7 +199,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ring = mtk_get_rx_ring(eth);
|
||||
if (unlikely(!ring))
|
||||
@@ -1387,16 +1454,15 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1395,16 +1462,15 @@ static int mtk_poll_rx(struct napi_struc
|
||||
rxd = (void *)ring->dma + idx * eth->soc->txrx.rxd_size;
|
||||
data = ring->data[idx];
|
||||
|
||||
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
|
||||
!eth->netdev[mac]))
|
||||
@@ -1442,7 +1508,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1450,7 +1516,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
pktlen = RX_DMA_GET_PLEN0(trxd.rxd2);
|
||||
skb->dev = netdev;
|
||||
skb_put(skb, pktlen);
|
||||
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
else
|
||||
skb_checksum_none_assert(skb);
|
||||
@@ -1460,10 +1526,25 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1468,10 +1534,25 @@ static int mtk_poll_rx(struct napi_struc
|
||||
mtk_ppe_check_skb(eth->ppe, skb,
|
||||
trxd.rxd4 & MTK_RXD4_FOE_ENTRY);
|
||||
|
||||
@@ -261,7 +261,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
skb_record_rx_queue(skb, 0);
|
||||
napi_gro_receive(napi, skb);
|
||||
|
||||
@@ -1475,7 +1556,7 @@ release_desc:
|
||||
@@ -1483,7 +1564,7 @@ release_desc:
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
|
||||
rxd->rxd2 = RX_DMA_LSO;
|
||||
else
|
||||
@@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ring->calc_idx = idx;
|
||||
|
||||
@@ -1677,7 +1758,8 @@ static int mtk_napi_rx(struct napi_struc
|
||||
@@ -1685,7 +1766,8 @@ static int mtk_napi_rx(struct napi_struc
|
||||
do {
|
||||
int rx_done;
|
||||
|
||||
@@ -280,7 +280,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth);
|
||||
rx_done_total += rx_done;
|
||||
|
||||
@@ -1691,10 +1773,11 @@ static int mtk_napi_rx(struct napi_struc
|
||||
@@ -1699,10 +1781,11 @@ static int mtk_napi_rx(struct napi_struc
|
||||
if (rx_done_total == budget)
|
||||
return budget;
|
||||
|
||||
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
return rx_done_total;
|
||||
}
|
||||
@@ -1704,7 +1787,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1712,7 +1795,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
const struct mtk_soc_data *soc = eth->soc;
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
int i, sz = soc->txrx.txd_size;
|
||||
@@ -303,7 +303,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ring->buf = kcalloc(MTK_DMA_SIZE, sizeof(*ring->buf),
|
||||
GFP_KERNEL);
|
||||
@@ -1724,13 +1807,19 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1732,13 +1815,19 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
txd->txd2 = next_ptr;
|
||||
txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
|
||||
txd->txd4 = 0;
|
||||
@@ -324,7 +324,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->dma_pdma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz,
|
||||
&ring->phys_pdma, GFP_KERNEL);
|
||||
if (!ring->dma_pdma)
|
||||
@@ -1810,13 +1899,11 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1818,13 +1907,11 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
struct mtk_rx_ring *ring;
|
||||
int rx_data_len, rx_dma_size;
|
||||
int i;
|
||||
@@ -338,7 +338,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
} else {
|
||||
ring = ð->rx_ring[ring_no];
|
||||
}
|
||||
@@ -1852,7 +1939,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1860,7 +1947,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < rx_dma_size; i++) {
|
||||
@@ -347,7 +347,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
dma_addr_t dma_addr = dma_map_single(eth->dma_dev,
|
||||
ring->data[i] + NET_SKB_PAD + eth->ip_align,
|
||||
@@ -1867,26 +1954,47 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1875,26 +1962,47 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
|
||||
rxd->rxd2 = RX_DMA_LSO;
|
||||
else
|
||||
@@ -403,7 +403,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2311,7 +2419,7 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
@@ -2319,7 +2427,7 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
eth->rx_events++;
|
||||
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
||||
__napi_schedule(ð->rx_napi);
|
||||
@@ -412,7 +412,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -2335,8 +2443,10 @@ static irqreturn_t mtk_handle_irq(int ir
|
||||
@@ -2343,8 +2451,10 @@ static irqreturn_t mtk_handle_irq(int ir
|
||||
struct mtk_eth *eth = _eth;
|
||||
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
|
||||
|
||||
@@ -425,7 +425,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mtk_handle_irq_rx(irq, _eth);
|
||||
}
|
||||
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
|
||||
@@ -2354,16 +2464,16 @@ static void mtk_poll_controller(struct n
|
||||
@@ -2362,16 +2472,16 @@ static void mtk_poll_controller(struct n
|
||||
struct mtk_eth *eth = mac->hw;
|
||||
|
||||
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
||||
@@ -445,7 +445,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
|
||||
int err;
|
||||
|
||||
@@ -2374,12 +2484,19 @@ static int mtk_start_dma(struct mtk_eth
|
||||
@@ -2382,12 +2492,19 @@ static int mtk_start_dma(struct mtk_eth
|
||||
}
|
||||
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
|
||||
@@ -471,7 +471,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mtk_w32(eth,
|
||||
MTK_RX_DMA_EN | rx_2b_offset |
|
||||
MTK_RX_BT_32DWORDS | MTK_MULTI_EN,
|
||||
@@ -2453,7 +2570,7 @@ static int mtk_open(struct net_device *d
|
||||
@@ -2461,7 +2578,7 @@ static int mtk_open(struct net_device *d
|
||||
napi_enable(ð->tx_napi);
|
||||
napi_enable(ð->rx_napi);
|
||||
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
|
||||
@@ -480,7 +480,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
refcount_set(ð->dma_refcnt, 1);
|
||||
}
|
||||
else
|
||||
@@ -2505,7 +2622,7 @@ static int mtk_stop(struct net_device *d
|
||||
@@ -2513,7 +2630,7 @@ static int mtk_stop(struct net_device *d
|
||||
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
|
||||
|
||||
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
||||
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
napi_disable(ð->tx_napi);
|
||||
napi_disable(ð->rx_napi);
|
||||
|
||||
@@ -2665,9 +2782,25 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -2673,9 +2790,25 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (eth->pctl) {
|
||||
/* Set GE2 driving and slew rate */
|
||||
@@ -2706,11 +2839,47 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -2714,11 +2847,47 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
|
||||
/* FE int grouping */
|
||||
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
|
||||
@@ -568,7 +568,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return 0;
|
||||
|
||||
err_disable_pm:
|
||||
@@ -3240,12 +3409,8 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3248,12 +3417,8 @@ static int mtk_probe(struct platform_dev
|
||||
if (IS_ERR(eth->base))
|
||||
return PTR_ERR(eth->base);
|
||||
|
||||
@@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
spin_lock_init(ð->page_lock);
|
||||
spin_lock_init(ð->tx_irq_lock);
|
||||
@@ -3481,6 +3646,10 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -3489,6 +3654,10 @@ static const struct mtk_soc_data mt2701_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
@@ -593,7 +593,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3494,6 +3663,10 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -3502,6 +3671,10 @@ static const struct mtk_soc_data mt7621_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
@@ -604,7 +604,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3508,6 +3681,10 @@ static const struct mtk_soc_data mt7622_
|
||||
@@ -3516,6 +3689,10 @@ static const struct mtk_soc_data mt7622_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
@@ -615,7 +615,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3521,6 +3698,10 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -3529,6 +3706,10 @@ static const struct mtk_soc_data mt7623_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
@@ -626,7 +626,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3534,6 +3715,10 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -3542,6 +3723,10 @@ static const struct mtk_soc_data mt7629_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
@@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3546,6 +3731,10 @@ static const struct mtk_soc_data rt5350_
|
||||
@@ -3554,6 +3739,10 @@ static const struct mtk_soc_data rt5350_
|
||||
.txrx = {
|
||||
.txd_size = sizeof(struct mtk_tx_dma),
|
||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||
|
||||
@@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
static void mtk_tx_unmap(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf,
|
||||
@@ -1399,7 +1395,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
|
||||
@@ -1407,7 +1403,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
|
||||
|
||||
ring = ð->rx_ring[i];
|
||||
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (rxd->rxd2 & RX_DMA_DONE) {
|
||||
ring->calc_idx_update = true;
|
||||
return ring;
|
||||
@@ -1451,7 +1447,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -1459,7 +1455,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
goto rx_done;
|
||||
|
||||
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
data = ring->data[idx];
|
||||
|
||||
if (!mtk_rx_get_desc(eth, &trxd, rxd))
|
||||
@@ -1658,7 +1654,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
@@ -1666,7 +1662,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
|
||||
mtk_tx_unmap(eth, tx_buf, true);
|
||||
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->last_free = desc;
|
||||
atomic_inc(&ring->free_count);
|
||||
|
||||
@@ -1803,7 +1799,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1811,7 +1807,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
int next = (i + 1) % MTK_DMA_SIZE;
|
||||
u32 next_ptr = ring->phys + next * sz;
|
||||
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
txd->txd2 = next_ptr;
|
||||
txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
|
||||
txd->txd4 = 0;
|
||||
@@ -1833,7 +1829,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -1841,7 +1837,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
|
||||
ring->dma_size = MTK_DMA_SIZE;
|
||||
atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ring->last_free = (void *)txd;
|
||||
ring->last_free_ptr = (u32)(ring->phys + ((MTK_DMA_SIZE - 1) * sz));
|
||||
ring->thresh = MAX_SKB_FRAGS;
|
||||
@@ -1948,7 +1944,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
@@ -1956,7 +1952,7 @@ static int mtk_rx_alloc(struct mtk_eth *
|
||||
if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr)))
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -104,7 +104,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rxd->rxd1 = (unsigned int)dma_addr;
|
||||
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
|
||||
@@ -2010,7 +2006,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
@@ -2018,7 +2014,7 @@ static void mtk_rx_clean(struct mtk_eth
|
||||
if (!ring->data[i])
|
||||
continue;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
|
||||
@@ -3718,6 +3755,21 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -3726,6 +3763,21 @@ static const struct mtk_soc_data mt7629_
|
||||
},
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct mtk_soc_data rt5350_data = {
|
||||
.reg_map = &mt7628_reg_map,
|
||||
.caps = MT7628_CAPS,
|
||||
@@ -3740,6 +3792,7 @@ const struct of_device_id of_mtk_match[]
|
||||
@@ -3748,6 +3800,7 @@ const struct of_device_id of_mtk_match[]
|
||||
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
||||
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
||||
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user