Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
39d5464013
@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-5.15 = .171
|
LINUX_VERSION-5.15 = .173
|
||||||
LINUX_KERNEL_HASH-5.15.171 = 2953e064d8123c4c22c4fd48011378d73c8b99a3bf3d989e33f4f5c8f82f2a3b
|
LINUX_KERNEL_HASH-5.15.173 = 8a4b2a47ccc9b208b2b6ed9a216ea1a5eb12852c723bec1a04de9e671a1d7da8
|
||||||
|
@ -119,7 +119,8 @@ domywifi,dw33d)
|
|||||||
glinet,gl-ar150)
|
glinet,gl-ar150)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
|
||||||
;;
|
;;
|
||||||
huawei,ap5030dn)
|
huawei,ap5030dn|\
|
||||||
|
huawei,ap6010dn)
|
||||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
|
||||||
;;
|
;;
|
||||||
netgear,wndr3700|\
|
netgear,wndr3700|\
|
||||||
|
@ -203,7 +203,7 @@ mac80211_hostapd_setup_base() {
|
|||||||
dsss_cck_40:1
|
dsss_cck_40:1
|
||||||
|
|
||||||
ht_cap_mask=0
|
ht_cap_mask=0
|
||||||
for cap in $(iw phy "$phy" info | grep 'Capabilities:' | cut -d: -f2); do
|
for cap in $(iw phy "$phy" info | grep -E '^\s*Capabilities:' | cut -d: -f2); do
|
||||||
ht_cap_mask="$(($ht_cap_mask | $cap))"
|
ht_cap_mask="$(($ht_cap_mask | $cap))"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
243
target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts
Normal file
243
target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "ar9344.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Huawei AP6010DN";
|
||||||
|
compatible = "huawei,ap6010dn", "qca,ar9344";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "console=ttyS0,9600n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_function_green;
|
||||||
|
led-failsafe = &led_function_red;
|
||||||
|
led-running = &led_function_green;
|
||||||
|
led-upgrade = &led_function_red;
|
||||||
|
label-mac-device = ð0;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_function_green: led-status-green {
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_function_red: led-status-red {
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
restart {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
watchdog {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&wdt_gpio15>;
|
||||||
|
|
||||||
|
compatible = "linux,wdt-gpio";
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||||
|
hw_algo = "toggle";
|
||||||
|
hw_margin_ms = <100>;
|
||||||
|
always-running;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual_flash {
|
||||||
|
compatible = "mtd-concat";
|
||||||
|
devices = <&fwconcat0 &fwconcat1>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x0 0x1e00000>;
|
||||||
|
compatible = "openwrt,uimage", "denx,uimage";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <25000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot-a";
|
||||||
|
reg = <0x0 0x80000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@80000 {
|
||||||
|
label = "BootupA";
|
||||||
|
reg = <0x80000 0x20000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@a0000 {
|
||||||
|
label = "BootupB";
|
||||||
|
reg = <0xa0000 0x20000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@c0000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0xc0000 0x20000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@e0000 {
|
||||||
|
label = "BoardData";
|
||||||
|
reg = <0xe0000 0x20000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
// In the vendor layout, there are the "SysImageA" (12 MiB)
|
||||||
|
// and the "ConfigA" (3 MiB) partitions here.
|
||||||
|
fwconcat0: partition@100000 {
|
||||||
|
label = "fwconcat0";
|
||||||
|
reg = <0x100000 0xf00000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1000000 {
|
||||||
|
label = "u-boot-b";
|
||||||
|
reg = <0x1000000 0x80000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1080000 {
|
||||||
|
label = "ResultA";
|
||||||
|
reg = <0x1080000 0x20000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@10a0000 {
|
||||||
|
label = "ResultB";
|
||||||
|
reg = <0x10a0000 0x20000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
// In the vendor layout, there are the "SysImageB" (12 MiB)
|
||||||
|
// and the "ConfigB" (3 MiB) partitions here.
|
||||||
|
fwconcat1: partition@10c0000 {
|
||||||
|
label = "fwconcat1";
|
||||||
|
reg = <0x10c0000 0xf00000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
art: partition@1fc0000 {
|
||||||
|
label = "art";
|
||||||
|
reg = <0x1fc0000 0x40000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_art_2005b: macaddr@2005b {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0x2005b 0x6>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
cal_art_1000: cal@1000 {
|
||||||
|
reg = <0x1000 0x440>;
|
||||||
|
};
|
||||||
|
|
||||||
|
cal_art_5000: cal@5000 {
|
||||||
|
reg = <0x5000 0x844>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_2005b 1>, <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
ath9k: wifi@0,0 {
|
||||||
|
compatible = "pci168c,0033";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
gpio-controller;
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_2005b 2>, <&cal_art_5000>;
|
||||||
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&ref {
|
||||||
|
clock-frequency = <40000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ð0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_2005b 0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
|
||||||
|
pll-data = <0x06000000 0x04000101 0x0c001313>;
|
||||||
|
phy-mode = "rgmii-id";
|
||||||
|
phy-handle = <&phy>;
|
||||||
|
|
||||||
|
gmac-config {
|
||||||
|
device = <&gmac>;
|
||||||
|
rgmii-gmac0 = <1>;
|
||||||
|
rxdv-delay = <3>;
|
||||||
|
rxd-delay = <3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy: ethernet-phy@18 {
|
||||||
|
reg = <0x4>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinmux {
|
||||||
|
wdt_gpio15: pinmux_wdt_gpio15 {
|
||||||
|
pinctrl-single,bits = <0xc 0x0 0xFF000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wdt {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
@ -50,6 +50,7 @@ ath79_setup_interfaces()
|
|||||||
glinet,gl-ar300m-lite|\
|
glinet,gl-ar300m-lite|\
|
||||||
glinet,gl-usb150|\
|
glinet,gl-usb150|\
|
||||||
hak5,wifi-pineapple-nano|\
|
hak5,wifi-pineapple-nano|\
|
||||||
|
huawei,ap6010dn|\
|
||||||
meraki,mr16|\
|
meraki,mr16|\
|
||||||
netgear,ex7300|\
|
netgear,ex7300|\
|
||||||
netgear,ex7300-v2|\
|
netgear,ex7300-v2|\
|
||||||
@ -710,7 +711,8 @@ ath79_setup_macs()
|
|||||||
hak5,packet-squirrel)
|
hak5,packet-squirrel)
|
||||||
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||||
;;
|
;;
|
||||||
huawei,ap5030dn)
|
huawei,ap5030dn|\
|
||||||
|
huawei,ap6010dn)
|
||||||
label_mac=$(mtd_get_mac_binary art 0x2005b)
|
label_mac=$(mtd_get_mac_binary art 0x2005b)
|
||||||
;;
|
;;
|
||||||
iodata,etg3-r)
|
iodata,etg3-r)
|
||||||
|
@ -66,7 +66,8 @@ platform_do_upgrade() {
|
|||||||
ROOTFS_FILE="root.squashfs"
|
ROOTFS_FILE="root.squashfs"
|
||||||
platform_do_upgrade_failsafe_datachk "$1"
|
platform_do_upgrade_failsafe_datachk "$1"
|
||||||
;;
|
;;
|
||||||
huawei,ap5030dn)
|
huawei,ap5030dn|\
|
||||||
|
huawei,ap6010dn)
|
||||||
# Store beginning address of the "firmware" partition
|
# Store beginning address of the "firmware" partition
|
||||||
# as KernelA address and KernelB address, each to BootupA & BootupB
|
# as KernelA address and KernelB address, each to BootupA & BootupB
|
||||||
# This is the address from which the bootloader will try to load the kernel.
|
# This is the address from which the bootloader will try to load the kernel.
|
||||||
|
@ -1646,6 +1646,21 @@ define Device/huawei_ap5030dn
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += huawei_ap5030dn
|
TARGET_DEVICES += huawei_ap5030dn
|
||||||
|
|
||||||
|
define Device/huawei_ap6010dn
|
||||||
|
SOC := ar9344
|
||||||
|
DEVICE_VENDOR := Huawei
|
||||||
|
DEVICE_MODEL := AP6010DN
|
||||||
|
LOADER_TYPE := bin
|
||||||
|
LOADER_FLASH_OFFS := 0x111DC0
|
||||||
|
KERNEL_SIZE := 15360k
|
||||||
|
IMAGE_SIZE := 30720k
|
||||||
|
COMPILE := loader-$(1).bin
|
||||||
|
COMPILE/loader-$(1).bin := loader-okli-compile | pad-to 64k | uImage none
|
||||||
|
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += huawei_ap6010dn
|
||||||
|
|
||||||
define Device/iodata_etg3-r
|
define Device/iodata_etg3-r
|
||||||
SOC := ar9342
|
SOC := ar9342
|
||||||
DEVICE_VENDOR := I-O DATA
|
DEVICE_VENDOR := I-O DATA
|
||||||
|
@ -670,6 +670,7 @@
|
|||||||
#define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
|
#define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
|
||||||
|
|
||||||
#define AR934X_GPIO_OUT_GPIO 0x00
|
#define AR934X_GPIO_OUT_GPIO 0x00
|
||||||
|
#define AR934X_GPIO_OUTSEL_CLK_OBS4 0x14
|
||||||
|
|
||||||
#define QCA955X_GPIO_OUTSEL_CLK_OBS5 0x54
|
#define QCA955X_GPIO_OUTSEL_CLK_OBS5 0x54
|
||||||
|
|
||||||
|
@ -182,34 +182,40 @@ static inline void mr18_init(void)
|
|||||||
static inline void mr18_init(void) { }
|
static inline void mr18_init(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BOARD_HUAWEI_AP5030DN
|
#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) || defined(CONFIG_BOARD_HUAWEI_AP6010DN)
|
||||||
static inline void ap5030dn_init(void)
|
static inline void huawei_ap_init(void)
|
||||||
{
|
{
|
||||||
const unsigned int ap5030dn_watchdog_gpio = 15;
|
const unsigned int watchdog_gpio = 15;
|
||||||
unsigned int gpiobase, reg;
|
unsigned int gpiobase, reg;
|
||||||
|
|
||||||
gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE);
|
gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE);
|
||||||
|
|
||||||
printf("Huawei AP5030DN\n");
|
printf("Huawei AP\n");
|
||||||
|
|
||||||
reg = READREG(gpiobase + AR71XX_GPIO_REG_OE);
|
reg = READREG(gpiobase + AR71XX_GPIO_REG_OE);
|
||||||
WRITEREG(gpiobase + AR71XX_GPIO_REG_OE,
|
WRITEREG(gpiobase + AR71XX_GPIO_REG_OE,
|
||||||
reg & ~(1 << ap5030dn_watchdog_gpio));
|
reg & ~(1 << watchdog_gpio));
|
||||||
|
|
||||||
/* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4)
|
/* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4)
|
||||||
* to keep the watchdog happy until wdt-gpio takes over
|
* or CLK_OBS4 (= AHB_CLK/2) to keep the watchdog happy
|
||||||
|
* until wdt-gpio takes over
|
||||||
*/
|
*/
|
||||||
reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3);
|
reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3);
|
||||||
|
#if defined(CONFIG_BOARD_HUAWEI_AP5030DN)
|
||||||
WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
|
WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
|
||||||
reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24));
|
reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24));
|
||||||
|
#elif defined(CONFIG_BOARD_HUAWEI_AP6010DN)
|
||||||
|
WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
|
||||||
|
reg | (AR934X_GPIO_OUTSEL_CLK_OBS4 << 24));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void ap5030dn_init(void) { }
|
static inline void huawei_ap_init(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void board_init(void)
|
void board_init(void)
|
||||||
{
|
{
|
||||||
tlwr1043nd_init();
|
tlwr1043nd_init();
|
||||||
mr18_init();
|
mr18_init();
|
||||||
ap5030dn_init();
|
huawei_ap_init();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|||||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||||
|
|
||||||
@@ -1337,6 +1340,9 @@
|
@@ -1338,6 +1341,9 @@
|
||||||
#define USB_VENDOR_ID_XAT 0x2505
|
#define USB_VENDOR_ID_XAT 0x2505
|
||||||
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|||||||
/* Validate controls. */
|
/* Validate controls. */
|
||||||
static int validate_ctrls(struct v4l2_ext_controls *cs,
|
static int validate_ctrls(struct v4l2_ext_controls *cs,
|
||||||
struct v4l2_ctrl_helper *helpers,
|
struct v4l2_ctrl_helper *helpers,
|
||||||
@@ -872,6 +922,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v
|
@@ -877,6 +927,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v
|
||||||
/* It's a driver bug if this happens. */
|
/* It's a driver bug if this happens. */
|
||||||
if (WARN_ON(ctrl->type != type))
|
if (WARN_ON(ctrl->type != type))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|||||||
|
|
||||||
--- a/sound/usb/quirks.c
|
--- a/sound/usb/quirks.c
|
||||||
+++ b/sound/usb/quirks.c
|
+++ b/sound/usb/quirks.c
|
||||||
@@ -1808,6 +1808,8 @@ static const struct usb_audio_quirk_flag
|
@@ -1810,6 +1810,8 @@ static const struct usb_audio_quirk_flag
|
||||||
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||||
DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */
|
DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */
|
||||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||||
|
@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
#ifndef arch_wants_old_prefaulted_pte
|
#ifndef arch_wants_old_prefaulted_pte
|
||||||
static inline bool arch_wants_old_prefaulted_pte(void)
|
static inline bool arch_wants_old_prefaulted_pte(void)
|
||||||
{
|
{
|
||||||
@@ -2808,7 +2796,7 @@ static inline int cow_user_page(struct p
|
@@ -2819,7 +2807,7 @@ static inline int cow_user_page(struct p
|
||||||
* On architectures with software "accessed" bits, we would
|
* On architectures with software "accessed" bits, we would
|
||||||
* take a double page fault, so mark it accessed here.
|
* take a double page fault, so mark it accessed here.
|
||||||
*/
|
*/
|
||||||
|
@ -612,7 +612,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
mem_cgroup_id_remove(memcg);
|
mem_cgroup_id_remove(memcg);
|
||||||
--- a/mm/memory.c
|
--- a/mm/memory.c
|
||||||
+++ b/mm/memory.c
|
+++ b/mm/memory.c
|
||||||
@@ -4821,6 +4821,27 @@ static inline void mm_account_fault(stru
|
@@ -4832,6 +4832,27 @@ static inline void mm_account_fault(stru
|
||||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
/*
|
/*
|
||||||
* By the time we get here, we already hold the mm semaphore
|
* By the time we get here, we already hold the mm semaphore
|
||||||
*
|
*
|
||||||
@@ -4852,11 +4873,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
@@ -4863,11 +4884,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||||
if (flags & FAULT_FLAG_USER)
|
if (flags & FAULT_FLAG_USER)
|
||||||
mem_cgroup_enter_user_fault();
|
mem_cgroup_enter_user_fault();
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
}
|
}
|
||||||
--- a/kernel/fork.c
|
--- a/kernel/fork.c
|
||||||
+++ b/kernel/fork.c
|
+++ b/kernel/fork.c
|
||||||
@@ -1091,6 +1091,7 @@ static struct mm_struct *mm_init(struct
|
@@ -1092,6 +1092,7 @@ static struct mm_struct *mm_init(struct
|
||||||
goto fail_nocontext;
|
goto fail_nocontext;
|
||||||
|
|
||||||
mm->user_ns = get_user_ns(user_ns);
|
mm->user_ns = get_user_ns(user_ns);
|
||||||
@ -390,7 +390,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
return mm;
|
return mm;
|
||||||
|
|
||||||
fail_nocontext:
|
fail_nocontext:
|
||||||
@@ -1133,6 +1134,7 @@ static inline void __mmput(struct mm_str
|
@@ -1134,6 +1135,7 @@ static inline void __mmput(struct mm_str
|
||||||
}
|
}
|
||||||
if (mm->binfmt)
|
if (mm->binfmt)
|
||||||
module_put(mm->binfmt->module);
|
module_put(mm->binfmt->module);
|
||||||
@ -398,7 +398,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
mmdrop(mm);
|
mmdrop(mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2622,6 +2624,13 @@ pid_t kernel_clone(struct kernel_clone_a
|
@@ -2624,6 +2626,13 @@ pid_t kernel_clone(struct kernel_clone_a
|
||||||
get_task_struct(p);
|
get_task_struct(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
#include <linux/sched/mm.h>
|
#include <linux/sched/mm.h>
|
||||||
#include <linux/sched/coredump.h>
|
#include <linux/sched/coredump.h>
|
||||||
#include <linux/sched/numa_balancing.h>
|
#include <linux/sched/numa_balancing.h>
|
||||||
@@ -1353,8 +1354,7 @@ again:
|
@@ -1364,8 +1365,7 @@ again:
|
||||||
force_flush = 1;
|
force_flush = 1;
|
||||||
set_page_dirty(page);
|
set_page_dirty(page);
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
mark_page_accessed(page);
|
mark_page_accessed(page);
|
||||||
}
|
}
|
||||||
rss[mm_counter(page)]--;
|
rss[mm_counter(page)]--;
|
||||||
@@ -4824,8 +4824,8 @@ static inline void mm_account_fault(stru
|
@@ -4835,8 +4835,8 @@ static inline void mm_account_fault(stru
|
||||||
#ifdef CONFIG_LRU_GEN
|
#ifdef CONFIG_LRU_GEN
|
||||||
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-2-keescook@chromium.org
|
|||||||
|
|
||||||
--- a/kernel/bpf/hashtab.c
|
--- a/kernel/bpf/hashtab.c
|
||||||
+++ b/kernel/bpf/hashtab.c
|
+++ b/kernel/bpf/hashtab.c
|
||||||
@@ -681,7 +681,7 @@ static int htab_map_gen_lookup(struct bp
|
@@ -684,7 +684,7 @@ static int htab_map_gen_lookup(struct bp
|
||||||
|
|
||||||
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
||||||
(void *(*)(struct bpf_map *map, void *key))NULL));
|
(void *(*)(struct bpf_map *map, void *key))NULL));
|
||||||
@ -63,7 +63,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-2-keescook@chromium.org
|
|||||||
*insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 1);
|
*insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 1);
|
||||||
*insn++ = BPF_ALU64_IMM(BPF_ADD, ret,
|
*insn++ = BPF_ALU64_IMM(BPF_ADD, ret,
|
||||||
offsetof(struct htab_elem, key) +
|
offsetof(struct htab_elem, key) +
|
||||||
@@ -722,7 +722,7 @@ static int htab_lru_map_gen_lookup(struc
|
@@ -725,7 +725,7 @@ static int htab_lru_map_gen_lookup(struc
|
||||||
|
|
||||||
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
||||||
(void *(*)(struct bpf_map *map, void *key))NULL));
|
(void *(*)(struct bpf_map *map, void *key))NULL));
|
||||||
@ -72,7 +72,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-2-keescook@chromium.org
|
|||||||
*insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 4);
|
*insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 4);
|
||||||
*insn++ = BPF_LDX_MEM(BPF_B, ref_reg, ret,
|
*insn++ = BPF_LDX_MEM(BPF_B, ref_reg, ret,
|
||||||
offsetof(struct htab_elem, lru_node) +
|
offsetof(struct htab_elem, lru_node) +
|
||||||
@@ -2417,7 +2417,7 @@ static int htab_of_map_gen_lookup(struct
|
@@ -2420,7 +2420,7 @@ static int htab_of_map_gen_lookup(struct
|
||||||
|
|
||||||
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
BUILD_BUG_ON(!__same_type(&__htab_map_lookup_elem,
|
||||||
(void *(*)(struct bpf_map *map, void *key))NULL));
|
(void *(*)(struct bpf_map *map, void *key))NULL));
|
||||||
|
@ -66,7 +66,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-3-keescook@chromium.org
|
|||||||
#define BPF_CALL_IMM(x) ((void *)(x) - (void *)__bpf_call_base)
|
#define BPF_CALL_IMM(x) ((void *)(x) - (void *)__bpf_call_base)
|
||||||
--- a/kernel/bpf/arraymap.c
|
--- a/kernel/bpf/arraymap.c
|
||||||
+++ b/kernel/bpf/arraymap.c
|
+++ b/kernel/bpf/arraymap.c
|
||||||
@@ -651,7 +651,7 @@ static const struct bpf_iter_seq_info it
|
@@ -654,7 +654,7 @@ static const struct bpf_iter_seq_info it
|
||||||
.seq_priv_size = sizeof(struct bpf_iter_seq_array_map_info),
|
.seq_priv_size = sizeof(struct bpf_iter_seq_array_map_info),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-3-keescook@chromium.org
|
|||||||
void *callback_ctx, u64 flags)
|
void *callback_ctx, u64 flags)
|
||||||
{
|
{
|
||||||
u32 i, key, num_elems = 0;
|
u32 i, key, num_elems = 0;
|
||||||
@@ -674,9 +674,8 @@ static int bpf_for_each_array_elem(struc
|
@@ -677,9 +677,8 @@ static int bpf_for_each_array_elem(struc
|
||||||
val = array->value + array->elem_size * i;
|
val = array->value + array->elem_size * i;
|
||||||
num_elems++;
|
num_elems++;
|
||||||
key = i;
|
key = i;
|
||||||
@ -89,7 +89,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-3-keescook@chromium.org
|
|||||||
break;
|
break;
|
||||||
--- a/kernel/bpf/hashtab.c
|
--- a/kernel/bpf/hashtab.c
|
||||||
+++ b/kernel/bpf/hashtab.c
|
+++ b/kernel/bpf/hashtab.c
|
||||||
@@ -2069,7 +2069,7 @@ static const struct bpf_iter_seq_info it
|
@@ -2072,7 +2072,7 @@ static const struct bpf_iter_seq_info it
|
||||||
.seq_priv_size = sizeof(struct bpf_iter_seq_hash_map_info),
|
.seq_priv_size = sizeof(struct bpf_iter_seq_hash_map_info),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ Link: https://lore.kernel.org/bpf/20210928230946.4062144-3-keescook@chromium.org
|
|||||||
void *callback_ctx, u64 flags)
|
void *callback_ctx, u64 flags)
|
||||||
{
|
{
|
||||||
struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
|
struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
|
||||||
@@ -2109,9 +2109,8 @@ static int bpf_for_each_hash_elem(struct
|
@@ -2112,9 +2112,8 @@ static int bpf_for_each_hash_elem(struct
|
||||||
val = elem->key + roundup_key_size;
|
val = elem->key + roundup_key_size;
|
||||||
}
|
}
|
||||||
num_elems++;
|
num_elems++;
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jan Kara <jack@suse.cz>
|
|
||||||
Date: Tue, 20 Dec 2022 12:38:45 +0100
|
|
||||||
Subject: udf: Allocate name buffer in directory iterator on heap
|
|
||||||
|
|
||||||
commit 0aba4860b0d0216a1a300484ff536171894d49d8 upstream.
|
|
||||||
|
|
||||||
Currently we allocate name buffer in directory iterators (struct
|
|
||||||
udf_fileident_iter) on stack. These structures are relatively large
|
|
||||||
(some 360 bytes on 64-bit architectures). For udf_rename() which needs
|
|
||||||
to keep three of these structures in parallel the stack usage becomes
|
|
||||||
rather heavy - 1536 bytes in total. Allocate the name buffer in the
|
|
||||||
iterator from heap to avoid excessive stack usage.
|
|
||||||
|
|
||||||
Link: https://lore.kernel.org/all/202212200558.lK9x1KW0-lkp@intel.com
|
|
||||||
Reported-by: kernel test robot <lkp@intel.com>
|
|
||||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
||||||
[Add extra include linux/slab.h]
|
|
||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
---
|
|
||||||
fs/udf/directory.c | 24 ++++++++++++++++--------
|
|
||||||
fs/udf/udfdecl.h | 2 +-
|
|
||||||
2 files changed, 17 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
--- a/fs/udf/directory.c
|
|
||||||
+++ b/fs/udf/directory.c
|
|
||||||
@@ -19,6 +19,7 @@
|
|
||||||
#include <linux/bio.h>
|
|
||||||
#include <linux/crc-itu-t.h>
|
|
||||||
#include <linux/iversion.h>
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
|
|
||||||
static int udf_verify_fi(struct udf_fileident_iter *iter)
|
|
||||||
{
|
|
||||||
@@ -248,9 +249,14 @@ int udf_fiiter_init(struct udf_fileident
|
|
||||||
iter->elen = 0;
|
|
||||||
iter->epos.bh = NULL;
|
|
||||||
iter->name = NULL;
|
|
||||||
+ iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL);
|
|
||||||
+ if (!iter->namebuf)
|
|
||||||
+ return -ENOMEM;
|
|
||||||
|
|
||||||
- if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
|
|
||||||
- return udf_copy_fi(iter);
|
|
||||||
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
|
|
||||||
+ err = udf_copy_fi(iter);
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (inode_bmap(dir, iter->pos >> dir->i_blkbits, &iter->epos,
|
|
||||||
&iter->eloc, &iter->elen, &iter->loffset) !=
|
|
||||||
@@ -260,17 +266,17 @@ int udf_fiiter_init(struct udf_fileident
|
|
||||||
udf_err(dir->i_sb,
|
|
||||||
"position %llu not allocated in directory (ino %lu)\n",
|
|
||||||
(unsigned long long)pos, dir->i_ino);
|
|
||||||
- return -EFSCORRUPTED;
|
|
||||||
+ err = -EFSCORRUPTED;
|
|
||||||
+ goto out;
|
|
||||||
}
|
|
||||||
err = udf_fiiter_load_bhs(iter);
|
|
||||||
if (err < 0)
|
|
||||||
- return err;
|
|
||||||
+ goto out;
|
|
||||||
err = udf_copy_fi(iter);
|
|
||||||
- if (err < 0) {
|
|
||||||
+out:
|
|
||||||
+ if (err < 0)
|
|
||||||
udf_fiiter_release(iter);
|
|
||||||
- return err;
|
|
||||||
- }
|
|
||||||
- return 0;
|
|
||||||
+ return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
int udf_fiiter_advance(struct udf_fileident_iter *iter)
|
|
||||||
@@ -307,6 +313,8 @@ void udf_fiiter_release(struct udf_filei
|
|
||||||
brelse(iter->bh[0]);
|
|
||||||
brelse(iter->bh[1]);
|
|
||||||
iter->bh[0] = iter->bh[1] = NULL;
|
|
||||||
+ kfree(iter->namebuf);
|
|
||||||
+ iter->namebuf = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void udf_copy_to_bufs(void *buf1, int len1, void *buf2, int len2,
|
|
||||||
--- a/fs/udf/udfdecl.h
|
|
||||||
+++ b/fs/udf/udfdecl.h
|
|
||||||
@@ -99,7 +99,7 @@ struct udf_fileident_iter {
|
|
||||||
struct extent_position epos; /* Position after the above extent */
|
|
||||||
struct fileIdentDesc fi; /* Copied directory entry */
|
|
||||||
uint8_t *name; /* Pointer to entry name */
|
|
||||||
- uint8_t namebuf[UDF_NAME_LEN_CS0]; /* Storage for entry name in case
|
|
||||||
+ uint8_t *namebuf; /* Storage for entry name in case
|
|
||||||
* the name is split between two blocks
|
|
||||||
*/
|
|
||||||
};
|
|
@ -1,40 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jan Kara <jack@suse.cz>
|
|
||||||
Date: Thu, 9 Feb 2023 10:33:09 +0100
|
|
||||||
Subject: udf: Avoid directory type conversion failure due to ENOMEM
|
|
||||||
|
|
||||||
commit df97f64dfa317a5485daf247b6c043a584ef95f9 upstream.
|
|
||||||
|
|
||||||
When converting directory from in-ICB to normal format, the last
|
|
||||||
iteration through the directory fixing up directory enteries can fail
|
|
||||||
due to ENOMEM. We do not expect this iteration to fail since the
|
|
||||||
directory is already verified to be correct and it is difficult to undo
|
|
||||||
the conversion at this point. So just use GFP_NOFAIL to make sure the
|
|
||||||
small allocation cannot fail.
|
|
||||||
|
|
||||||
Reported-by: syzbot+111eaa994ff74f8d440f@syzkaller.appspotmail.com
|
|
||||||
Fixes: 0aba4860b0d0 ("udf: Allocate name buffer in directory iterator on heap")
|
|
||||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
||||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
||||||
---
|
|
||||||
fs/udf/directory.c | 9 ++++++---
|
|
||||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/fs/udf/directory.c
|
|
||||||
+++ b/fs/udf/directory.c
|
|
||||||
@@ -249,9 +249,12 @@ int udf_fiiter_init(struct udf_fileident
|
|
||||||
iter->elen = 0;
|
|
||||||
iter->epos.bh = NULL;
|
|
||||||
iter->name = NULL;
|
|
||||||
- iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL);
|
|
||||||
- if (!iter->namebuf)
|
|
||||||
- return -ENOMEM;
|
|
||||||
+ /*
|
|
||||||
+ * When directory is verified, we don't expect directory iteration to
|
|
||||||
+ * fail and it can be difficult to undo without corrupting filesystem.
|
|
||||||
+ * So just do not allow memory allocation failures here.
|
|
||||||
+ */
|
|
||||||
+ iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL | __GFP_NOFAIL);
|
|
||||||
|
|
||||||
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
|
|
||||||
err = udf_copy_fi(iter);
|
|
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
tx_q->dma_tx_phy, chan);
|
tx_q->dma_tx_phy, chan);
|
||||||
stmmac_start_tx_dma(priv, chan);
|
stmmac_start_tx_dma(priv, chan);
|
||||||
@@ -3785,6 +3776,8 @@ static int stmmac_open(struct net_device
|
@@ -3786,6 +3777,8 @@ static int stmmac_open(struct net_device
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
ret = stmmac_hw_setup(dev, true);
|
ret = stmmac_hw_setup(dev, true);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
|
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
|
||||||
@@ -6411,6 +6404,7 @@ void stmmac_enable_rx_queue(struct stmma
|
@@ -6412,6 +6405,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
stmmac_clear_rx_descriptors(priv, queue);
|
stmmac_clear_rx_descriptors(priv, queue);
|
||||||
|
|
||||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
@@ -6472,6 +6466,7 @@ void stmmac_enable_tx_queue(struct stmma
|
@@ -6473,6 +6467,7 @@ void stmmac_enable_tx_queue(struct stmma
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
stmmac_clear_tx_descriptors(priv, queue);
|
stmmac_clear_tx_descriptors(priv, queue);
|
||||||
|
|
||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
@@ -7399,6 +7394,25 @@ int stmmac_suspend(struct device *dev)
|
@@ -7400,6 +7395,25 @@ int stmmac_suspend(struct device *dev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
/**
|
/**
|
||||||
* stmmac_reset_queues_param - reset queue parameters
|
* stmmac_reset_queues_param - reset queue parameters
|
||||||
* @priv: device pointer
|
* @priv: device pointer
|
||||||
@@ -7409,22 +7423,11 @@ static void stmmac_reset_queues_param(st
|
@@ -7410,22 +7424,11 @@ static void stmmac_reset_queues_param(st
|
||||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||||
u32 queue;
|
u32 queue;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
@@ -3839,8 +3839,6 @@ static int stmmac_release(struct net_dev
|
@@ -3840,8 +3840,6 @@ static int stmmac_release(struct net_dev
|
||||||
struct stmmac_priv *priv = netdev_priv(dev);
|
struct stmmac_priv *priv = netdev_priv(dev);
|
||||||
u32 chan;
|
u32 chan;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
if (device_may_wakeup(priv->device))
|
if (device_may_wakeup(priv->device))
|
||||||
phylink_speed_down(priv->phylink, false);
|
phylink_speed_down(priv->phylink, false);
|
||||||
/* Stop and disconnect the PHY */
|
/* Stop and disconnect the PHY */
|
||||||
@@ -3852,6 +3850,8 @@ static int stmmac_release(struct net_dev
|
@@ -3853,6 +3851,8 @@ static int stmmac_release(struct net_dev
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
hrtimer_cancel(&priv->tx_queue[chan].txtimer);
|
hrtimer_cancel(&priv->tx_queue[chan].txtimer);
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
if (unlikely(ret < 0)) {
|
if (unlikely(ret < 0)) {
|
||||||
netdev_err(priv->dev,
|
netdev_err(priv->dev,
|
||||||
"%s: alloc tx-%d MSI %d (error: %d)\n",
|
"%s: alloc tx-%d MSI %d (error: %d)\n",
|
||||||
@@ -3732,21 +3732,21 @@ static int stmmac_open(struct net_device
|
@@ -3733,21 +3733,21 @@ static int stmmac_open(struct net_device
|
||||||
bfsize = 0;
|
bfsize = 0;
|
||||||
|
|
||||||
if (bfsize < BUF_SIZE_16KiB)
|
if (bfsize < BUF_SIZE_16KiB)
|
||||||
@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
|
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
|
||||||
|
|
||||||
/* Setup per-TXQ tbs flag before TX descriptor alloc */
|
/* Setup per-TXQ tbs flag before TX descriptor alloc */
|
||||||
@@ -3804,7 +3804,7 @@ irq_error:
|
@@ -3805,7 +3805,7 @@ irq_error:
|
||||||
phylink_stop(priv->phylink);
|
phylink_stop(priv->phylink);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@@ -3848,7 +3848,7 @@ static int stmmac_release(struct net_dev
|
@@ -3849,7 +3849,7 @@ static int stmmac_release(struct net_dev
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
netif_tx_disable(dev);
|
netif_tx_disable(dev);
|
||||||
|
|
||||||
@@ -3912,7 +3912,7 @@ static bool stmmac_vlan_insert(struct st
|
@@ -3913,7 +3913,7 @@ static bool stmmac_vlan_insert(struct st
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
stmmac_set_tx_owner(priv, p);
|
stmmac_set_tx_owner(priv, p);
|
||||||
@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3930,7 +3930,7 @@ static bool stmmac_vlan_insert(struct st
|
@@ -3931,7 +3931,7 @@ static bool stmmac_vlan_insert(struct st
|
||||||
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
|
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
|
||||||
int total_len, bool last_segment, u32 queue)
|
int total_len, bool last_segment, u32 queue)
|
||||||
{
|
{
|
||||||
@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
struct dma_desc *desc;
|
struct dma_desc *desc;
|
||||||
u32 buff_size;
|
u32 buff_size;
|
||||||
int tmp_len;
|
int tmp_len;
|
||||||
@@ -3941,7 +3941,7 @@ static void stmmac_tso_allocator(struct
|
@@ -3942,7 +3942,7 @@ static void stmmac_tso_allocator(struct
|
||||||
dma_addr_t curr_addr;
|
dma_addr_t curr_addr;
|
||||||
|
|
||||||
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
||||||
@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
||||||
|
|
||||||
if (tx_q->tbs & STMMAC_TBS_AVAIL)
|
if (tx_q->tbs & STMMAC_TBS_AVAIL)
|
||||||
@@ -3969,7 +3969,7 @@ static void stmmac_tso_allocator(struct
|
@@ -3970,7 +3970,7 @@ static void stmmac_tso_allocator(struct
|
||||||
|
|
||||||
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
|
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
|
||||||
{
|
{
|
||||||
@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
int desc_size;
|
int desc_size;
|
||||||
|
|
||||||
if (likely(priv->extend_desc))
|
if (likely(priv->extend_desc))
|
||||||
@@ -4031,7 +4031,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
@@ -4032,7 +4032,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||||
dma_addr_t des;
|
dma_addr_t des;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
first_tx = tx_q->cur_tx;
|
first_tx = tx_q->cur_tx;
|
||||||
|
|
||||||
/* Compute header lengths */
|
/* Compute header lengths */
|
||||||
@@ -4071,7 +4071,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
@@ -4072,7 +4072,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||||
stmmac_set_mss(priv, mss_desc, mss);
|
stmmac_set_mss(priv, mss_desc, mss);
|
||||||
tx_q->mss = mss;
|
tx_q->mss = mss;
|
||||||
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
||||||
@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4195,7 +4195,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
@@ -4196,7 +4196,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||||
* ndo_start_xmit will fill this descriptor the next time it's
|
* ndo_start_xmit will fill this descriptor the next time it's
|
||||||
* called and stmmac_tx_clean may clean up to this descriptor.
|
* called and stmmac_tx_clean may clean up to this descriptor.
|
||||||
*/
|
*/
|
||||||
@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
|
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
|
||||||
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
|
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
|
||||||
@@ -4283,7 +4283,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
@@ -4284,7 +4284,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||||
int entry, first_tx;
|
int entry, first_tx;
|
||||||
dma_addr_t des;
|
dma_addr_t des;
|
||||||
|
|
||||||
@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
first_tx = tx_q->cur_tx;
|
first_tx = tx_q->cur_tx;
|
||||||
|
|
||||||
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
|
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
|
||||||
@@ -4346,7 +4346,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
@@ -4347,7 +4347,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||||
int len = skb_frag_size(frag);
|
int len = skb_frag_size(frag);
|
||||||
bool last_segment = (i == (nfrags - 1));
|
bool last_segment = (i == (nfrags - 1));
|
||||||
|
|
||||||
@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
WARN_ON(tx_q->tx_skbuff[entry]);
|
WARN_ON(tx_q->tx_skbuff[entry]);
|
||||||
|
|
||||||
if (likely(priv->extend_desc))
|
if (likely(priv->extend_desc))
|
||||||
@@ -4417,7 +4417,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
@@ -4418,7 +4418,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||||
* ndo_start_xmit will fill this descriptor the next time it's
|
* ndo_start_xmit will fill this descriptor the next time it's
|
||||||
* called and stmmac_tx_clean may clean up to this descriptor.
|
* called and stmmac_tx_clean may clean up to this descriptor.
|
||||||
*/
|
*/
|
||||||
@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
tx_q->cur_tx = entry;
|
tx_q->cur_tx = entry;
|
||||||
|
|
||||||
if (netif_msg_pktdata(priv)) {
|
if (netif_msg_pktdata(priv)) {
|
||||||
@@ -4529,7 +4529,7 @@ static void stmmac_rx_vlan(struct net_de
|
@@ -4530,7 +4530,7 @@ static void stmmac_rx_vlan(struct net_de
|
||||||
*/
|
*/
|
||||||
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
|
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
int dirty = stmmac_rx_dirty(priv, queue);
|
int dirty = stmmac_rx_dirty(priv, queue);
|
||||||
unsigned int entry = rx_q->dirty_rx;
|
unsigned int entry = rx_q->dirty_rx;
|
||||||
|
|
||||||
@@ -4579,7 +4579,7 @@ static inline void stmmac_rx_refill(stru
|
@@ -4580,7 +4580,7 @@ static inline void stmmac_rx_refill(stru
|
||||||
dma_wmb();
|
dma_wmb();
|
||||||
stmmac_set_rx_owner(priv, p, use_rx_wd);
|
stmmac_set_rx_owner(priv, p, use_rx_wd);
|
||||||
|
|
||||||
@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
rx_q->dirty_rx = entry;
|
rx_q->dirty_rx = entry;
|
||||||
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
|
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
|
||||||
@@ -4607,12 +4607,12 @@ static unsigned int stmmac_rx_buf1_len(s
|
@@ -4608,12 +4608,12 @@ static unsigned int stmmac_rx_buf1_len(s
|
||||||
|
|
||||||
/* First descriptor, not last descriptor and not split header */
|
/* First descriptor, not last descriptor and not split header */
|
||||||
if (status & rx_not_ls)
|
if (status & rx_not_ls)
|
||||||
@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
|
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
|
||||||
@@ -4628,7 +4628,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
@@ -4629,7 +4629,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||||
|
|
||||||
/* Not last descriptor */
|
/* Not last descriptor */
|
||||||
if (status & rx_not_ls)
|
if (status & rx_not_ls)
|
||||||
@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
plen = stmmac_get_rx_frame_len(priv, p, coe);
|
plen = stmmac_get_rx_frame_len(priv, p, coe);
|
||||||
|
|
||||||
@@ -4639,7 +4639,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
@@ -4640,7 +4640,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||||
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
||||||
struct xdp_frame *xdpf, bool dma_map)
|
struct xdp_frame *xdpf, bool dma_map)
|
||||||
{
|
{
|
||||||
@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
unsigned int entry = tx_q->cur_tx;
|
unsigned int entry = tx_q->cur_tx;
|
||||||
struct dma_desc *tx_desc;
|
struct dma_desc *tx_desc;
|
||||||
dma_addr_t dma_addr;
|
dma_addr_t dma_addr;
|
||||||
@@ -4702,7 +4702,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
|
@@ -4703,7 +4703,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
|
||||||
|
|
||||||
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
||||||
|
|
||||||
@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
tx_q->cur_tx = entry;
|
tx_q->cur_tx = entry;
|
||||||
|
|
||||||
return STMMAC_XDP_TX;
|
return STMMAC_XDP_TX;
|
||||||
@@ -4876,7 +4876,7 @@ static void stmmac_dispatch_skb_zc(struc
|
@@ -4877,7 +4877,7 @@ static void stmmac_dispatch_skb_zc(struc
|
||||||
|
|
||||||
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
|
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
|
||||||
{
|
{
|
||||||
@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
unsigned int entry = rx_q->dirty_rx;
|
unsigned int entry = rx_q->dirty_rx;
|
||||||
struct dma_desc *rx_desc = NULL;
|
struct dma_desc *rx_desc = NULL;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
@@ -4919,7 +4919,7 @@ static bool stmmac_rx_refill_zc(struct s
|
@@ -4920,7 +4920,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||||
dma_wmb();
|
dma_wmb();
|
||||||
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
|
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
|
||||||
|
|
||||||
@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rx_desc) {
|
if (rx_desc) {
|
||||||
@@ -4934,7 +4934,7 @@ static bool stmmac_rx_refill_zc(struct s
|
@@ -4935,7 +4935,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||||
|
|
||||||
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
|
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
|
||||||
{
|
{
|
||||||
@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
unsigned int count = 0, error = 0, len = 0;
|
unsigned int count = 0, error = 0, len = 0;
|
||||||
int dirty = stmmac_rx_dirty(priv, queue);
|
int dirty = stmmac_rx_dirty(priv, queue);
|
||||||
unsigned int next_entry = rx_q->cur_rx;
|
unsigned int next_entry = rx_q->cur_rx;
|
||||||
@@ -4956,7 +4956,7 @@ static int stmmac_rx_zc(struct stmmac_pr
|
@@ -4957,7 +4957,7 @@ static int stmmac_rx_zc(struct stmmac_pr
|
||||||
desc_size = sizeof(struct dma_desc);
|
desc_size = sizeof(struct dma_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
rx_q->dma_rx_phy, desc_size);
|
rx_q->dma_rx_phy, desc_size);
|
||||||
}
|
}
|
||||||
while (count < limit) {
|
while (count < limit) {
|
||||||
@@ -5003,7 +5003,7 @@ read_again:
|
@@ -5004,7 +5004,7 @@ read_again:
|
||||||
|
|
||||||
/* Prefetch the next RX descriptor */
|
/* Prefetch the next RX descriptor */
|
||||||
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
||||||
@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
next_entry = rx_q->cur_rx;
|
next_entry = rx_q->cur_rx;
|
||||||
|
|
||||||
if (priv->extend_desc)
|
if (priv->extend_desc)
|
||||||
@@ -5116,7 +5116,7 @@ read_again:
|
@@ -5117,7 +5117,7 @@ read_again:
|
||||||
*/
|
*/
|
||||||
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
|
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
|
||||||
{
|
{
|
||||||
@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
struct stmmac_channel *ch = &priv->channel[queue];
|
struct stmmac_channel *ch = &priv->channel[queue];
|
||||||
unsigned int count = 0, error = 0, len = 0;
|
unsigned int count = 0, error = 0, len = 0;
|
||||||
int status = 0, coe = priv->hw->rx_csum;
|
int status = 0, coe = priv->hw->rx_csum;
|
||||||
@@ -5129,7 +5129,7 @@ static int stmmac_rx(struct stmmac_priv
|
@@ -5130,7 +5130,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||||
int buf_sz;
|
int buf_sz;
|
||||||
|
|
||||||
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
|
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
|
||||||
@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
if (netif_msg_rx_status(priv)) {
|
if (netif_msg_rx_status(priv)) {
|
||||||
void *rx_head;
|
void *rx_head;
|
||||||
@@ -5143,7 +5143,7 @@ static int stmmac_rx(struct stmmac_priv
|
@@ -5144,7 +5144,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||||
desc_size = sizeof(struct dma_desc);
|
desc_size = sizeof(struct dma_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
rx_q->dma_rx_phy, desc_size);
|
rx_q->dma_rx_phy, desc_size);
|
||||||
}
|
}
|
||||||
while (count < limit) {
|
while (count < limit) {
|
||||||
@@ -5187,7 +5187,7 @@ read_again:
|
@@ -5188,7 +5188,7 @@ read_again:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
||||||
@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
next_entry = rx_q->cur_rx;
|
next_entry = rx_q->cur_rx;
|
||||||
|
|
||||||
if (priv->extend_desc)
|
if (priv->extend_desc)
|
||||||
@@ -5314,7 +5314,7 @@ read_again:
|
@@ -5315,7 +5315,7 @@ read_again:
|
||||||
buf1_len, dma_dir);
|
buf1_len, dma_dir);
|
||||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||||
buf->page, buf->page_offset, buf1_len,
|
buf->page, buf->page_offset, buf1_len,
|
||||||
@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Data payload appended into SKB */
|
/* Data payload appended into SKB */
|
||||||
page_pool_release_page(rx_q->page_pool, buf->page);
|
page_pool_release_page(rx_q->page_pool, buf->page);
|
||||||
@@ -5326,7 +5326,7 @@ read_again:
|
@@ -5327,7 +5327,7 @@ read_again:
|
||||||
buf2_len, dma_dir);
|
buf2_len, dma_dir);
|
||||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||||
buf->sec_page, 0, buf2_len,
|
buf->sec_page, 0, buf2_len,
|
||||||
@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Data payload appended into SKB */
|
/* Data payload appended into SKB */
|
||||||
page_pool_release_page(rx_q->page_pool, buf->sec_page);
|
page_pool_release_page(rx_q->page_pool, buf->sec_page);
|
||||||
@@ -5759,11 +5759,13 @@ static irqreturn_t stmmac_safety_interru
|
@@ -5760,11 +5760,13 @@ static irqreturn_t stmmac_safety_interru
|
||||||
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
|
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
|
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
|
||||||
@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Check if adapter is up */
|
/* Check if adapter is up */
|
||||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||||
@@ -5798,10 +5800,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
|
@@ -5799,10 +5801,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
|
||||||
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
|
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
|
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
|
||||||
@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Check if adapter is up */
|
/* Check if adapter is up */
|
||||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||||
@@ -5827,10 +5831,10 @@ static void stmmac_poll_controller(struc
|
@@ -5828,10 +5832,10 @@ static void stmmac_poll_controller(struc
|
||||||
|
|
||||||
if (priv->plat->multi_msi_en) {
|
if (priv->plat->multi_msi_en) {
|
||||||
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
|
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
|
||||||
@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
} else {
|
} else {
|
||||||
disable_irq(dev->irq);
|
disable_irq(dev->irq);
|
||||||
stmmac_interrupt(dev->irq, dev);
|
stmmac_interrupt(dev->irq, dev);
|
||||||
@@ -6011,34 +6015,34 @@ static int stmmac_rings_status_show(stru
|
@@ -6012,34 +6016,34 @@ static int stmmac_rings_status_show(stru
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (queue = 0; queue < rx_count; queue++) {
|
for (queue = 0; queue < rx_count; queue++) {
|
||||||
@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6385,7 +6389,7 @@ void stmmac_disable_rx_queue(struct stmm
|
@@ -6386,7 +6390,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||||
|
|
||||||
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
struct stmmac_channel *ch = &priv->channel[queue];
|
struct stmmac_channel *ch = &priv->channel[queue];
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 buf_size;
|
u32 buf_size;
|
||||||
@@ -6422,7 +6426,7 @@ void stmmac_enable_rx_queue(struct stmma
|
@@ -6423,7 +6427,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||||
rx_q->queue_index);
|
rx_q->queue_index);
|
||||||
} else {
|
} else {
|
||||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||||
@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
rx_q->queue_index);
|
rx_q->queue_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6448,7 +6452,7 @@ void stmmac_disable_tx_queue(struct stmm
|
@@ -6449,7 +6453,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||||
|
|
||||||
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
struct stmmac_channel *ch = &priv->channel[queue];
|
struct stmmac_channel *ch = &priv->channel[queue];
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -6498,7 +6502,7 @@ void stmmac_xdp_release(struct net_devic
|
@@ -6499,7 +6503,7 @@ void stmmac_xdp_release(struct net_devic
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Free the IRQ lines */
|
/* Free the IRQ lines */
|
||||||
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
||||||
@@ -6557,7 +6561,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6558,7 +6562,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
|
|
||||||
/* DMA RX Channel Configuration */
|
/* DMA RX Channel Configuration */
|
||||||
for (chan = 0; chan < rx_cnt; chan++) {
|
for (chan = 0; chan < rx_cnt; chan++) {
|
||||||
@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
rx_q->dma_rx_phy, chan);
|
rx_q->dma_rx_phy, chan);
|
||||||
@@ -6575,7 +6579,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
rx_q->queue_index);
|
rx_q->queue_index);
|
||||||
} else {
|
} else {
|
||||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||||
@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
rx_q->queue_index);
|
rx_q->queue_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6584,7 +6588,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6585,7 +6589,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
|
|
||||||
/* DMA TX Channel Configuration */
|
/* DMA TX Channel Configuration */
|
||||||
for (chan = 0; chan < tx_cnt; chan++) {
|
for (chan = 0; chan < tx_cnt; chan++) {
|
||||||
@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
tx_q->dma_tx_phy, chan);
|
tx_q->dma_tx_phy, chan);
|
||||||
@@ -6617,7 +6621,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6618,7 +6622,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
|
|
||||||
irq_error:
|
irq_error:
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@@ -6644,8 +6648,8 @@ int stmmac_xsk_wakeup(struct net_device
|
@@ -6645,8 +6649,8 @@ int stmmac_xsk_wakeup(struct net_device
|
||||||
queue >= priv->plat->tx_queues_to_use)
|
queue >= priv->plat->tx_queues_to_use)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
ch = &priv->channel[queue];
|
ch = &priv->channel[queue];
|
||||||
|
|
||||||
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
|
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
|
||||||
@@ -6905,8 +6909,8 @@ int stmmac_reinit_ringparam(struct net_d
|
@@ -6906,8 +6910,8 @@ int stmmac_reinit_ringparam(struct net_d
|
||||||
if (netif_running(dev))
|
if (netif_running(dev))
|
||||||
stmmac_release(dev);
|
stmmac_release(dev);
|
||||||
|
|
||||||
@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
if (netif_running(dev))
|
if (netif_running(dev))
|
||||||
ret = stmmac_open(dev);
|
ret = stmmac_open(dev);
|
||||||
@@ -7344,7 +7348,7 @@ int stmmac_suspend(struct device *dev)
|
@@ -7345,7 +7349,7 @@ int stmmac_suspend(struct device *dev)
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
if (priv->eee_enabled) {
|
if (priv->eee_enabled) {
|
||||||
priv->tx_path_in_lpi_mode = false;
|
priv->tx_path_in_lpi_mode = false;
|
||||||
@@ -7396,7 +7400,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
@@ -7397,7 +7401,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||||
|
|
||||||
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
rx_q->cur_rx = 0;
|
rx_q->cur_rx = 0;
|
||||||
rx_q->dirty_rx = 0;
|
rx_q->dirty_rx = 0;
|
||||||
@@ -7404,7 +7408,7 @@ static void stmmac_reset_rx_queue(struct
|
@@ -7405,7 +7409,7 @@ static void stmmac_reset_rx_queue(struct
|
||||||
|
|
||||||
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
|
@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
stmmac_reset_tx_queue(priv, chan);
|
stmmac_reset_tx_queue(priv, chan);
|
||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
tx_q->dma_tx_phy, chan);
|
tx_q->dma_tx_phy, chan);
|
||||||
@@ -3688,19 +3751,93 @@ static int stmmac_request_irq(struct net
|
@@ -3689,19 +3752,93 @@ static int stmmac_request_irq(struct net
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
u32 chan;
|
u32 chan;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -3727,45 +3864,10 @@ static int stmmac_open(struct net_device
|
@@ -3728,45 +3865,10 @@ static int stmmac_open(struct net_device
|
||||||
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
|
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
|
||||||
priv->xstats.threshold = tc;
|
priv->xstats.threshold = tc;
|
||||||
|
|
||||||
@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
if (priv->plat->serdes_powerup) {
|
if (priv->plat->serdes_powerup) {
|
||||||
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
|
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
|
||||||
@@ -3808,14 +3910,28 @@ irq_error:
|
@@ -3809,14 +3911,28 @@ irq_error:
|
||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
|
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
|
||||||
{
|
{
|
||||||
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
|
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
|
||||||
@@ -3864,7 +3980,7 @@ static int stmmac_release(struct net_dev
|
@@ -3865,7 +3981,7 @@ static int stmmac_release(struct net_dev
|
||||||
stmmac_stop_all_dma(priv);
|
stmmac_stop_all_dma(priv);
|
||||||
|
|
||||||
/* Release and free the Rx/Tx resources */
|
/* Release and free the Rx/Tx resources */
|
||||||
@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Disable the MAC Rx/Tx */
|
/* Disable the MAC Rx/Tx */
|
||||||
stmmac_mac_set(priv, priv->ioaddr, false);
|
stmmac_mac_set(priv, priv->ioaddr, false);
|
||||||
@@ -6384,7 +6500,7 @@ void stmmac_disable_rx_queue(struct stmm
|
@@ -6385,7 +6501,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||||
spin_unlock_irqrestore(&ch->lock, flags);
|
spin_unlock_irqrestore(&ch->lock, flags);
|
||||||
|
|
||||||
stmmac_stop_rx_dma(priv, queue);
|
stmmac_stop_rx_dma(priv, queue);
|
||||||
@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
@@ -6395,21 +6511,21 @@ void stmmac_enable_rx_queue(struct stmma
|
@@ -6396,21 +6512,21 @@ void stmmac_enable_rx_queue(struct stmma
|
||||||
u32 buf_size;
|
u32 buf_size;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
rx_q->dma_rx_phy, rx_q->queue_index);
|
rx_q->dma_rx_phy, rx_q->queue_index);
|
||||||
@@ -6447,7 +6563,7 @@ void stmmac_disable_tx_queue(struct stmm
|
@@ -6448,7 +6564,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||||
spin_unlock_irqrestore(&ch->lock, flags);
|
spin_unlock_irqrestore(&ch->lock, flags);
|
||||||
|
|
||||||
stmmac_stop_tx_dma(priv, queue);
|
stmmac_stop_tx_dma(priv, queue);
|
||||||
@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
@@ -6457,21 +6573,21 @@ void stmmac_enable_tx_queue(struct stmma
|
@@ -6458,21 +6574,21 @@ void stmmac_enable_tx_queue(struct stmma
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
tx_q->dma_tx_phy, tx_q->queue_index);
|
tx_q->dma_tx_phy, tx_q->queue_index);
|
||||||
@@ -6511,7 +6627,7 @@ void stmmac_xdp_release(struct net_devic
|
@@ -6512,7 +6628,7 @@ void stmmac_xdp_release(struct net_devic
|
||||||
stmmac_stop_all_dma(priv);
|
stmmac_stop_all_dma(priv);
|
||||||
|
|
||||||
/* Release and free the Rx/Tx resources */
|
/* Release and free the Rx/Tx resources */
|
||||||
@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
/* Disable the MAC Rx/Tx */
|
/* Disable the MAC Rx/Tx */
|
||||||
stmmac_mac_set(priv, priv->ioaddr, false);
|
stmmac_mac_set(priv, priv->ioaddr, false);
|
||||||
@@ -6536,14 +6652,14 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6537,14 +6653,14 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
u32 chan;
|
u32 chan;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
|
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
|
||||||
__func__);
|
__func__);
|
||||||
@@ -6625,7 +6741,7 @@ irq_error:
|
@@ -6626,7 +6742,7 @@ irq_error:
|
||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
dma_desc_error:
|
dma_desc_error:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -7491,7 +7607,7 @@ int stmmac_resume(struct device *dev)
|
@@ -7492,7 +7608,7 @@ int stmmac_resume(struct device *dev)
|
||||||
stmmac_reset_queues_param(priv);
|
stmmac_reset_queues_param(priv);
|
||||||
|
|
||||||
stmmac_free_tx_skbufs(priv);
|
stmmac_free_tx_skbufs(priv);
|
||||||
|
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
@@ -5626,18 +5626,15 @@ static int stmmac_change_mtu(struct net_
|
@@ -5627,18 +5627,15 @@ static int stmmac_change_mtu(struct net_
|
||||||
{
|
{
|
||||||
struct stmmac_priv *priv = netdev_priv(dev);
|
struct stmmac_priv *priv = netdev_priv(dev);
|
||||||
int txfifosz = priv->plat->tx_fifo_size;
|
int txfifosz = priv->plat->tx_fifo_size;
|
||||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|||||||
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
|
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
|
||||||
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
|
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -5649,8 +5646,29 @@ static int stmmac_change_mtu(struct net_
|
@@ -5650,8 +5647,29 @@ static int stmmac_change_mtu(struct net_
|
||||||
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
|||||||
|
|
||||||
#define QUECTEL_VENDOR_ID 0x2c7c
|
#define QUECTEL_VENDOR_ID 0x2c7c
|
||||||
/* These Quectel products use Quectel's vendor ID */
|
/* These Quectel products use Quectel's vendor ID */
|
||||||
@@ -1159,6 +1164,11 @@ static const struct usb_device_id option
|
@@ -1160,6 +1165,11 @@ static const struct usb_device_id option
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
|
||||||
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
|
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
|
||||||
@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
|||||||
/* Quectel products using Qualcomm vendor ID */
|
/* Quectel products using Qualcomm vendor ID */
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
|
||||||
@@ -1200,6 +1210,11 @@ static const struct usb_device_id option
|
@@ -1201,6 +1211,11 @@ static const struct usb_device_id option
|
||||||
.driver_info = ZLP },
|
.driver_info = ZLP },
|
||||||
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
||||||
.driver_info = RSVD(4) },
|
.driver_info = RSVD(4) },
|
||||||
|
@ -98,7 +98,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (chan = 0; chan < rx_channel_count; chan++)
|
for (chan = 0; chan < rx_channel_count; chan++)
|
||||||
@@ -3906,7 +3899,7 @@ irq_error:
|
@@ -3907,7 +3900,7 @@ irq_error:
|
||||||
phylink_stop(priv->phylink);
|
phylink_stop(priv->phylink);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -107,7 +107,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@@ -3964,7 +3957,7 @@ static int stmmac_release(struct net_dev
|
@@ -3965,7 +3958,7 @@ static int stmmac_release(struct net_dev
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -116,7 +116,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
|
|
||||||
netif_tx_disable(dev);
|
netif_tx_disable(dev);
|
||||||
|
|
||||||
@@ -6636,7 +6629,7 @@ void stmmac_xdp_release(struct net_devic
|
@@ -6637,7 +6630,7 @@ void stmmac_xdp_release(struct net_devic
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -125,7 +125,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
|
|
||||||
/* Free the IRQ lines */
|
/* Free the IRQ lines */
|
||||||
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
||||||
@@ -6731,8 +6724,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6732,8 +6725,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
|
stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
|
||||||
tx_q->tx_tail_addr, chan);
|
tx_q->tx_tail_addr, chan);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the MAC Rx/Tx */
|
/* Enable the MAC Rx/Tx */
|
||||||
@@ -6755,7 +6747,7 @@ int stmmac_xdp_open(struct net_device *d
|
@@ -6756,7 +6748,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||||
|
|
||||||
irq_error:
|
irq_error:
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
@ -144,7 +144,7 @@ Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
|
|||||||
|
|
||||||
stmmac_hw_teardown(dev);
|
stmmac_hw_teardown(dev);
|
||||||
init_error:
|
init_error:
|
||||||
@@ -7482,7 +7474,7 @@ int stmmac_suspend(struct device *dev)
|
@@ -7483,7 +7475,7 @@ int stmmac_suspend(struct device *dev)
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
|
@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|||||||
|
|
||||||
--- a/drivers/usb/dwc3/core.c
|
--- a/drivers/usb/dwc3/core.c
|
||||||
+++ b/drivers/usb/dwc3/core.c
|
+++ b/drivers/usb/dwc3/core.c
|
||||||
@@ -1112,6 +1112,11 @@ static int dwc3_core_init(struct dwc3 *d
|
@@ -1118,6 +1118,11 @@ static int dwc3_core_init(struct dwc3 *d
|
||||||
if (dwc->parkmode_disable_ss_quirk)
|
if (dwc->parkmode_disable_ss_quirk)
|
||||||
reg |= DWC3_GUCTL1_PARKMODE_DISABLE_SS;
|
reg |= DWC3_GUCTL1_PARKMODE_DISABLE_SS;
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/94eee7ab434fe11eb0787f691e9f
|
|||||||
int rockchip_drm_endpoint_is_subdriver(struct device_node *ep);
|
int rockchip_drm_endpoint_is_subdriver(struct device_node *ep);
|
||||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||||
@@ -2189,6 +2189,8 @@ static int vop_bind(struct device *dev,
|
@@ -2230,6 +2230,8 @@ static int vop_bind(struct device *dev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-3-s.h
|
|||||||
|
|
||||||
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
|
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
|
||||||
{
|
{
|
||||||
@@ -511,7 +516,7 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -513,7 +518,7 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
hdmi->dev = &pdev->dev;
|
hdmi->dev = &pdev->dev;
|
||||||
hdmi->chip_data = plat_data->phy_data;
|
hdmi->chip_data = plat_data->phy_data;
|
||||||
plat_data->phy_data = hdmi;
|
plat_data->phy_data = hdmi;
|
||||||
|
@ -61,7 +61,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-5-s.h
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder)
|
static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder)
|
||||||
@@ -542,9 +543,9 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -544,9 +545,9 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-5-s.h
|
|||||||
ret);
|
ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -563,7 +564,7 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -565,7 +566,7 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
if (IS_ERR(hdmi->hdmi)) {
|
if (IS_ERR(hdmi->hdmi)) {
|
||||||
ret = PTR_ERR(hdmi->hdmi);
|
ret = PTR_ERR(hdmi->hdmi);
|
||||||
drm_encoder_cleanup(encoder);
|
drm_encoder_cleanup(encoder);
|
||||||
@ -82,7 +82,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-5-s.h
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -575,7 +576,7 @@ static void dw_hdmi_rockchip_unbind(stru
|
@@ -577,7 +578,7 @@ static void dw_hdmi_rockchip_unbind(stru
|
||||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||||
|
|
||||||
dw_hdmi_unbind(hdmi->hdmi);
|
dw_hdmi_unbind(hdmi->hdmi);
|
||||||
|
@ -27,7 +27,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-8-s.h
|
|||||||
#define HIWORD_UPDATE(val, mask) (val | (mask) << 16)
|
#define HIWORD_UPDATE(val, mask) (val | (mask) << 16)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -473,6 +477,19 @@ static const struct dw_hdmi_plat_data rk
|
@@ -475,6 +479,19 @@ static const struct dw_hdmi_plat_data rk
|
||||||
.use_drm_infoframe = true,
|
.use_drm_infoframe = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-8-s.h
|
|||||||
static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
|
static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
|
||||||
{ .compatible = "rockchip,rk3228-dw-hdmi",
|
{ .compatible = "rockchip,rk3228-dw-hdmi",
|
||||||
.data = &rk3228_hdmi_drv_data
|
.data = &rk3228_hdmi_drv_data
|
||||||
@@ -486,6 +503,9 @@ static const struct of_device_id dw_hdmi
|
@@ -488,6 +505,9 @@ static const struct of_device_id dw_hdmi
|
||||||
{ .compatible = "rockchip,rk3399-dw-hdmi",
|
{ .compatible = "rockchip,rk3399-dw-hdmi",
|
||||||
.data = &rk3399_hdmi_drv_data
|
.data = &rk3399_hdmi_drv_data
|
||||||
},
|
},
|
||||||
@ -57,7 +57,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-8-s.h
|
|||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, dw_hdmi_rockchip_dt_ids);
|
MODULE_DEVICE_TABLE(of, dw_hdmi_rockchip_dt_ids);
|
||||||
@@ -520,6 +540,9 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -522,6 +542,9 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
encoder = &hdmi->encoder.encoder;
|
encoder = &hdmi->encoder.encoder;
|
||||||
|
|
||||||
encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
|
encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
|
||||||
@ -67,7 +67,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-8-s.h
|
|||||||
/*
|
/*
|
||||||
* If we failed to find the CRTC(s) which this encoder is
|
* If we failed to find the CRTC(s) which this encoder is
|
||||||
* supposed to be connected to, it's because the CRTC has
|
* supposed to be connected to, it's because the CRTC has
|
||||||
@@ -550,6 +573,14 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -552,6 +575,14 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-10-s.
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,11 +577,23 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -568,11 +579,23 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-10-s.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hdmi->chip_data == &rk3568_chip_data) {
|
if (hdmi->chip_data == &rk3568_chip_data) {
|
||||||
@@ -594,10 +617,19 @@ static int dw_hdmi_rockchip_bind(struct
|
@@ -596,10 +619,19 @@ static int dw_hdmi_rockchip_bind(struct
|
||||||
*/
|
*/
|
||||||
if (IS_ERR(hdmi->hdmi)) {
|
if (IS_ERR(hdmi->hdmi)) {
|
||||||
ret = PTR_ERR(hdmi->hdmi);
|
ret = PTR_ERR(hdmi->hdmi);
|
||||||
@ -97,7 +97,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220422072841.2206452-10-s.
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,6 +640,9 @@ static void dw_hdmi_rockchip_unbind(stru
|
@@ -610,6 +642,9 @@ static void dw_hdmi_rockchip_unbind(stru
|
||||||
|
|
||||||
dw_hdmi_unbind(hdmi->hdmi);
|
dw_hdmi_unbind(hdmi->hdmi);
|
||||||
clk_disable_unprepare(hdmi->ref_clk);
|
clk_disable_unprepare(hdmi->ref_clk);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <linux/tcp.h>
|
#include <linux/tcp.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
@@ -5315,12 +5316,16 @@ static int rtl_init_one(struct pci_dev *
|
@@ -5344,12 +5345,16 @@ static int rtl_init_one(struct pci_dev *
|
||||||
int jumbo_max, region, rc;
|
int jumbo_max, region, rc;
|
||||||
enum mac_version chipset;
|
enum mac_version chipset;
|
||||||
struct net_device *dev;
|
struct net_device *dev;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||||
@@ -7136,6 +7136,7 @@ int stmmac_dvr_probe(struct device *devi
|
@@ -7134,6 +7134,7 @@ int stmmac_dvr_probe(struct device *devi
|
||||||
{
|
{
|
||||||
struct net_device *ndev = NULL;
|
struct net_device *ndev = NULL;
|
||||||
struct stmmac_priv *priv;
|
struct stmmac_priv *priv;
|
||||||
@ -8,7 +8,7 @@
|
|||||||
u32 rxq;
|
u32 rxq;
|
||||||
int i, ret = 0;
|
int i, ret = 0;
|
||||||
|
|
||||||
@@ -7144,6 +7145,9 @@ int stmmac_dvr_probe(struct device *devi
|
@@ -7142,6 +7143,9 @@ int stmmac_dvr_probe(struct device *devi
|
||||||
if (!ndev)
|
if (!ndev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||||
@@ -2197,6 +2197,8 @@ static struct page *its_allocate_prop_ta
|
@@ -2203,6 +2203,8 @@ static struct page *its_allocate_prop_ta
|
||||||
{
|
{
|
||||||
struct page *prop_page;
|
struct page *prop_page;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
||||||
if (!prop_page)
|
if (!prop_page)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2320,6 +2322,7 @@ static int its_setup_baser(struct its_no
|
@@ -2326,6 +2328,7 @@ static int its_setup_baser(struct its_no
|
||||||
u32 alloc_pages, psz;
|
u32 alloc_pages, psz;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
void *base;
|
void *base;
|
||||||
@ -29,7 +29,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
psz = baser->psz;
|
psz = baser->psz;
|
||||||
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
|
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
|
||||||
@@ -2331,7 +2334,10 @@ static int its_setup_baser(struct its_no
|
@@ -2337,7 +2340,10 @@ static int its_setup_baser(struct its_no
|
||||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
if (!page)
|
if (!page)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@@ -2960,6 +2966,8 @@ static struct page *its_allocate_pending
|
@@ -2966,6 +2972,8 @@ static struct page *its_allocate_pending
|
||||||
{
|
{
|
||||||
struct page *pend_page;
|
struct page *pend_page;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
||||||
get_order(LPI_PENDBASE_SZ));
|
get_order(LPI_PENDBASE_SZ));
|
||||||
if (!pend_page)
|
if (!pend_page)
|
||||||
@@ -3303,7 +3311,11 @@ static bool its_alloc_table_entry(struct
|
@@ -3309,7 +3317,11 @@ static bool its_alloc_table_entry(struct
|
||||||
|
|
||||||
/* Allocate memory for 2nd level table */
|
/* Allocate memory for 2nd level table */
|
||||||
if (!table[idx]) {
|
if (!table[idx]) {
|
||||||
@ -63,7 +63,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
get_order(baser->psz));
|
get_order(baser->psz));
|
||||||
if (!page)
|
if (!page)
|
||||||
return false;
|
return false;
|
||||||
@@ -3392,6 +3404,7 @@ static struct its_device *its_create_dev
|
@@ -3398,6 +3410,7 @@ static struct its_device *its_create_dev
|
||||||
int nr_lpis;
|
int nr_lpis;
|
||||||
int nr_ites;
|
int nr_ites;
|
||||||
int sz;
|
int sz;
|
||||||
@ -71,7 +71,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
if (!its_alloc_device_table(its, dev_id))
|
if (!its_alloc_device_table(its, dev_id))
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3407,7 +3420,10 @@ static struct its_device *its_create_dev
|
@@ -3413,7 +3426,10 @@ static struct its_device *its_create_dev
|
||||||
nr_ites = max(2, nvecs);
|
nr_ites = max(2, nvecs);
|
||||||
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
||||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||||
@ -83,7 +83,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
if (alloc_lpis) {
|
if (alloc_lpis) {
|
||||||
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
||||||
if (lpi_map)
|
if (lpi_map)
|
||||||
@@ -4988,6 +5004,7 @@ static int __init its_probe_one(struct r
|
@@ -5000,6 +5016,7 @@ static int __init its_probe_one(struct r
|
||||||
u64 baser, tmp, typer;
|
u64 baser, tmp, typer;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
int err;
|
int err;
|
||||||
@ -91,7 +91,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
its_base = ioremap(res->start, SZ_64K);
|
its_base = ioremap(res->start, SZ_64K);
|
||||||
if (!its_base) {
|
if (!its_base) {
|
||||||
@@ -5056,7 +5073,10 @@ static int __init its_probe_one(struct r
|
@@ -5068,7 +5085,10 @@ static int __init its_probe_one(struct r
|
||||||
|
|
||||||
its->numa_node = numa_node;
|
its->numa_node = numa_node;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||||
@@ -2384,6 +2384,10 @@ retry_baser:
|
@@ -2390,6 +2390,10 @@ retry_baser:
|
||||||
its_write_baser(its, baser, val);
|
its_write_baser(its, baser, val);
|
||||||
tmp = baser->val;
|
tmp = baser->val;
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
if ((val ^ tmp) & GITS_BASER_SHAREABILITY_MASK) {
|
if ((val ^ tmp) & GITS_BASER_SHAREABILITY_MASK) {
|
||||||
/*
|
/*
|
||||||
* Shareability didn't stick. Just use
|
* Shareability didn't stick. Just use
|
||||||
@@ -3125,6 +3129,10 @@ static void its_cpu_init_lpis(void)
|
@@ -3131,6 +3135,10 @@ static void its_cpu_init_lpis(void)
|
||||||
gicr_write_propbaser(val, rbase + GICR_PROPBASER);
|
gicr_write_propbaser(val, rbase + GICR_PROPBASER);
|
||||||
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
|
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
||||||
if (!(tmp & GICR_PROPBASER_SHAREABILITY_MASK)) {
|
if (!(tmp & GICR_PROPBASER_SHAREABILITY_MASK)) {
|
||||||
/*
|
/*
|
||||||
@@ -3149,6 +3157,10 @@ static void its_cpu_init_lpis(void)
|
@@ -3155,6 +3163,10 @@ static void its_cpu_init_lpis(void)
|
||||||
gicr_write_pendbaser(val, rbase + GICR_PENDBASER);
|
gicr_write_pendbaser(val, rbase + GICR_PENDBASER);
|
||||||
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
|
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
||||||
/*
|
/*
|
||||||
* The HW reports non-shareable, we must remove the
|
* The HW reports non-shareable, we must remove the
|
||||||
@@ -5107,6 +5119,10 @@ static int __init its_probe_one(struct r
|
@@ -5119,6 +5131,10 @@ static int __init its_probe_one(struct r
|
||||||
gits_write_cbaser(baser, its->base + GITS_CBASER);
|
gits_write_cbaser(baser, its->base + GITS_CBASER);
|
||||||
tmp = gits_read_cbaser(its->base + GITS_CBASER);
|
tmp = gits_read_cbaser(its->base + GITS_CBASER);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
|
|||||||
|
|
||||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||||
@@ -2385,8 +2385,12 @@ retry_baser:
|
@@ -2391,8 +2391,12 @@ retry_baser:
|
||||||
tmp = baser->val;
|
tmp = baser->val;
|
||||||
|
|
||||||
if (of_machine_is_compatible("rockchip,rk3568") ||
|
if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||||
|
@ -12,7 +12,7 @@ Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
|
|||||||
|
|
||||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||||
@@ -2385,7 +2385,8 @@ retry_baser:
|
@@ -2391,7 +2391,8 @@ retry_baser:
|
||||||
tmp = baser->val;
|
tmp = baser->val;
|
||||||
|
|
||||||
if (of_machine_is_compatible("rockchip,rk3568") ||
|
if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||||
@ -22,7 +22,7 @@ Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
|
|||||||
if (tmp & GITS_BASER_SHAREABILITY_MASK)
|
if (tmp & GITS_BASER_SHAREABILITY_MASK)
|
||||||
tmp &= ~GITS_BASER_SHAREABILITY_MASK;
|
tmp &= ~GITS_BASER_SHAREABILITY_MASK;
|
||||||
else
|
else
|
||||||
@@ -3134,7 +3135,8 @@ static void its_cpu_init_lpis(void)
|
@@ -3140,7 +3141,8 @@ static void its_cpu_init_lpis(void)
|
||||||
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
|
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
|
||||||
|
|
||||||
if (of_machine_is_compatible("rockchip,rk3568") ||
|
if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||||
@ -32,7 +32,7 @@ Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
|
|||||||
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
||||||
|
|
||||||
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
||||||
@@ -3162,7 +3164,8 @@ static void its_cpu_init_lpis(void)
|
@@ -3168,7 +3170,8 @@ static void its_cpu_init_lpis(void)
|
||||||
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
|
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
|
||||||
|
|
||||||
if (of_machine_is_compatible("rockchip,rk3568") ||
|
if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||||
@ -42,7 +42,7 @@ Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
|
|||||||
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
||||||
|
|
||||||
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
||||||
@@ -5124,7 +5127,8 @@ static int __init its_probe_one(struct r
|
@@ -5136,7 +5139,8 @@ static int __init its_probe_one(struct r
|
||||||
tmp = gits_read_cbaser(its->base + GITS_CBASER);
|
tmp = gits_read_cbaser(its->base + GITS_CBASER);
|
||||||
|
|
||||||
if (of_machine_is_compatible("rockchip,rk3568") ||
|
if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: hmz007 <hmz007@gmail.com>
|
|||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "rockchip,rk3328";
|
compatible = "rockchip,rk3328";
|
||||||
@@ -1019,6 +1020,78 @@
|
@@ -1018,6 +1019,78 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user