提交 707e6ed1 编写于 作者: C coolsnowwolf

kernel: update to 4.14.187, 4.19.131, 5.4.50

上级 40c8226f
......@@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-4.14 = .180
LINUX_VERSION-4.19 = .123
LINUX_VERSION-5.4 = .48
LINUX_VERSION-4.14 = .187
LINUX_VERSION-4.19 = .131
LINUX_VERSION-5.4 = .50
LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e
LINUX_KERNEL_HASH-4.19.123 = a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f
LINUX_KERNEL_HASH-5.4.48 = bf20ddafcd04c114d34654bb10d1eb74f1864f3d14b676c6f0d42d60bbcf1d53
LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
LINUX_KERNEL_HASH-4.19.131 = 19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba
LINUX_KERNEL_HASH-5.4.50 = ad10f4c1e900f4e3eb4903b65dbcb4ca74250de63aa9fa7105b9b3c3f9a8a6e2
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
......
--- a/arch/powerpc/platforms/4xx/pci.c
+++ b/arch/powerpc/platforms/4xx/pci.c
@@ -1905,9 +1905,9 @@ static void __init ppc4xx_configure_pcie
@@ -1903,9 +1903,9 @@ static void __init ppc4xx_configure_pcie
* if it works
*/
out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
......
--- a/arch/powerpc/platforms/4xx/pci.c
+++ b/arch/powerpc/platforms/4xx/pci.c
@@ -1904,9 +1904,9 @@ static void __init ppc4xx_configure_pcie
@@ -1902,9 +1902,9 @@ static void __init ppc4xx_configure_pcie
* if it works
*/
out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
......
......@@ -1566,7 +1566,7 @@ ar934x_nfc_remove(struct platform_device *pdev)
nfc = platform_get_drvdata(pdev);
if (nfc) {
mtd = ar934x_nfc_to_mtd(nfc);
nand_release(mtd);
nand_release(&nfc->nand_chip);
ar934x_nfc_free_buf(nfc);
free_irq(nfc->irq, nfc);
}
......
......@@ -335,7 +335,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
......@@ -356,7 +356,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&info->chip));
platform_set_drvdata(pdev, NULL);
kfree(info);
gpio_free(RB4XX_NAND_GPIO_NCE);
......
......@@ -393,7 +393,7 @@ static int rb750_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
......@@ -405,7 +405,7 @@ static int rb750_nand_remove(struct platform_device *pdev)
{
struct rb750_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&info->chip);
platform_set_drvdata(pdev, NULL);
kfree(info);
......
......@@ -434,7 +434,7 @@ static int rb91x_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&rbni->chip);
return ret;
}
......@@ -442,7 +442,7 @@ static int rb91x_nand_remove(struct platform_device *pdev)
{
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&rbni->chip);
return 0;
}
......
......@@ -276,7 +276,7 @@
case IPV6_2292HOPOPTS:
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s
@@ -400,7 +400,7 @@ static void ip6gre_err(struct sk_buff *s
return;
ipv6h = (const struct ipv6hdr *)skb->data;
greh = (const struct gre_base_hdr *)(skb->data + offset);
......@@ -850,7 +850,7 @@
*sum = csum_fold(csum_partial(diff, sizeof(diff),
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1868,15 +1868,15 @@ static int vxlan_build_skb(struct sk_buf
@@ -1872,15 +1872,15 @@ static int vxlan_build_skb(struct sk_buf
return err;
vxh = __skb_push(skb, sizeof(*vxh));
......
......@@ -1535,9 +1535,12 @@ static int ar934x_nfc_probe(struct platform_device *pdev)
goto err_free_buf;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 130)
nand->dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(mtd, 1);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
nand->dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(nand, 1);
#else
nand->legacy.dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(nand, 1);
......@@ -1569,12 +1572,7 @@ static int ar934x_nfc_remove(struct platform_device *pdev)
nfc = platform_get_drvdata(pdev);
if (nfc) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
mtd = ar934x_nfc_to_mtd(nfc);
nand_release(mtd);
#else
nand_release(&nfc->nand_chip);
#endif
ar934x_nfc_free_buf(nfc);
}
......
......@@ -232,7 +232,11 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
nand->chip.dev_ready = rb4xx_nand_dev_ready;
nand->chip.chip_delay = 25;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,130)
ret = nand_scan(mtd, 1);
#else
ret = nand_scan(&nand->chip, 1);
#endif
#else
nand->chip.legacy.read_byte = rb4xx_nand_read_byte;
nand->chip.legacy.write_buf = rb4xx_nand_write_buf;
......@@ -248,11 +252,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
nand_release(mtd);
#else
nand_release(&nand->chip);
#endif
return ret;
}
......@@ -263,11 +263,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand *nand = platform_get_drvdata(pdev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
nand_release(nand_to_mtd(&nand->chip));
#else
nand_release(&nand->chip);
#endif
return 0;
}
......
......@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -161,6 +161,11 @@ static int ehci_platform_probe(struct pl
@@ -271,6 +271,11 @@ static int ehci_platform_probe(struct pl
ehci = hcd_to_ehci(hcd);
if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
......
......@@ -267,7 +267,7 @@
case IPV6_2292HOPOPTS:
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -452,7 +452,7 @@ static void ip6gre_err(struct sk_buff *s
@@ -455,7 +455,7 @@ static void ip6gre_err(struct sk_buff *s
return;
ipv6h = (const struct ipv6hdr *)skb->data;
greh = (const struct gre_base_hdr *)(skb->data + offset);
......@@ -728,7 +728,7 @@
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -3906,14 +3906,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
......
......@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -159,6 +159,11 @@ static int ehci_platform_probe(struct pl
@@ -269,6 +269,11 @@ static int ehci_platform_probe(struct pl
ehci = hcd_to_ehci(hcd);
if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
......
......@@ -706,7 +706,7 @@
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3958,14 +3958,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -3968,14 +3968,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
......
......@@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
- reg
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2659,6 +2659,11 @@ static int pl011_probe(struct amba_devic
@@ -2660,6 +2660,11 @@ static int pl011_probe(struct amba_devic
if (IS_ERR(uap->clk))
return PTR_ERR(uap->clk);
......
......@@ -26,7 +26,7 @@ Signed-off-by: Phil Howard <phil@pimoroni.com>
struct nvmem_config nvmem_cfg = {
.name = "rv3028_nvram",
.word_size = 1,
@@ -669,6 +671,21 @@ static int rv3028_probe(struct i2c_clien
@@ -671,6 +673,21 @@ static int rv3028_probe(struct i2c_clien
if (ret)
return ret;
......
......@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2151,7 +2151,7 @@ static void bcmgenet_init_tx_ring(struct
@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
......@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
@@ -3575,9 +3575,12 @@ static int bcmgenet_probe(struct platfor
@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
/* Set default coalescing parameters */
......
......@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1452,6 +1452,103 @@ command_cleanup:
@@ -1453,6 +1453,103 @@ command_cleanup:
}
/*
......@@ -119,7 +119,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
*/
@@ -5327,6 +5424,7 @@ static const struct hc_driver xhci_hc_dr
@@ -5334,6 +5431,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
@@ -1231,6 +1234,9 @@
@@ -1234,6 +1237,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 },
@@ -177,6 +178,7 @@ static const struct hid_device_id hid_qu
@@ -178,6 +179,7 @@ static const struct hid_device_id hid_qu
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
{ 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 },
......
......@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
/* MIPS chips strapped for BE will automagically configure the
@@ -1997,6 +2001,11 @@ static void reset_umac(struct bcmgenet_p
@@ -1995,6 +1999,11 @@ static void reset_umac(struct bcmgenet_p
bcmgenet_rbuf_ctrl_set(priv, 0);
udelay(10);
......
......@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3476,7 +3476,7 @@ static int bcmgenet_probe(struct platfor
@@ -3474,7 +3474,7 @@ static int bcmgenet_probe(struct platfor
priv = netdev_priv(dev);
priv->irq0 = platform_get_irq(pdev, 0);
priv->irq1 = platform_get_irq(pdev, 1);
......
......@@ -65,7 +65,7 @@ Cc: linux-rockchip@lists.infradead.org
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -343,12 +343,8 @@ int dw_pcie_host_init(struct pcie_port *
@@ -345,12 +345,8 @@ int dw_pcie_host_init(struct pcie_port *
if (!bridge)
return -ENOMEM;
......@@ -82,7 +82,7 @@ Cc: linux-rockchip@lists.infradead.org
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1023,7 +1023,8 @@ static int advk_pcie_probe(struct platfo
@@ -1019,7 +1019,8 @@ static int advk_pcie_probe(struct platfo
return ret;
}
......@@ -224,7 +224,7 @@ Cc: linux-rockchip@lists.infradead.org
return ret;
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -1143,7 +1143,8 @@ static int rcar_pcie_probe(struct platfo
@@ -1144,7 +1144,8 @@ static int rcar_pcie_probe(struct platfo
pcie->dev = dev;
platform_set_drvdata(pdev, pcie);
......
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -160,6 +160,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
@@ -160,6 +160,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
{{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"},
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
......@@ -10,24 +10,24 @@
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -384,6 +384,13 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __initconst = {
@@ -385,6 +385,13 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __
/* Netgear */
+static const struct gpio_keys_button
static const struct gpio_keys_button
+bcm47xx_buttons_netgear_r6200_v1[] __initconst = {
+ BCM47XX_GPIO_KEY(2, KEY_RFKILL),
+ BCM47XX_GPIO_KEY(3, KEY_RESTART),
+ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
+};
+
static const struct gpio_keys_button
+static const struct gpio_keys_button
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
BCM47XX_GPIO_KEY(4, KEY_RESTART),
@@ -664,6 +671,9 @@ int __init bcm47xx_buttons_register(void)
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
@@ -664,6 +671,9 @@ int __init bcm47xx_buttons_register(void
err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3);
break;
+ case BCM47XX_BOARD_NETGEAR_R6200_V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
+ break;
......@@ -39,7 +39,7 @@
@@ -98,6 +98,7 @@ enum bcm47xx_board {
BCM47XX_BOARD_MOTOROLA_WR850GP,
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
+ BCM47XX_BOARD_NETGEAR_R6200_V1,
BCM47XX_BOARD_NETGEAR_WGR614V8,
BCM47XX_BOARD_NETGEAR_WGR614V9,
......
......@@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
#include "b53_regs.h"
#include "b53_priv.h"
@@ -1579,6 +1580,28 @@ static int b53_switch_init(struct b53_de
@@ -1587,6 +1588,28 @@ static int b53_switch_init(struct b53_de
return ret;
}
......
......@@ -34,7 +34,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -57,6 +57,9 @@ static int ehci_platform_reset(struct us
@@ -62,6 +62,9 @@ static int ehci_platform_reset(struct us
ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
......
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2634,7 +2634,8 @@ static void pcie_write_mrrs(struct pci_d
@@ -2655,7 +2655,8 @@ static void pcie_write_mrrs(struct pci_d
* In the "safe" case, do not configure the MRRS. There appear to be
* issues with setting MRRS to 0 on a number of devices.
*/
......
......@@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
rwlock_t sk_callback_lock;
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock,
@@ -2750,6 +2750,7 @@ void sock_init_data(struct socket *sock,
sk->sk_max_pacing_rate = ~0U;
sk->sk_pacing_rate = ~0U;
......
......@@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1983,7 +1983,8 @@ static const struct usb_device_id option
@@ -1987,7 +1987,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) },
......
......@@ -48,7 +48,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
#define INADDR_ANY ((unsigned long int) 0x00000000)
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -934,7 +934,7 @@ static int inet_abc_len(__be32 addr)
@@ -935,7 +935,7 @@ static int inet_abc_len(__be32 addr)
{
int rc = -1; /* Something else, probably a multicast. */
......@@ -57,7 +57,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
rc = 0;
else {
__u32 haddr = ntohl(addr);
@@ -945,6 +945,8 @@ static int inet_abc_len(__be32 addr)
@@ -946,6 +946,8 @@ static int inet_abc_len(__be32 addr)
rc = 16;
else if (IN_CLASSC(haddr))
rc = 24;
......
......@@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+
int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
struct flowi6 *fl6);
struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str
......
......@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
struct flowi6 *fl6);
struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -381,28 +381,6 @@ static inline int ip6_forward_finish(str
......
......@@ -48,7 +48,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
#define INADDR_ANY ((unsigned long int) 0x00000000)
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -954,7 +954,7 @@ static int inet_abc_len(__be32 addr)
@@ -955,7 +955,7 @@ static int inet_abc_len(__be32 addr)
{
int rc = -1; /* Something else, probably a multicast. */
......@@ -57,7 +57,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
rc = 0;
else {
__u32 haddr = ntohl(addr);
@@ -965,6 +965,8 @@ static int inet_abc_len(__be32 addr)
@@ -966,6 +966,8 @@ static int inet_abc_len(__be32 addr)
rc = 16;
else if (IN_CLASSC(haddr))
rc = 24;
......
......@@ -83,7 +83,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
q->flows[reduced_hash].dsthost = dsthost_idx;
}
}
@@ -1793,20 +1797,30 @@ static s32 cake_enqueue(struct sk_buff *
@@ -1817,20 +1821,30 @@ static s32 cake_enqueue(struct sk_buff *
b->sparse_flow_count++;
if (cake_dsrc(q->flow_mode))
......@@ -116,7 +116,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
}
if (q->buffer_used > q->buffer_max_used)
@@ -1974,23 +1988,8 @@ retry:
@@ -1998,23 +2012,8 @@ retry:
dsthost = &b->hosts[flow->dsthost];
host_load = 1;
......@@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
/* Keep all flows with deficits out of the sparse and decaying
* rotations. No non-empty flow can go into the decaying
* rotation, so they can't get deficits
@@ -1999,6 +1998,13 @@ retry:
@@ -2023,6 +2022,13 @@ retry:
if (flow->head) {
b->sparse_flow_count--;
b->bulk_flow_count++;
......@@ -154,7 +154,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
flow->set = CAKE_SET_BULK;
} else {
/* we've moved it to the bulk rotation for
@@ -2008,6 +2014,22 @@ retry:
@@ -2032,6 +2038,22 @@ retry:
flow->set = CAKE_SET_SPARSE_WAIT;
}
}
......@@ -177,7 +177,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
goto retry;
}
@@ -2028,6 +2050,13 @@ retry:
@@ -2052,6 +2074,13 @@ retry:
&b->decaying_flows);
if (flow->set == CAKE_SET_BULK) {
b->bulk_flow_count--;
......@@ -191,7 +191,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
b->decaying_flow_count++;
} else if (flow->set == CAKE_SET_SPARSE ||
flow->set == CAKE_SET_SPARSE_WAIT) {
@@ -2041,14 +2070,19 @@ retry:
@@ -2065,14 +2094,19 @@ retry:
if (flow->set == CAKE_SET_SPARSE ||
flow->set == CAKE_SET_SPARSE_WAIT)
b->sparse_flow_count--;
......
......@@ -91,7 +91,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
/* COBALT operates the Codel and BLUE algorithms in parallel, in order to
@@ -2623,6 +2624,13 @@ static int cake_change(struct Qdisc *sch
@@ -2647,6 +2648,13 @@ static int cake_change(struct Qdisc *sch
q->rate_flags &= ~CAKE_FLAG_SPLIT_GSO;
}
......@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (q->tins) {
sch_tree_lock(sch);
cake_reconfigure(sch);
@@ -2782,6 +2790,10 @@ static int cake_dump(struct Qdisc *sch,
@@ -2806,6 +2814,10 @@ static int cake_dump(struct Qdisc *sch,
!!(q->rate_flags & CAKE_FLAG_SPLIT_GSO)))
goto nla_put_failure;
......
......@@ -52,24 +52,24 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
};
/* COBALT operates the Codel and BLUE algorithms in parallel, in order to
@@ -1554,7 +1556,7 @@ static struct cake_tin_data *cake_select
@@ -1573,7 +1575,7 @@ static struct cake_tin_data *cake_select
struct sk_buff *skb)
{
struct cake_sched_data *q = qdisc_priv(sch);
- u32 tin;
+ u32 tin, mark;
bool wash;
u8 dscp;
/* Tin selection: Default to diffserv-based selection, allow overriding
@@ -1562,6 +1564,7 @@ static struct cake_tin_data *cake_select
*/
dscp = cake_handle_diffserv(skb,
q->rate_flags & CAKE_FLAG_WASH);
@@ -1584,6 +1586,7 @@ static struct cake_tin_data *cake_select
wash = !!(q->rate_flags & CAKE_FLAG_WASH);
if (wash)
dscp = cake_handle_diffserv(skb, wash);
+ mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft;
if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT)
tin = 0;
@@ -2178,6 +2181,7 @@ static const struct nla_policy cake_poli
@@ -2202,6 +2205,7 @@ static const struct nla_policy cake_poli
[TCA_CAKE_MPU] = { .type = NLA_U32 },
[TCA_CAKE_INGRESS] = { .type = NLA_U32 },
[TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 },
......@@ -77,7 +77,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
};
static void cake_set_rate(struct cake_tin_data *b, u64 rate, u32 mtu,
@@ -2625,10 +2629,8 @@ static int cake_change(struct Qdisc *sch
@@ -2649,10 +2653,8 @@ static int cake_change(struct Qdisc *sch
}
if (tb[TCA_CAKE_FWMARK]) {
......@@ -90,7 +90,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
}
if (q->tins) {
@@ -2790,8 +2792,7 @@ static int cake_dump(struct Qdisc *sch,
@@ -2814,8 +2816,7 @@ static int cake_dump(struct Qdisc *sch,
!!(q->rate_flags & CAKE_FLAG_SPLIT_GSO)))
goto nla_put_failure;
......
......@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
s32 tin_deficit;
u32 tin_backlog;
u32 tin_dropped;
@@ -1916,7 +1915,7 @@ begin:
@@ -1940,7 +1939,7 @@ begin:
while (b->tin_deficit < 0 ||
!(b->sparse_flow_count + b->bulk_flow_count)) {
if (b->tin_deficit <= 0)
......@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (b->sparse_flow_count + b->bulk_flow_count)
empty = false;
@@ -2237,8 +2236,7 @@ static int cake_config_besteffort(struct
@@ -2261,8 +2260,7 @@ static int cake_config_besteffort(struct
cake_set_rate(b, rate, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2249,8 +2247,7 @@ static int cake_config_precedence(struct
@@ -2273,8 +2271,7 @@ static int cake_config_precedence(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
......@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
@@ -2263,18 +2260,14 @@ static int cake_config_precedence(struct
@@ -2287,18 +2284,14 @@ static int cake_config_precedence(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
......@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2343,8 +2336,7 @@ static int cake_config_diffserv8(struct
@@ -2367,8 +2360,7 @@ static int cake_config_diffserv8(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
......@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
@@ -2360,18 +2352,14 @@ static int cake_config_diffserv8(struct
@@ -2384,18 +2376,14 @@ static int cake_config_diffserv8(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
......@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2410,17 +2398,11 @@ static int cake_config_diffserv4(struct
@@ -2434,17 +2422,11 @@ static int cake_config_diffserv4(struct
cake_set_rate(&q->tins[3], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......@@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2451,15 +2433,10 @@ static int cake_config_diffserv3(struct
@@ -2475,15 +2457,10 @@ static int cake_config_diffserv3(struct
cake_set_rate(&q->tins[2], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......
......@@ -20,7 +20,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2180,6 +2180,7 @@ static const struct nla_policy cake_poli
@@ -2204,6 +2204,7 @@ static const struct nla_policy cake_poli
[TCA_CAKE_MPU] = { .type = NLA_U32 },
[TCA_CAKE_INGRESS] = { .type = NLA_U32 },
[TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 },
......
From 9208d2863ac689a563b92f2161d8d1e7127d0add Mon Sep 17 00:00:00 2001
From: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
Date: Thu, 25 Jun 2020 22:12:07 +0200
Subject: [PATCH] sch_cake: don't try to reallocate or unshare skb
unconditionally
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cake_handle_diffserv() tries to linearize mac and network header parts of
skb and to make it writable unconditionally. In some cases it leads to full
skb reallocation, which reduces throughput and increases CPU load. Some
measurements of IPv4 forward + NAPT on MIPS router with 580 MHz single-core
CPU was conducted. It appears that on kernel 4.9 skb_try_make_writable()
reallocates skb, if skb was allocated in ethernet driver via so-called
'build skb' method from page cache (it was discovered by strange increase
of kmalloc-2048 slab at first).
Obtain DSCP value via read-only skb_header_pointer() call, and leave
linearization only for DSCP bleaching or ECN CE setting. And, as an
additional optimisation, skip diffserv parsing entirely if it is not needed
by the current configuration.
Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
Signed-off-by: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
[ fix a few style issues, reflow commit message ]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 41 ++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1553,30 +1553,49 @@ static unsigned int cake_drop(struct Qdi
static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
{
- int wlen = skb_network_offset(skb);
+ const int offset = skb_network_offset(skb);
+ u16 *buf, buf_;
u8 dscp;
switch (tc_skb_protocol(skb)) {
case htons(ETH_P_IP):
- wlen += sizeof(struct iphdr);
- if (!pskb_may_pull(skb, wlen) ||
- skb_try_make_writable(skb, wlen))
+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
+ if (unlikely(!buf))
return 0;
- dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
- if (wash && dscp)
+ /* ToS is in the second byte of iphdr */
+ dscp = ipv4_get_dsfield((struct iphdr *)buf) >> 2;
+
+ if (wash && dscp) {
+ const int wlen = offset + sizeof(struct iphdr);
+
+ if (!pskb_may_pull(skb, wlen) ||
+ skb_try_make_writable(skb, wlen))
+ return 0;
+
ipv4_change_dsfield(ip_hdr(skb), INET_ECN_MASK, 0);
+ }
+
return dscp;
case htons(ETH_P_IPV6):
- wlen += sizeof(struct ipv6hdr);
- if (!pskb_may_pull(skb, wlen) ||
- skb_try_make_writable(skb, wlen))
+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
+ if (unlikely(!buf))
return 0;
- dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2;
- if (wash && dscp)
+ /* Traffic class is in the first and second bytes of ipv6hdr */
+ dscp = ipv6_get_dsfield((struct ipv6hdr *)buf) >> 2;
+
+ if (wash && dscp) {
+ const int wlen = offset + sizeof(struct ipv6hdr);
+
+ if (!pskb_may_pull(skb, wlen) ||
+ skb_try_make_writable(skb, wlen))
+ return 0;
+
ipv6_change_dsfield(ipv6_hdr(skb), INET_ECN_MASK, 0);
+ }
+
return dscp;
case htons(ETH_P_ARP):
From 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 25 Jun 2020 22:12:08 +0200
Subject: [PATCH] sch_cake: don't call diffserv parsing code when it is not
needed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As a further optimisation of the diffserv parsing codepath, we can skip it
entirely if CAKE is configured to neither use diffserv-based
classification, nor to zero out the diffserv bits.
Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1551,7 +1551,7 @@ static unsigned int cake_drop(struct Qdi
return idx + (tin << 16);
}
-static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
+static u8 cake_handle_diffserv(struct sk_buff *skb, bool wash)
{
const int offset = skb_network_offset(skb);
u16 *buf, buf_;
@@ -1612,14 +1612,17 @@ static struct cake_tin_data *cake_select
{
struct cake_sched_data *q = qdisc_priv(sch);
u32 tin, mark;
+ bool wash;
u8 dscp;
/* Tin selection: Default to diffserv-based selection, allow overriding
- * using firewall marks or skb->priority.
+ * using firewall marks or skb->priority. Call DSCP parsing early if
+ * wash is enabled, otherwise defer to below to skip unneeded parsing.
*/
- dscp = cake_handle_diffserv(skb,
- q->rate_flags & CAKE_FLAG_WASH);
mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft;
+ wash = !!(q->rate_flags & CAKE_FLAG_WASH);
+ if (wash)
+ dscp = cake_handle_diffserv(skb, wash);
if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT)
tin = 0;
@@ -1630,6 +1633,8 @@ static struct cake_tin_data *cake_select
tin = q->tin_order[TC_H_MIN(skb->priority) - 1];
else {
+ if (!wash)
+ dscp = cake_handle_diffserv(skb, wash);
tin = q->tin_index[dscp];
if (unlikely(tin >= q->tin_cnt))
From 3f608f0c41360b11b04c763f348b712f651c8bac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 25 Jun 2020 22:12:09 +0200
Subject: [PATCH] sch_cake: fix a few style nits
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
I spotted a few nits when comparing the in-tree version of sch_cake with
the out-of-tree one: A redundant error variable declaration shadowing an
outer declaration, and an indentation alignment issue. Fix both of these.
Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2713,7 +2713,7 @@ static int cake_init(struct Qdisc *sch,
qdisc_watchdog_init(&q->watchdog, sch);
if (opt) {
- int err = cake_change(sch, opt, extack);
+ err = cake_change(sch, opt, extack);
if (err)
return err;
@@ -3030,7 +3030,7 @@ static int cake_dump_class_stats(struct
PUT_STAT_S32(BLUE_TIMER_US,
ktime_to_us(
ktime_sub(now,
- flow->cvars.blue_timer)));
+ flow->cvars.blue_timer)));
}
if (flow->cvars.dropping) {
PUT_STAT_S32(DROP_NEXT_US,
......@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1781,6 +1781,19 @@ int phy_set_max_speed(struct phy_device
@@ -1783,6 +1783,19 @@ int phy_set_max_speed(struct phy_device
}
EXPORT_SYMBOL(phy_set_max_speed);
......
......@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1794,6 +1794,36 @@ void phy_support_asym_pause(struct phy_d
@@ -1796,6 +1796,36 @@ void phy_support_asym_pause(struct phy_d
}
EXPORT_SYMBOL(phy_support_asym_pause);
......
......@@ -29,7 +29,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -890,8 +890,6 @@ int phy_init_hw(struct phy_device *phyde
@@ -892,8 +892,6 @@ int phy_init_hw(struct phy_device *phyde
if (phydev->drv->soft_reset)
ret = phydev->drv->soft_reset(phydev);
......
......@@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
@@ -948,6 +949,65 @@ void phy_attached_print(struct phy_devic
@@ -950,6 +951,65 @@ void phy_attached_print(struct phy_devic
EXPORT_SYMBOL(phy_attached_print);
/**
......@@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
@@ -1020,6 +1080,9 @@ int phy_attach_direct(struct net_device
@@ -1022,6 +1082,9 @@ int phy_attach_direct(struct net_device
phydev->attached_dev = dev;
dev->phydev = phydev;
......@@ -130,7 +130,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
@@ -1954,6 +2017,9 @@ static int phy_remove(struct device *dev
@@ -1956,6 +2019,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
......
......@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
continue;
if ((phydrv->phy_id & phydrv->phy_id_mask) ==
@@ -627,10 +627,13 @@ static int get_phy_id(struct mii_bus *bu
@@ -629,10 +629,13 @@ static int get_phy_id(struct mii_bus *bu
*/
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
{
......
......@@ -20,11 +20,9 @@ Signed-off-by: Christopher Hill <ch6574@gmail.com>
drivers/spi/spi-rb4xx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
index 4c9620e0d18c..17e1a77dc132 100644
--- a/drivers/spi/spi-rb4xx.c
+++ b/drivers/spi/spi-rb4xx.c
@@ -158,6 +158,11 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
@@ -164,6 +164,11 @@ static int rb4xx_spi_probe(struct platfo
master->transfer_one = rb4xx_transfer_one;
master->set_cs = rb4xx_set_cs;
......@@ -36,7 +34,7 @@ index 4c9620e0d18c..17e1a77dc132 100644
err = devm_spi_register_master(&pdev->dev, master);
if (err) {
dev_err(&pdev->dev, "failed to register SPI master\n");
@@ -168,11 +173,6 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
@@ -174,11 +179,6 @@ static int rb4xx_spi_probe(struct platfo
if (err)
return err;
......
......@@ -21,11 +21,9 @@ Signed-off-by: Christopher Hill <ch6574@gmail.com>
drivers/spi/spi-rb4xx.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
index 17e1a77dc132..8aa51beb4ff3 100644
--- a/drivers/spi/spi-rb4xx.c
+++ b/drivers/spi/spi-rb4xx.c
@@ -14,6 +14,7 @@
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/spi/spi.h>
......@@ -33,7 +31,7 @@ index 17e1a77dc132..8aa51beb4ff3 100644
#include <asm/mach-ath79/ar71xx_regs.h>
@@ -150,6 +151,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
@@ -156,6 +157,7 @@ static int rb4xx_spi_probe(struct platfo
if (IS_ERR(ahb_clk))
return PTR_ERR(ahb_clk);
......@@ -41,7 +39,7 @@ index 17e1a77dc132..8aa51beb4ff3 100644
master->bus_num = 0;
master->num_chipselect = 3;
master->mode_bits = SPI_TX_DUAL;
@@ -188,11 +190,18 @@ static int rb4xx_spi_remove(struct platform_device *pdev)
@@ -194,11 +196,18 @@ static int rb4xx_spi_remove(struct platf
return 0;
}
......
......@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
s32 tin_deficit;
u32 tin_backlog;
u32 tin_dropped;
@@ -1919,7 +1918,7 @@ begin:
@@ -1943,7 +1942,7 @@ begin:
while (b->tin_deficit < 0 ||
!(b->sparse_flow_count + b->bulk_flow_count)) {
if (b->tin_deficit <= 0)
......@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (b->sparse_flow_count + b->bulk_flow_count)
empty = false;
@@ -2241,8 +2240,7 @@ static int cake_config_besteffort(struct
@@ -2265,8 +2264,7 @@ static int cake_config_besteffort(struct
cake_set_rate(b, rate, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2253,8 +2251,7 @@ static int cake_config_precedence(struct
@@ -2277,8 +2275,7 @@ static int cake_config_precedence(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
......@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
@@ -2267,18 +2264,14 @@ static int cake_config_precedence(struct
@@ -2291,18 +2288,14 @@ static int cake_config_precedence(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
......@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2347,8 +2340,7 @@ static int cake_config_diffserv8(struct
@@ -2371,8 +2364,7 @@ static int cake_config_diffserv8(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
......@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
@@ -2364,18 +2356,14 @@ static int cake_config_diffserv8(struct
@@ -2388,18 +2380,14 @@ static int cake_config_diffserv8(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
......@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2414,17 +2402,11 @@ static int cake_config_diffserv4(struct
@@ -2438,17 +2426,11 @@ static int cake_config_diffserv4(struct
cake_set_rate(&q->tins[3], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......@@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2455,15 +2437,10 @@ static int cake_config_diffserv3(struct
@@ -2479,15 +2461,10 @@ static int cake_config_diffserv3(struct
cake_set_rate(&q->tins[2], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
......
From 9208d2863ac689a563b92f2161d8d1e7127d0add Mon Sep 17 00:00:00 2001
From: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
Date: Thu, 25 Jun 2020 22:12:07 +0200
Subject: [PATCH] sch_cake: don't try to reallocate or unshare skb
unconditionally
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cake_handle_diffserv() tries to linearize mac and network header parts of
skb and to make it writable unconditionally. In some cases it leads to full
skb reallocation, which reduces throughput and increases CPU load. Some
measurements of IPv4 forward + NAPT on MIPS router with 580 MHz single-core
CPU was conducted. It appears that on kernel 4.9 skb_try_make_writable()
reallocates skb, if skb was allocated in ethernet driver via so-called
'build skb' method from page cache (it was discovered by strange increase
of kmalloc-2048 slab at first).
Obtain DSCP value via read-only skb_header_pointer() call, and leave
linearization only for DSCP bleaching or ECN CE setting. And, as an
additional optimisation, skip diffserv parsing entirely if it is not needed
by the current configuration.
Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
Signed-off-by: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
[ fix a few style issues, reflow commit message ]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 41 ++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1553,30 +1553,49 @@ static unsigned int cake_drop(struct Qdi
static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
{
- int wlen = skb_network_offset(skb);
+ const int offset = skb_network_offset(skb);
+ u16 *buf, buf_;
u8 dscp;
switch (tc_skb_protocol(skb)) {
case htons(ETH_P_IP):
- wlen += sizeof(struct iphdr);
- if (!pskb_may_pull(skb, wlen) ||
- skb_try_make_writable(skb, wlen))
+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
+ if (unlikely(!buf))
return 0;
- dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
- if (wash && dscp)
+ /* ToS is in the second byte of iphdr */
+ dscp = ipv4_get_dsfield((struct iphdr *)buf) >> 2;
+
+ if (wash && dscp) {
+ const int wlen = offset + sizeof(struct iphdr);
+
+ if (!pskb_may_pull(skb, wlen) ||
+ skb_try_make_writable(skb, wlen))
+ return 0;
+
ipv4_change_dsfield(ip_hdr(skb), INET_ECN_MASK, 0);
+ }
+
return dscp;
case htons(ETH_P_IPV6):
- wlen += sizeof(struct ipv6hdr);
- if (!pskb_may_pull(skb, wlen) ||
- skb_try_make_writable(skb, wlen))
+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
+ if (unlikely(!buf))
return 0;
- dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2;
- if (wash && dscp)
+ /* Traffic class is in the first and second bytes of ipv6hdr */
+ dscp = ipv6_get_dsfield((struct ipv6hdr *)buf) >> 2;
+
+ if (wash && dscp) {
+ const int wlen = offset + sizeof(struct ipv6hdr);
+
+ if (!pskb_may_pull(skb, wlen) ||
+ skb_try_make_writable(skb, wlen))
+ return 0;
+
ipv6_change_dsfield(ipv6_hdr(skb), INET_ECN_MASK, 0);
+ }
+
return dscp;
case htons(ETH_P_ARP):
From 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 25 Jun 2020 22:12:08 +0200
Subject: [PATCH] sch_cake: don't call diffserv parsing code when it is not
needed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As a further optimisation of the diffserv parsing codepath, we can skip it
entirely if CAKE is configured to neither use diffserv-based
classification, nor to zero out the diffserv bits.
Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1551,7 +1551,7 @@ static unsigned int cake_drop(struct Qdi
return idx + (tin << 16);
}
-static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
+static u8 cake_handle_diffserv(struct sk_buff *skb, bool wash)
{
const int offset = skb_network_offset(skb);
u16 *buf, buf_;
@@ -1612,14 +1612,17 @@ static struct cake_tin_data *cake_select
{
struct cake_sched_data *q = qdisc_priv(sch);
u32 tin, mark;
+ bool wash;
u8 dscp;
/* Tin selection: Default to diffserv-based selection, allow overriding
- * using firewall marks or skb->priority.
+ * using firewall marks or skb->priority. Call DSCP parsing early if
+ * wash is enabled, otherwise defer to below to skip unneeded parsing.
*/
- dscp = cake_handle_diffserv(skb,
- q->rate_flags & CAKE_FLAG_WASH);
mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft;
+ wash = !!(q->rate_flags & CAKE_FLAG_WASH);
+ if (wash)
+ dscp = cake_handle_diffserv(skb, wash);
if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT)
tin = 0;
@@ -1633,6 +1636,8 @@ static struct cake_tin_data *cake_select
tin = q->tin_order[TC_H_MIN(skb->priority) - 1];
else {
+ if (!wash)
+ dscp = cake_handle_diffserv(skb, wash);
tin = q->tin_index[dscp];
if (unlikely(tin >= q->tin_cnt))
From 3f608f0c41360b11b04c763f348b712f651c8bac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 25 Jun 2020 22:12:09 +0200
Subject: [PATCH] sch_cake: fix a few style nits
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
I spotted a few nits when comparing the in-tree version of sch_cake with
the out-of-tree one: A redundant error variable declaration shadowing an
outer declaration, and an indentation alignment issue. Fix both of these.
Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
net/sched/sch_cake.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2717,7 +2717,7 @@ static int cake_init(struct Qdisc *sch,
qdisc_watchdog_init(&q->watchdog, sch);
if (opt) {
- int err = cake_change(sch, opt, extack);
+ err = cake_change(sch, opt, extack);
if (err)
return err;
@@ -3034,7 +3034,7 @@ static int cake_dump_class_stats(struct
PUT_STAT_S32(BLUE_TIMER_US,
ktime_to_us(
ktime_sub(now,
- flow->cvars.blue_timer)));
+ flow->cvars.blue_timer)));
}
if (flow->cvars.dropping) {
PUT_STAT_S32(DROP_NEXT_US,
......@@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
@@ -1183,6 +1184,65 @@ phy_standalone_show(struct device *dev,
@@ -1185,6 +1186,65 @@ phy_standalone_show(struct device *dev,
static DEVICE_ATTR_RO(phy_standalone);
/**
......@@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
@@ -1259,6 +1319,9 @@ int phy_attach_direct(struct net_device
@@ -1261,6 +1321,9 @@ int phy_attach_direct(struct net_device
dev->phydev = phydev;
}
......@@ -130,7 +130,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
@@ -2287,6 +2350,9 @@ static int phy_remove(struct device *dev
@@ -2289,6 +2352,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
......
......@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1679,6 +1679,40 @@ static int genphy_config_advert(struct p
@@ -1681,6 +1681,40 @@ static int genphy_config_advert(struct p
}
/**
......@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* genphy_config_eee_advert - disable unwanted eee mode advertisement
* @phydev: target phy_device struct
*
@@ -1787,6 +1821,54 @@ int __genphy_config_aneg(struct phy_devi
@@ -1789,6 +1823,54 @@ int __genphy_config_aneg(struct phy_devi
EXPORT_SYMBOL(__genphy_config_aneg);
/**
......@@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* genphy_aneg_done - return auto-negotiation status
* @phydev: target phy_device struct
*
@@ -1958,6 +2040,63 @@ int genphy_read_status(struct phy_device
@@ -1960,6 +2042,63 @@ int genphy_read_status(struct phy_device
EXPORT_SYMBOL(genphy_read_status);
/**
......
......@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -675,16 +675,6 @@ static void i2c_pxa_slave_stop(struct px
@@ -674,16 +674,6 @@ static void i2c_pxa_slave_stop(struct px
* PXA I2C Master mode
*/
......@@ -35,7 +35,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
{
u32 icr;
@@ -692,8 +682,8 @@ static inline void i2c_pxa_start_message
@@ -691,8 +681,8 @@ static inline void i2c_pxa_start_message
/*
* Step 1: target slave address into IDBR
*/
......@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* Step 2: initiate the write.
@@ -1006,8 +996,8 @@ static void i2c_pxa_irq_txempty(struct p
@@ -1003,8 +993,8 @@ static void i2c_pxa_irq_txempty(struct p
/*
* Write the next address.
*/
......
......@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -327,7 +327,6 @@ static void i2c_pxa_scream_blue_murder(s
@@ -326,7 +326,6 @@ static void i2c_pxa_scream_blue_murder(s
#endif /* ifdef DEBUG / else */
static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret);
......@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c)
{
@@ -700,34 +699,6 @@ static inline void i2c_pxa_stop_message(
@@ -697,34 +696,6 @@ static inline void i2c_pxa_stop_message(
writel(icr, _ICR(i2c));
}
......@@ -61,7 +61,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* PXA I2C send master code
* 1. Load master code to IDBR and send it.
@@ -756,140 +727,6 @@ static int i2c_pxa_send_mastercode(struc
@@ -753,140 +724,6 @@ static int i2c_pxa_send_mastercode(struc
return (timeout == 0) ? I2C_RETRY : 0;
}
......@@ -202,7 +202,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* i2c_pxa_master_complete - complete the message and wake up.
*/
@@ -1096,6 +933,71 @@ static irqreturn_t i2c_pxa_handler(int t
@@ -1093,6 +930,71 @@ static irqreturn_t i2c_pxa_handler(int t
return IRQ_HANDLED;
}
......@@ -274,7 +274,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
{
@@ -1129,6 +1031,103 @@ static const struct i2c_algorithm i2c_px
@@ -1126,6 +1028,103 @@ static const struct i2c_algorithm i2c_px
.functionality = i2c_pxa_functionality,
};
......
......@@ -27,7 +27,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#define ICR_START (1 << 0) /* start bit */
#define ICR_STOP (1 << 1) /* stop bit */
#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
@@ -335,7 +338,7 @@ static void i2c_pxa_abort(struct pxa_i2c
@@ -334,7 +337,7 @@ static void i2c_pxa_abort(struct pxa_i2c
return;
}
......@@ -36,7 +36,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
unsigned long icr = readl(_ICR(i2c));
icr &= ~ICR_START;
@@ -390,7 +393,8 @@ static int i2c_pxa_wait_master(struct px
@@ -389,7 +392,8 @@ static int i2c_pxa_wait_master(struct px
* quick check of the i2c lines themselves to ensure they've
* gone high...
*/
......@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
if (i2c_debug > 0)
dev_dbg(&i2c->adap.dev, "%s: done\n", __func__);
return 1;
@@ -575,7 +579,7 @@ static void i2c_pxa_slave_start(struct p
@@ -574,7 +578,7 @@ static void i2c_pxa_slave_start(struct p
timeout = 0x10000;
while (1) {
......@@ -55,7 +55,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
break;
timeout--;
@@ -638,7 +642,7 @@ static void i2c_pxa_slave_start(struct p
@@ -637,7 +641,7 @@ static void i2c_pxa_slave_start(struct p
timeout = 0x10000;
while (1) {
......
......@@ -53,7 +53,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
},
[REGS_A3700] = {
.ibmr = 0x00,
@@ -1232,8 +1240,8 @@ static int i2c_pxa_probe(struct platform
@@ -1229,8 +1237,8 @@ static int i2c_pxa_probe(struct platform
i2c->reg_idbr = i2c->reg_base + pxa_reg_layout[i2c_type].idbr;
i2c->reg_icr = i2c->reg_base + pxa_reg_layout[i2c_type].icr;
i2c->reg_isr = i2c->reg_base + pxa_reg_layout[i2c_type].isr;
......
......@@ -32,7 +32,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static const struct platform_device_id i2c_pxa_id_table[] = {
{ "pxa2xx-i2c", REGS_PXA2XX },
{ "pxa3xx-pwri2c", REGS_PXA3XX },
@@ -1181,15 +1190,6 @@ static const struct i2c_algorithm i2c_px
@@ -1178,15 +1187,6 @@ static const struct i2c_algorithm i2c_px
.functionality = i2c_pxa_functionality,
};
......
From: Russell King <rmk+kernel@armlinux.org.uk>
Bcc: linux@mail.armlinux.org.uk
Cc: linux-i2c@vger.kernel.org
Subject: [PATCH 10/17] i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
MIME-Version: 1.0
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
The IRQ log output is supposed to appear on a single line. However,
commit 3a2dc1677b60 ("i2c: pxa: Update debug function to dump more info
on error") resulted in it being printed one-entry-per-line, which is
excessively long.
Fixing this is not a trivial matter; using pr_cont() doesn't work as
the previous dev_dbg() may not have been compiled in, or may be
dynamic.
Since the rest of this function output is at error level, and is also
debug output, promote this to error level as well to avoid this
problem.
Reduce the number of always zero prefix digits to save screen real-
estate.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/i2c/busses/i2c-pxa.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -364,11 +364,10 @@ static void i2c_pxa_scream_blue_murder(s
dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n",
readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)),
readl(_ISR(i2c)));
- dev_dbg(dev, "log: ");
+ dev_err(dev, "log:");
for (i = 0; i < i2c->irqlogidx; i++)
- pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
-
- pr_debug("\n");
+ pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]);
+ pr_cont("\n");
}
#else /* ifdef DEBUG */
......@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1061,18 +1061,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2
@@ -1059,18 +1059,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2
return ret;
}
......@@ -44,7 +44,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
udelay(100);
}
i2c_pxa_scream_blue_murder(i2c, "exhausted retries");
@@ -1082,6 +1084,14 @@ static int i2c_pxa_xfer(struct i2c_adapt
@@ -1080,6 +1082,14 @@ static int i2c_pxa_xfer(struct i2c_adapt
return ret;
}
......@@ -59,7 +59,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
@@ -1165,7 +1175,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a
@@ -1163,7 +1173,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a
struct i2c_msg msgs[], int num)
{
struct pxa_i2c *i2c = adap->algo_data;
......@@ -67,7 +67,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* If the I2C controller is disabled we need to reset it
(probably due to a suspend/resume destroying state). We do
@@ -1174,20 +1183,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a
@@ -1172,20 +1181,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a
if (!(readl(_ICR(i2c)) & ICR_IUE))
i2c_pxa_reset(i2c);
......
......@@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#define BUS_ERROR (-EREMOTEIO)
#define XFER_NAKED (-ECONNREFUSED)
#define I2C_RETRY (-2000) /* an error has occurred retry transmit */
@@ -840,7 +841,7 @@ static void i2c_pxa_irq_txempty(struct p
@@ -838,7 +839,7 @@ static void i2c_pxa_irq_txempty(struct p
*/
if (isr & ISR_ACKNAK) {
if (i2c->msg_ptr == 0 && i2c->msg_idx == 0)
......@@ -42,7 +42,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
else
ret = XFER_NAKED;
}
@@ -1068,16 +1069,19 @@ static int i2c_pxa_internal_xfer(struct
@@ -1066,16 +1067,19 @@ static int i2c_pxa_internal_xfer(struct
{
int ret, i;
......
......@@ -16,7 +16,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1054,7 +1054,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2
@@ -1052,7 +1052,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2
ret = i2c->msg_idx;
if (!timeout && i2c->msg_num) {
......@@ -25,7 +25,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
ret = I2C_RETRY;
}
@@ -1124,7 +1124,7 @@ static int i2c_pxa_pio_set_master(struct
@@ -1122,7 +1122,7 @@ static int i2c_pxa_pio_set_master(struct
if (timeout < 0) {
show_state(i2c);
dev_err(&i2c->adap.dev,
......@@ -34,7 +34,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
return I2C_RETRY;
}
@@ -1168,7 +1168,7 @@ static int i2c_pxa_do_pio_xfer(struct px
@@ -1166,7 +1166,7 @@ static int i2c_pxa_do_pio_xfer(struct px
out:
if (timeout == 0) {
......
......@@ -20,7 +20,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1116,10 +1116,8 @@ static int i2c_pxa_pio_set_master(struct
@@ -1114,10 +1114,8 @@ static int i2c_pxa_pio_set_master(struct
/*
* Wait for the bus to become free.
*/
......
From: Russell King <rmk+kernel@armlinux.org.uk>
Bcc: linux@mail.armlinux.org.uk
Subject: [PATCH 5/7] i2c: pxa: clear all master action bits in
i2c_pxa_stop_message()
MIME-Version: 1.0
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
If we timeout during a message transfer, the control register may
contain bits that cause an action to be set. Read-modify-writing the
register leaving these bits set may trigger the hardware to attempt
one of these actions unintentionally.
Always clear these bits when cleaning up after a message or after
a timeout.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/i2c/busses/i2c-pxa.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -754,11 +754,9 @@ static inline void i2c_pxa_stop_message(
{
u32 icr;
- /*
- * Clear the STOP and ACK flags
- */
+ /* Clear the START, STOP, ACK, TB and MA flags */
icr = readl(_ICR(i2c));
- icr &= ~(ICR_STOP | ICR_ACKNAK);
+ icr &= ~(ICR_START | ICR_STOP | ICR_ACKNAK | ICR_TB | ICR_MA);
writel(icr, _ICR(i2c));
}
......@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
@@ -1252,7 +1252,6 @@ all: modules
@@ -1260,7 +1260,6 @@ endif
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
......@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1281,7 +1280,6 @@ _modinst_:
@@ -1289,7 +1288,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
......
......@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
@@ -789,11 +794,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
@@ -779,11 +784,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
......
......@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
algorithm registration.
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -248,8 +248,12 @@ static int cryptomgr_schedule_test(struc
@@ -246,8 +246,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;
/* Do not test internal algorithms. */
......
......@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str
@@ -765,7 +765,7 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;
......
......@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -453,146 +453,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
@@ -454,146 +454,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};
......
......@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3004,10 +3004,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -3000,10 +3000,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);
......
......@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
@@ -1598,9 +1610,11 @@ void sk_destruct(struct sock *sk)
@@ -1599,9 +1611,11 @@ void sk_destruct(struct sock *sk)
static void __sk_free(struct sock *sk)
{
......
......@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper
@@ -3389,6 +3389,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
......
......@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
@@ -1232,7 +1232,6 @@ all: modules
@@ -1240,7 +1240,6 @@ endif
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
......@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1261,7 +1260,6 @@ _modinst_:
@@ -1269,7 +1268,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
......
......@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
@@ -782,11 +787,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
@@ -772,11 +777,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
......
......@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/of.h>
@@ -3039,3 +3040,5 @@ static int __init regmap_initcall(void)
@@ -3040,3 +3041,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
......
......@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
algorithm registration.
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -247,8 +247,12 @@ static int cryptomgr_schedule_test(struc
@@ -245,8 +245,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;
/* Do not test internal algorithms. */
......
......@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
@@ -1025,7 +1025,7 @@ static void attach_one_default_qdisc(str
@@ -1026,7 +1026,7 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;
......
......@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -612,207 +612,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
@@ -613,207 +613,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};
......
......@@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1581,6 +1581,9 @@ int genphy_update_link(struct phy_device
@@ -1583,6 +1583,9 @@ int genphy_update_link(struct phy_device
{
int status;
......
......@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3255,10 +3255,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -3251,10 +3251,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);
......
......@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
@@ -1603,9 +1615,11 @@ static void __sk_free(struct sock *sk)
@@ -1604,9 +1616,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);
......
......@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3489,6 +3489,8 @@ static __net_initdata struct pernet_oper
@@ -3491,6 +3491,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
......
......@@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/of.h>
@@ -3124,3 +3125,5 @@ static int __init regmap_initcall(void)
@@ -3125,3 +3126,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
......
......@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -242,8 +242,12 @@ static int cryptomgr_schedule_test(struc
@@ -240,8 +240,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;
/* Do not test internal algorithms. */
......
......@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
@@ -1034,12 +1034,12 @@ static void attach_one_default_qdisc(str
@@ -1035,12 +1035,12 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;
......
......@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -594,211 +594,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
@@ -595,211 +595,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};
......
......@@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1909,6 +1909,9 @@ int genphy_update_link(struct phy_device
@@ -1911,6 +1911,9 @@ int genphy_update_link(struct phy_device
if (bmcr & BMCR_ANRESTART)
goto done;
......
......@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3195,10 +3195,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -3191,10 +3191,20 @@ static int xmit_one(struct sk_buff *skb,
if (dev_nit_active(dev))
dev_queue_xmit_nit(skb, dev);
......
......@@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
@@ -1746,9 +1759,11 @@ static void __sk_free(struct sock *sk)
@@ -1747,9 +1760,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);
......
......@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3606,6 +3606,8 @@ static __net_initdata struct pernet_oper
@@ -3608,6 +3608,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
......
......@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6145,7 +6145,7 @@ static void __ref alloc_node_mem_map(str
@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
......
......@@ -23,7 +23,7 @@ Tested-by: Aaron Brown <aaron.f.brown@intel.com>
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5082,7 +5082,7 @@ static bool e1000e_has_link(struct e1000
@@ -5080,7 +5080,7 @@ static bool e1000e_has_link(struct e1000
/* get_link_status is set on LSC (link status) interrupt or
* Rx sequence error interrupt. get_link_status will stay
......@@ -32,7 +32,7 @@ Tested-by: Aaron Brown <aaron.f.brown@intel.com>
* for copper adapters ONLY
*/
switch (hw->phy.media_type) {
@@ -5100,7 +5100,7 @@ static bool e1000e_has_link(struct e1000
@@ -5098,7 +5098,7 @@ static bool e1000e_has_link(struct e1000
break;
case e1000_media_type_internal_serdes:
ret_val = hw->mac.ops.check_for_link(hw);
......
......@@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
@@ -656,12 +656,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
@@ -652,9 +652,9 @@ KBUILD_CFLAGS += $(call cc-disable-warni
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
-KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
-KBUILD_CFLAGS += -Os
+KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION)
else
-KBUILD_CFLAGS += -O2
+KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
endif
endif
# Tell gcc to never replace conditional load with a non-conditional one
......@@ -47,7 +47,7 @@ v2: incorporated changes suggested by Jonas Gorski
select OF
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -315,7 +315,7 @@ OBJCOPYFLAGS += --remove-section=.regin
@@ -326,7 +326,7 @@ OBJCOPYFLAGS += --remove-section=.regin
head-y := arch/mips/kernel/head.o
libs-y += arch/mips/lib/
......
......@@ -42,7 +42,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
;----------------------------------------------------------------
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -437,6 +437,8 @@ static inline bool uboot_arg_invalid(uns
@@ -438,6 +438,8 @@ static inline bool uboot_arg_invalid(uns
/* We always pass 0 as magic from U-boot */
#define UBOOT_MAGIC_VALUE 0
......@@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
void __init handle_uboot_args(void)
{
bool use_embedded_dtb = true;
@@ -477,7 +479,7 @@ ignore_uboot_args:
@@ -478,7 +480,7 @@ ignore_uboot_args:
#endif
if (use_embedded_dtb) {
......
......@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/nsproxy.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
@@ -978,8 +983,36 @@ static int pppoe_xmit(struct ppp_channel
@@ -981,8 +986,36 @@ static int pppoe_xmit(struct ppp_channel
return __pppoe_xmit(sk, skb);
}
......
......@@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
@@ -2054,6 +2071,11 @@ static struct rt6_info *ip6_route_info_c
@@ -2056,6 +2073,11 @@ static struct rt6_info *ip6_route_info_c
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
......@@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
@@ -2779,6 +2801,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -2781,6 +2803,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
......@@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -3015,7 +3048,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -3017,7 +3050,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
......@@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net
@@ -3517,6 +3551,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
......@@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n
@@ -3835,6 +3872,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
......@@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n
@@ -3846,6 +3885,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
......@@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -4060,6 +4100,17 @@ static int __net_init ip6_route_net_init
@@ -4062,6 +4102,17 @@ static int __net_init ip6_route_net_init
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
......@@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
net->ipv6.sysctl.flush_delay = 0;
@@ -4078,6 +4129,8 @@ out:
@@ -4080,6 +4131,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
......@@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -4095,6 +4148,7 @@ static void __net_exit ip6_route_net_exi
@@ -4097,6 +4150,7 @@ static void __net_exit ip6_route_net_exi
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
......@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
}
@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri
@@ -4170,6 +4224,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
......
......@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4806,6 +4806,9 @@ static enum gro_result dev_gro_receive(s
@@ -4802,6 +4802,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
......@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netif_elide_gro(skb->dev))
goto normal;
@@ -6283,6 +6286,48 @@ static void __netdev_adjacent_dev_unlink
@@ -6279,6 +6282,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
......@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info)
@@ -6321,6 +6366,7 @@ static int __netdev_upper_dev_link(struc
@@ -6317,6 +6362,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
......@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
ret = notifier_to_errno(ret);
@@ -6398,6 +6444,7 @@ void netdev_upper_dev_unlink(struct net_
@@ -6394,6 +6440,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
......@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
}
@@ -6962,6 +7009,7 @@ int dev_set_mac_address(struct net_devic
@@ -6958,6 +7005,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
......
......@@ -24,7 +24,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
default y
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -43,6 +43,7 @@ static void quirk_mmio_always_on(struct
@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
......@@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
/* The Mellanox Tavor device gives false positive parity errors
* Mark this device with a broken_parity_status, to allow
* PCI scanning code to "skip" this now blacklisted device.
@@ -3094,6 +3095,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
@@ -3095,6 +3096,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
......@@ -40,7 +40,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
/*
* Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To
@@ -3150,6 +3152,8 @@ static void fixup_debug_report(struct pc
@@ -3151,6 +3153,8 @@ static void fixup_debug_report(struct pc
}
}
......@@ -49,7 +49,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
/*
* Some BIOS implementations leave the Intel GPU interrupts enabled,
* even though no one is handling them (f.e. i915 driver is never loaded).
@@ -3188,6 +3192,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
@@ -3189,6 +3193,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
......
......@@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
depends on ACPI
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -731,6 +731,19 @@ u64 ata_tf_read_block(const struct ata_t
@@ -730,6 +730,19 @@ u64 ata_tf_read_block(const struct ata_t
return block;
}
......@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
@@ -5124,6 +5137,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -5123,6 +5136,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
......@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
qc = __ata_qc_from_tag(ap, tag);
qc->tag = tag;
@@ -6025,6 +6041,9 @@ struct ata_port *ata_port_alloc(struct a
@@ -6024,6 +6040,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
......@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
ata_sff_port_init(ap);
return ap;
@@ -6046,6 +6065,12 @@ static void ata_host_release(struct devi
@@ -6045,6 +6064,12 @@ static void ata_host_release(struct devi
kfree(ap->pmp_link);
kfree(ap->slave_link);
......@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
kfree(ap);
host->ports[i] = NULL;
}
@@ -6492,7 +6517,23 @@ int ata_host_register(struct ata_host *h
@@ -6491,7 +6516,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}
......@@ -124,17 +124,17 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
rc = ata_tport_add(host->dev,host->ports[i]);
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -38,6 +38,9 @@
#include <linux/acpi.h>
@@ -39,6 +39,9 @@
#include <linux/cdrom.h>
#include <linux/sched.h>
#include <linux/async.h>
+#ifdef CONFIG_ATA_LEDS
+#include <linux/leds.h>
+#endif
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
@@ -890,6 +893,12 @@ struct ata_port {
@@ -893,6 +896,12 @@ struct ata_port {
#ifdef CONFIG_ATA_ACPI
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册