kernel: bump to 4.9.248, 4.14.212, 4.19.163

Remove upstreamed:
 - target/linux/generic/backport-4.14/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch
 - target/linux/generic/backport-4.19/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch
 - target/linux/generic/backport-4.9/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch

Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
CN_SZTL 2020-12-19 21:11:50 +08:00
parent 36f27036e3
commit 07c5ef44a4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
25 changed files with 59 additions and 191 deletions

View File

@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-4.9 = .247
LINUX_VERSION-4.14 = .210
LINUX_VERSION-4.19 = .161
LINUX_VERSION-4.9 = .248
LINUX_VERSION-4.14 = .212
LINUX_VERSION-4.19 = .163
LINUX_KERNEL_HASH-4.9.247 = f73aeb0046a94c6cedcc3edc07d5609f1fc64a38c445983a68bf5d84f56acfd6
LINUX_KERNEL_HASH-4.14.210 = f91851d0b43c39732f9ee3afa1850145aee21e3bc71b3bf4b9a0b8a74dc4fd18
LINUX_KERNEL_HASH-4.19.161 = 07412995966899dda7842b808937b55884106465545a162d6f31f3f4ebd43c41
LINUX_KERNEL_HASH-4.9.248 = 4687268061c9933c298b30d28e4bf1a30dfbab7c0da4bee194968e4f81ffeccf
LINUX_KERNEL_HASH-4.14.212 = 0e1bc32c4842c3bbee3a15454408f528acd4d3c5e83312b93008d5ee2e9a0c79
LINUX_KERNEL_HASH-4.19.163 = 3eeec4e5eb8a129be3536357ecb028fae7d82fac933dcfac0b6089ee398fc5fc
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -598,7 +598,7 @@
#include <net/if_inet6.h>
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -125,9 +125,9 @@ static inline int IP6_ECN_set_ce(struct
@@ -126,9 +126,9 @@ static inline int IP6_ECN_set_ce(struct
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
return 0;
@ -610,7 +610,7 @@
if (skb->ip_summed == CHECKSUM_COMPLETE)
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
(__force __wsum)to);
@@ -136,7 +136,7 @@ static inline int IP6_ECN_set_ce(struct
@@ -137,7 +137,7 @@ static inline int IP6_ECN_set_ce(struct
static inline void IP6_ECN_clear(struct ipv6hdr *iph)
{

View File

@ -589,7 +589,7 @@
#include <linux/netdevice.h>
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -124,9 +124,9 @@ static inline int IP6_ECN_set_ce(struct
@@ -125,9 +125,9 @@ static inline int IP6_ECN_set_ce(struct
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
return 0;
@ -601,7 +601,7 @@
if (skb->ip_summed == CHECKSUM_COMPLETE)
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
(__force __wsum)to);
@@ -135,7 +135,7 @@ static inline int IP6_ECN_set_ce(struct
@@ -136,7 +136,7 @@ static inline int IP6_ECN_set_ce(struct
static inline void IP6_ECN_clear(struct ipv6hdr *iph)
{
@ -771,7 +771,7 @@
static struct fib6_node *node_alloc(void)
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -462,7 +462,7 @@ static void tcp_sack(const struct sk_buf
@@ -460,7 +460,7 @@ static void tcp_sack(const struct sk_buf
/* Fast path for timestamp-only option */
if (length == TCPOLEN_TSTAMP_ALIGNED

View File

@ -578,7 +578,7 @@
#include <net/if_inet6.h>
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -125,9 +125,9 @@ static inline int IP6_ECN_set_ce(struct
@@ -126,9 +126,9 @@ static inline int IP6_ECN_set_ce(struct
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
return 0;
@ -590,7 +590,7 @@
if (skb->ip_summed == CHECKSUM_COMPLETE)
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
(__force __wsum)to);
@@ -136,7 +136,7 @@ static inline int IP6_ECN_set_ce(struct
@@ -137,7 +137,7 @@ static inline int IP6_ECN_set_ce(struct
static inline void IP6_ECN_clear(struct ipv6hdr *iph)
{

View File

@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
/* Read as many bytes as possible from FIFO */
bcm2835_rd_fifo(bs);
/* Write as many bytes as possible to FIFO */
@@ -756,7 +760,8 @@ static int bcm2835_spi_probe(struct plat
@@ -753,7 +757,8 @@ static int bcm2835_spi_probe(struct plat
bcm2835_wr(bs, BCM2835_SPI_CS,
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);

View File

@ -26,7 +26,7 @@
obj-$(CONFIG_SPI_DLN2) += spi-dln2.o
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -799,6 +799,10 @@ struct spi_transfer {
@@ -818,6 +818,10 @@ struct spi_transfer {
u32 speed_hz;
struct list_head transfer_list;

View File

@ -26,7 +26,7 @@
obj-$(CONFIG_SPI_DLN2) += spi-dln2.o
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -795,6 +795,10 @@ struct spi_transfer {
@@ -814,6 +814,10 @@ struct spi_transfer {
u32 speed_hz;
struct list_head transfer_list;

View File

@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2011,7 +2011,8 @@ static const struct usb_device_id option
@@ -2012,7 +2012,8 @@ static const struct usb_device_id option
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },

View File

@ -92,7 +92,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#endif
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -991,7 +991,7 @@ int br_nf_hook_thresh(unsigned int hook,
@@ -994,7 +994,7 @@ int br_nf_hook_thresh(unsigned int hook,
unsigned int i;
int ret;

View File

@ -1,44 +0,0 @@
From: Yves-Alexis Perez <corsac@corsac.net>
Subject: [PATCH] usbnet: ipheth: fix connectivity with iOS 14
Date: Thu, 19 Nov 2020 18:24:39 +0100
Archived-At: <https://lore.kernel.org/stable/20201119172439.94988-1-corsac@corsac.net/>
List-Post: <mailto:stable@vger.kernel.org>
Starting with iOS 14 released in September 2020, connectivity using the
personal hotspot USB tethering function of iOS devices is broken.
Communication between the host and the device (for example ICMP traffic
or DNS resolution using the DNS service running in the device itself)
works fine, but communication to endpoints further away doesn't work.
Investigation on the matter shows that UDP and ICMP traffic from the
tethered host is reaching the Internet at all. For TCP traffic there are
exchanges between tethered host and server but packets are modified in
transit leading to impossible communication.
After some trials Matti Vuorela discovered that reducing the URB buffer
size by two bytes restored the previous behavior. While a better
solution might exist to fix the issue, since the protocol is not
publicly documented and considering the small size of the fix, let's do
that.
Tested-by: Matti Vuorela <matti.vuorela@bitfactor.fi>
Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>
Link: https://lore.kernel.org/linux-usb/CAAn0qaXmysJ9vx3ZEMkViv_B19ju-_ExN8Yn_uSefxpjS6g4Lw@mail.gmail.com/
Link: https://github.com/libimobiledevice/libimobiledevice/issues/1038
Cc: stable@vger.kernel.org
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -70,7 +70,7 @@
#define IPHETH_USBINTF_SUBCLASS 253
#define IPHETH_USBINTF_PROTO 1
-#define IPHETH_BUF_SIZE 1516
+#define IPHETH_BUF_SIZE 1514
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
#define IPHETH_TX_TIMEOUT (5 * HZ)

View File

@ -1,44 +0,0 @@
From: Yves-Alexis Perez <corsac@corsac.net>
Subject: [PATCH] usbnet: ipheth: fix connectivity with iOS 14
Date: Thu, 19 Nov 2020 18:24:39 +0100
Archived-At: <https://lore.kernel.org/stable/20201119172439.94988-1-corsac@corsac.net/>
List-Post: <mailto:stable@vger.kernel.org>
Starting with iOS 14 released in September 2020, connectivity using the
personal hotspot USB tethering function of iOS devices is broken.
Communication between the host and the device (for example ICMP traffic
or DNS resolution using the DNS service running in the device itself)
works fine, but communication to endpoints further away doesn't work.
Investigation on the matter shows that UDP and ICMP traffic from the
tethered host is reaching the Internet at all. For TCP traffic there are
exchanges between tethered host and server but packets are modified in
transit leading to impossible communication.
After some trials Matti Vuorela discovered that reducing the URB buffer
size by two bytes restored the previous behavior. While a better
solution might exist to fix the issue, since the protocol is not
publicly documented and considering the small size of the fix, let's do
that.
Tested-by: Matti Vuorela <matti.vuorela@bitfactor.fi>
Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>
Link: https://lore.kernel.org/linux-usb/CAAn0qaXmysJ9vx3ZEMkViv_B19ju-_ExN8Yn_uSefxpjS6g4Lw@mail.gmail.com/
Link: https://github.com/libimobiledevice/libimobiledevice/issues/1038
Cc: stable@vger.kernel.org
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -70,7 +70,7 @@
#define IPHETH_USBINTF_SUBCLASS 253
#define IPHETH_USBINTF_PROTO 1
-#define IPHETH_BUF_SIZE 1516
+#define IPHETH_BUF_SIZE 1514
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
#define IPHETH_TX_TIMEOUT (5 * HZ)

View File

@ -712,7 +712,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* then check once more to make sure we are done.
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1028,7 +1028,7 @@ restart_poll:
@@ -1034,7 +1034,7 @@ restart_poll:
if (frames_processed < budget) {
enable_scrq_irq(adapter, adapter->rx_scrq[scrq_num]);
@ -949,7 +949,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1575,7 +1575,7 @@ static int pasemi_mac_poll(struct napi_s
@@ -1579,7 +1579,7 @@ static int pasemi_mac_poll(struct napi_s
pkts = pasemi_mac_clean_rx(rx_ring(mac), budget);
if (pkts < budget) {
/* all done, no more packets present */

View File

@ -1,44 +0,0 @@
From: Yves-Alexis Perez <corsac@corsac.net>
Subject: [PATCH] usbnet: ipheth: fix connectivity with iOS 14
Date: Thu, 19 Nov 2020 18:24:39 +0100
Archived-At: <https://lore.kernel.org/stable/20201119172439.94988-1-corsac@corsac.net/>
List-Post: <mailto:stable@vger.kernel.org>
Starting with iOS 14 released in September 2020, connectivity using the
personal hotspot USB tethering function of iOS devices is broken.
Communication between the host and the device (for example ICMP traffic
or DNS resolution using the DNS service running in the device itself)
works fine, but communication to endpoints further away doesn't work.
Investigation on the matter shows that UDP and ICMP traffic from the
tethered host is reaching the Internet at all. For TCP traffic there are
exchanges between tethered host and server but packets are modified in
transit leading to impossible communication.
After some trials Matti Vuorela discovered that reducing the URB buffer
size by two bytes restored the previous behavior. While a better
solution might exist to fix the issue, since the protocol is not
publicly documented and considering the small size of the fix, let's do
that.
Tested-by: Matti Vuorela <matti.vuorela@bitfactor.fi>
Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>
Link: https://lore.kernel.org/linux-usb/CAAn0qaXmysJ9vx3ZEMkViv_B19ju-_ExN8Yn_uSefxpjS6g4Lw@mail.gmail.com/
Link: https://github.com/libimobiledevice/libimobiledevice/issues/1038
Cc: stable@vger.kernel.org
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -70,7 +70,7 @@
#define IPHETH_USBINTF_SUBCLASS 253
#define IPHETH_USBINTF_PROTO 1
-#define IPHETH_BUF_SIZE 1516
+#define IPHETH_BUF_SIZE 1514
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
#define IPHETH_TX_TIMEOUT (5 * HZ)

View File

@ -18,7 +18,7 @@
/* 4G Systems products */
/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick *
@@ -577,6 +578,16 @@ static void option_instat_callback(struc
@@ -578,6 +579,16 @@ static void option_instat_callback(struc
/* Device needs ZLP */
#define ZLP BIT(17)
@ -35,7 +35,7 @@
static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
@@ -611,6 +622,8 @@ static const struct usb_device_id option
@@ -612,6 +623,8 @@ static const struct usb_device_id option
{ USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
{ USB_DEVICE(QUANTA_VENDOR_ID, 0xea42),
.driver_info = RSVD(4) },

View File

@ -18,7 +18,7 @@
/* 4G Systems products */
/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick *
@@ -574,6 +575,16 @@ static void option_instat_callback(struc
@@ -575,6 +576,16 @@ static void option_instat_callback(struc
/* Device needs ZLP */
#define ZLP BIT(17)
@ -35,7 +35,7 @@
static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
@@ -608,6 +619,8 @@ static const struct usb_device_id option
@@ -609,6 +620,8 @@ static const struct usb_device_id option
{ USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
{ USB_DEVICE(QUANTA_VENDOR_ID, 0xea42),
.driver_info = RSVD(4) },

View File

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

View File

@ -27,7 +27,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
struct dma_pool *dpool;
struct qup_i2c_tag start_tag;
struct qup_i2c_bam brx;
@@ -1288,7 +1290,7 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1289,7 +1291,7 @@ static int qup_i2c_xfer_v2(struct i2c_ad
int num)
{
struct qup_i2c_dev *qup = i2c_get_adapdata(adap);
@ -36,7 +36,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup->bus_err = 0;
qup->qup_err = 0;
@@ -1317,13 +1319,12 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1318,13 +1320,12 @@ static int qup_i2c_xfer_v2(struct i2c_ad
len = (msgs[idx].len > qup->out_fifo_sz) ||
(msgs[idx].len > qup->in_fifo_sz);
@ -54,7 +54,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
}
idx = 0;
@@ -1347,15 +1348,17 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1348,15 +1349,17 @@ static int qup_i2c_xfer_v2(struct i2c_ad
reinit_completion(&qup->xfer);

View File

@ -149,7 +149,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
DMA_PREP_INTERRUPT);
if (!rxd) {
dev_err(qup->dev, "failed to get rx desc\n");
@@ -844,7 +838,7 @@ static int qup_i2c_bam_do_xfer(struct qu
@@ -845,7 +839,7 @@ static int qup_i2c_bam_do_xfer(struct qu
goto desc_err;
}
@ -158,7 +158,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
writel(QUP_BAM_INPUT_EOT,
qup->base + QUP_OUT_FIFO_BASE);
@@ -862,10 +856,10 @@ static int qup_i2c_bam_do_xfer(struct qu
@@ -863,10 +857,10 @@ static int qup_i2c_bam_do_xfer(struct qu
}
desc_err:

View File

@ -67,7 +67,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
goto done;
}
@@ -847,20 +862,12 @@ static int qup_i2c_bam_do_xfer(struct qu
@@ -848,20 +863,12 @@ static int qup_i2c_bam_do_xfer(struct qu
goto desc_err;
}

View File

@ -22,7 +22,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1300,7 +1300,8 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1301,7 +1301,8 @@ static int qup_i2c_xfer_v2(struct i2c_ad
int num)
{
struct qup_i2c_dev *qup = i2c_get_adapdata(adap);
@ -32,7 +32,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup->bus_err = 0;
qup->qup_err = 0;
@@ -1326,14 +1327,14 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1327,14 +1328,14 @@ static int qup_i2c_xfer_v2(struct i2c_ad
goto out;
}

View File

@ -50,7 +50,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
dev_err(qup->dev, "normal trans timed out\n");
ret = -ETIMEDOUT;
}
@@ -1605,6 +1610,8 @@ nodma:
@@ -1606,6 +1611,8 @@ nodma:
*/
one_bit_t = (USEC_PER_SEC / clk_freq) + 1;
qup->one_byte_t = one_bit_t * 9;

View File

@ -233,7 +233,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
/* schedule the EOT and FLUSH I2C tags */
len = 1;
if (rx_cnt) {
@@ -886,11 +878,19 @@ desc_err:
@@ -887,11 +879,19 @@ desc_err:
return ret;
}
@ -253,7 +253,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
enable_irq(qup->irq);
ret = qup_i2c_req_dma(qup);
@@ -913,9 +913,34 @@ static int qup_i2c_bam_xfer(struct i2c_a
@@ -914,9 +914,34 @@ static int qup_i2c_bam_xfer(struct i2c_a
goto out;
writel(qup->clk_ctl, qup->base + QUP_I2C_CLK_CTL);
@ -290,7 +290,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
out:
disable_irq(qup->irq);
@@ -1468,7 +1493,8 @@ static int qup_i2c_probe(struct platform
@@ -1469,7 +1494,8 @@ static int qup_i2c_probe(struct platform
else if (ret != 0)
goto nodma;
@ -300,7 +300,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup->btx.sg = devm_kzalloc(&pdev->dev,
sizeof(*qup->btx.sg) * blocks,
GFP_KERNEL);
@@ -1611,7 +1637,7 @@ nodma:
@@ -1612,7 +1638,7 @@ nodma:
one_bit_t = (USEC_PER_SEC / clk_freq) + 1;
qup->one_byte_t = one_bit_t * 9;
qup->xfer_timeout = TOUT_MIN * HZ +

View File

@ -283,7 +283,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
}
static void qup_i2c_set_blk_data(struct qup_i2c_dev *qup,
@@ -1006,64 +1075,6 @@ err:
@@ -1007,64 +1076,6 @@ err:
return ret;
}
@ -348,7 +348,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
static void qup_i2c_set_read_mode_v2(struct qup_i2c_dev *qup, int len)
{
int tx_len = qup->blk.tx_tag_len;
@@ -1086,44 +1097,27 @@ static void qup_i2c_set_read_mode_v2(str
@@ -1087,44 +1098,27 @@ static void qup_i2c_set_read_mode_v2(str
}
}
@ -402,7 +402,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
}
static int qup_i2c_read_fifo_v2(struct qup_i2c_dev *qup,
@@ -1224,49 +1218,130 @@ err:
@@ -1225,49 +1219,130 @@ err:
return ret;
}
@ -552,7 +552,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
static int qup_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg msgs[],
int num)
@@ -1305,10 +1380,11 @@ static int qup_i2c_xfer(struct i2c_adapt
@@ -1306,10 +1381,11 @@ static int qup_i2c_xfer(struct i2c_adapt
goto out;
}
@ -566,7 +566,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
if (ret)
break;
@@ -1487,6 +1563,10 @@ static int qup_i2c_probe(struct platform
@@ -1488,6 +1564,10 @@ static int qup_i2c_probe(struct platform
if (of_device_is_compatible(pdev->dev.of_node, "qcom,i2c-qup-v1.1.1")) {
qup->adap.algo = &qup_i2c_algo;
qup->adap.quirks = &qup_i2c_quirks;

View File

@ -386,7 +386,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup_i2c_set_blk_data(qup, msg);
blocks = qup->blk.count;
@@ -1026,7 +897,7 @@ static int qup_i2c_wait_for_complete(str
@@ -1027,7 +898,7 @@ static int qup_i2c_wait_for_complete(str
unsigned long left;
int ret = 0;
@ -395,7 +395,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
if (!left) {
writel(1, qup->base + QUP_SW_RESET);
ret = -ETIMEDOUT;
@@ -1038,65 +909,6 @@ static int qup_i2c_wait_for_complete(str
@@ -1039,65 +910,6 @@ static int qup_i2c_wait_for_complete(str
return ret;
}
@ -461,7 +461,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
static void qup_i2c_read_rx_fifo_v1(struct qup_i2c_dev *qup)
{
struct qup_i2c_block *blk = &qup->blk;
@@ -1120,104 +932,6 @@ static void qup_i2c_read_rx_fifo_v1(stru
@@ -1121,104 +933,6 @@ static void qup_i2c_read_rx_fifo_v1(stru
blk->rx_bytes_read = true;
}
@ -566,7 +566,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
static void qup_i2c_write_rx_tags_v1(struct qup_i2c_dev *qup)
{
struct i2c_msg *msg = qup->msg;
@@ -1404,13 +1118,434 @@ out:
@@ -1405,13 +1119,434 @@ out:
return ret;
}
@ -1002,7 +1002,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup->bus_err = 0;
qup->qup_err = 0;
@@ -1419,6 +1554,10 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1420,6 +1555,10 @@ static int qup_i2c_xfer_v2(struct i2c_ad
if (ret < 0)
goto out;
@ -1013,7 +1013,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
writel(1, qup->base + QUP_SW_RESET);
ret = qup_i2c_poll_state(qup, QUP_RESET_STATE);
if (ret)
@@ -1428,60 +1567,35 @@ static int qup_i2c_xfer_v2(struct i2c_ad
@@ -1429,60 +1568,35 @@ static int qup_i2c_xfer_v2(struct i2c_ad
writel(I2C_MINI_CORE | I2C_N_VAL_V2, qup->base + QUP_CONFIG);
writel(QUP_V2_TAGS_EN, qup->base + QUP_I2C_MASTER_GEN);
@ -1095,7 +1095,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
if (ret == 0)
ret = num;
@@ -1545,6 +1659,7 @@ static int qup_i2c_probe(struct platform
@@ -1546,6 +1660,7 @@ static int qup_i2c_probe(struct platform
u32 src_clk_freq = DEFAULT_SRC_CLK;
u32 clk_freq = DEFAULT_CLK_FREQ;
int blocks;
@ -1103,7 +1103,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
qup = devm_kzalloc(&pdev->dev, sizeof(*qup), GFP_KERNEL);
if (!qup)
@@ -1563,12 +1678,10 @@ static int qup_i2c_probe(struct platform
@@ -1564,12 +1679,10 @@ static int qup_i2c_probe(struct platform
if (of_device_is_compatible(pdev->dev.of_node, "qcom,i2c-qup-v1.1.1")) {
qup->adap.algo = &qup_i2c_algo;
qup->adap.quirks = &qup_i2c_quirks;
@ -1118,7 +1118,7 @@ Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
ret = qup_i2c_req_dma(qup);
if (ret == -EPROBE_DEFER)
@@ -1694,14 +1807,31 @@ nodma:
@@ -1695,14 +1808,31 @@ nodma:
ret = -EIO;
goto fail;
}

View File

@ -174,7 +174,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
}
static void i2c_imx_dma_callback(void *arg)
@@ -890,6 +954,78 @@ static int i2c_imx_read(struct imx_i2c_s
@@ -910,6 +974,78 @@ static int i2c_imx_read(struct imx_i2c_s
return 0;
}
@ -253,7 +253,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
static int i2c_imx_xfer(struct i2c_adapter *adapter,
struct i2c_msg *msgs, int num)
{
@@ -900,6 +1036,19 @@ static int i2c_imx_xfer(struct i2c_adapt
@@ -920,6 +1056,19 @@ static int i2c_imx_xfer(struct i2c_adapt
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
@ -273,7 +273,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
if (result < 0)
goto out;
@@ -1042,6 +1191,50 @@ static int i2c_imx_init_recovery_info(st
@@ -1062,6 +1211,50 @@ static int i2c_imx_init_recovery_info(st
return 0;
}
@ -324,7 +324,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
static u32 i2c_imx_func(struct i2c_adapter *adapter)
{
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL
@@ -1097,6 +1290,11 @@ static int i2c_imx_probe(struct platform
@@ -1117,6 +1310,11 @@ static int i2c_imx_probe(struct platform
i2c_imx->adapter.dev.of_node = pdev->dev.of_node;
i2c_imx->base = base;
@ -336,7 +336,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
/* Get I2C clock */
i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(i2c_imx->clk)) {
@@ -1166,17 +1364,25 @@ static int i2c_imx_probe(struct platform
@@ -1186,17 +1384,25 @@ static int i2c_imx_probe(struct platform
pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_put_autosuspend(&pdev->dev);