diff options
Diffstat (limited to 'drivers')
49 files changed, 292 insertions, 134 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 2736e25e9dc6..d50a7b6ccddd 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -710,6 +710,8 @@ static DEFINE_RAW_SPINLOCK(c3_lock); | |||
| 710 | static void acpi_idle_enter_bm(struct acpi_processor *pr, | 710 | static void acpi_idle_enter_bm(struct acpi_processor *pr, |
| 711 | struct acpi_processor_cx *cx, bool timer_bc) | 711 | struct acpi_processor_cx *cx, bool timer_bc) |
| 712 | { | 712 | { |
| 713 | acpi_unlazy_tlb(smp_processor_id()); | ||
| 714 | |||
| 713 | /* | 715 | /* |
| 714 | * Must be done before busmaster disable as we might need to | 716 | * Must be done before busmaster disable as we might need to |
| 715 | * access HPET ! | 717 | * access HPET ! |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 6804ddab3052..8082871b409a 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
| @@ -160,6 +160,14 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d) | |||
| 160 | return 0; | 160 | return 0; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | static bool acpi_sleep_no_lps0; | ||
| 164 | |||
| 165 | static int __init init_no_lps0(const struct dmi_system_id *d) | ||
| 166 | { | ||
| 167 | acpi_sleep_no_lps0 = true; | ||
| 168 | return 0; | ||
| 169 | } | ||
| 170 | |||
| 163 | static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { | 171 | static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { |
| 164 | { | 172 | { |
| 165 | .callback = init_old_suspend_ordering, | 173 | .callback = init_old_suspend_ordering, |
| @@ -343,6 +351,19 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { | |||
| 343 | DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), | 351 | DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), |
| 344 | }, | 352 | }, |
| 345 | }, | 353 | }, |
| 354 | /* | ||
| 355 | * https://bugzilla.kernel.org/show_bug.cgi?id=196907 | ||
| 356 | * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power | ||
| 357 | * S0 Idle firmware interface. | ||
| 358 | */ | ||
| 359 | { | ||
| 360 | .callback = init_no_lps0, | ||
| 361 | .ident = "Dell XPS13 9360", | ||
| 362 | .matches = { | ||
| 363 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
| 364 | DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"), | ||
| 365 | }, | ||
| 366 | }, | ||
| 346 | {}, | 367 | {}, |
| 347 | }; | 368 | }; |
| 348 | 369 | ||
| @@ -485,6 +506,7 @@ static void acpi_pm_end(void) | |||
| 485 | } | 506 | } |
| 486 | #else /* !CONFIG_ACPI_SLEEP */ | 507 | #else /* !CONFIG_ACPI_SLEEP */ |
| 487 | #define acpi_target_sleep_state ACPI_STATE_S0 | 508 | #define acpi_target_sleep_state ACPI_STATE_S0 |
| 509 | #define acpi_sleep_no_lps0 (false) | ||
| 488 | static inline void acpi_sleep_dmi_check(void) {} | 510 | static inline void acpi_sleep_dmi_check(void) {} |
| 489 | #endif /* CONFIG_ACPI_SLEEP */ | 511 | #endif /* CONFIG_ACPI_SLEEP */ |
| 490 | 512 | ||
| @@ -863,6 +885,12 @@ static int lps0_device_attach(struct acpi_device *adev, | |||
| 863 | if (lps0_device_handle) | 885 | if (lps0_device_handle) |
| 864 | return 0; | 886 | return 0; |
| 865 | 887 | ||
| 888 | if (acpi_sleep_no_lps0) { | ||
| 889 | acpi_handle_info(adev->handle, | ||
| 890 | "Low Power S0 Idle interface disabled\n"); | ||
| 891 | return 0; | ||
| 892 | } | ||
| 893 | |||
| 866 | if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) | 894 | if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) |
| 867 | return 0; | 895 | return 0; |
| 868 | 896 | ||
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c index 25306fa27251..a9020f82eea7 100644 --- a/drivers/auxdisplay/img-ascii-lcd.c +++ b/drivers/auxdisplay/img-ascii-lcd.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2016 Imagination Technologies | 2 | * Copyright (C) 2016 Imagination Technologies |
| 3 | * Author: Paul Burton <paul.burton@imgtec.com> | 3 | * Author: Paul Burton <paul.burton@mips.com> |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index b640ad8a6d20..adc877dfef5c 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -2692,7 +2692,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request) | |||
| 2692 | * from the parent. | 2692 | * from the parent. |
| 2693 | */ | 2693 | */ |
| 2694 | page_count = (u32)calc_pages_for(0, length); | 2694 | page_count = (u32)calc_pages_for(0, length); |
| 2695 | pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); | 2695 | pages = ceph_alloc_page_vector(page_count, GFP_NOIO); |
| 2696 | if (IS_ERR(pages)) { | 2696 | if (IS_ERR(pages)) { |
| 2697 | result = PTR_ERR(pages); | 2697 | result = PTR_ERR(pages); |
| 2698 | pages = NULL; | 2698 | pages = NULL; |
| @@ -2827,7 +2827,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request) | |||
| 2827 | */ | 2827 | */ |
| 2828 | size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32); | 2828 | size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32); |
| 2829 | page_count = (u32)calc_pages_for(0, size); | 2829 | page_count = (u32)calc_pages_for(0, size); |
| 2830 | pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); | 2830 | pages = ceph_alloc_page_vector(page_count, GFP_NOIO); |
| 2831 | if (IS_ERR(pages)) { | 2831 | if (IS_ERR(pages)) { |
| 2832 | ret = PTR_ERR(pages); | 2832 | ret = PTR_ERR(pages); |
| 2833 | goto fail_stat_request; | 2833 | goto fail_stat_request; |
diff --git a/drivers/clk/imgtec/clk-boston.c b/drivers/clk/imgtec/clk-boston.c index f18f10351785..15af423cc0c9 100644 --- a/drivers/clk/imgtec/clk-boston.c +++ b/drivers/clk/imgtec/clk-boston.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2016-2017 Imagination Technologies | 2 | * Copyright (C) 2016-2017 Imagination Technologies |
| 3 | * Author: Paul Burton <paul.burton@imgtec.com> | 3 | * Author: Paul Burton <paul.burton@mips.com> |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c index e8248f9185f7..ab393637f7b0 100644 --- a/drivers/clk/ingenic/cgu.c +++ b/drivers/clk/ingenic/cgu.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Ingenic SoC CGU driver | 2 | * Ingenic SoC CGU driver |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2013-2015 Imagination Technologies | 4 | * Copyright (c) 2013-2015 Imagination Technologies |
| 5 | * Author: Paul Burton <paul.burton@imgtec.com> | 5 | * Author: Paul Burton <paul.burton@mips.com> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
diff --git a/drivers/clk/ingenic/cgu.h b/drivers/clk/ingenic/cgu.h index 09700b2c555d..e78b586536ea 100644 --- a/drivers/clk/ingenic/cgu.h +++ b/drivers/clk/ingenic/cgu.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Ingenic SoC CGU driver | 2 | * Ingenic SoC CGU driver |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2013-2015 Imagination Technologies | 4 | * Copyright (c) 2013-2015 Imagination Technologies |
| 5 | * Author: Paul Burton <paul.burton@imgtec.com> | 5 | * Author: Paul Burton <paul.burton@mips.com> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
diff --git a/drivers/clk/ingenic/jz4740-cgu.c b/drivers/clk/ingenic/jz4740-cgu.c index 510fe7e0c8f1..32fcc75f6f77 100644 --- a/drivers/clk/ingenic/jz4740-cgu.c +++ b/drivers/clk/ingenic/jz4740-cgu.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Ingenic JZ4740 SoC CGU driver | 2 | * Ingenic JZ4740 SoC CGU driver |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2015 Imagination Technologies | 4 | * Copyright (c) 2015 Imagination Technologies |
| 5 | * Author: Paul Burton <paul.burton@imgtec.com> | 5 | * Author: Paul Burton <paul.burton@mips.com> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
diff --git a/drivers/clk/ingenic/jz4780-cgu.c b/drivers/clk/ingenic/jz4780-cgu.c index b35d6d9dd5aa..ac3585ed8228 100644 --- a/drivers/clk/ingenic/jz4780-cgu.c +++ b/drivers/clk/ingenic/jz4780-cgu.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Ingenic JZ4780 SoC CGU driver | 2 | * Ingenic JZ4780 SoC CGU driver |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2013-2015 Imagination Technologies | 4 | * Copyright (c) 2013-2015 Imagination Technologies |
| 5 | * Author: Paul Burton <paul.burton@imgtec.com> | 5 | * Author: Paul Burton <paul.burton@mips.com> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
diff --git a/drivers/clk/uniphier/clk-uniphier-sys.c b/drivers/clk/uniphier/clk-uniphier-sys.c index 0e396f3da526..07f3b91a7daf 100644 --- a/drivers/clk/uniphier/clk-uniphier-sys.c +++ b/drivers/clk/uniphier/clk-uniphier-sys.c | |||
| @@ -233,9 +233,9 @@ const struct uniphier_clk_data uniphier_pxs3_sys_clk_data[] = { | |||
| 233 | UNIPHIER_LD20_SYS_CLK_SD, | 233 | UNIPHIER_LD20_SYS_CLK_SD, |
| 234 | UNIPHIER_LD11_SYS_CLK_NAND(2), | 234 | UNIPHIER_LD11_SYS_CLK_NAND(2), |
| 235 | UNIPHIER_LD11_SYS_CLK_EMMC(4), | 235 | UNIPHIER_LD11_SYS_CLK_EMMC(4), |
| 236 | UNIPHIER_CLK_GATE("usb30", 12, NULL, 0x2104, 4), /* =GIO0 */ | 236 | UNIPHIER_CLK_GATE("usb30", 12, NULL, 0x210c, 4), /* =GIO0 */ |
| 237 | UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x2104, 5), /* =GIO1 */ | 237 | UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x210c, 5), /* =GIO1 */ |
| 238 | UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x2104, 6), /* =GIO1-1 */ | 238 | UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x210c, 6), /* =GIO1-1 */ |
| 239 | UNIPHIER_CLK_GATE("usb30-phy0", 16, NULL, 0x210c, 16), | 239 | UNIPHIER_CLK_GATE("usb30-phy0", 16, NULL, 0x210c, 16), |
| 240 | UNIPHIER_CLK_GATE("usb30-phy1", 17, NULL, 0x210c, 18), | 240 | UNIPHIER_CLK_GATE("usb30-phy1", 17, NULL, 0x210c, 18), |
| 241 | UNIPHIER_CLK_GATE("usb30-phy2", 18, NULL, 0x210c, 20), | 241 | UNIPHIER_CLK_GATE("usb30-phy2", 18, NULL, 0x210c, 20), |
diff --git a/drivers/cpuidle/cpuidle-cps.c b/drivers/cpuidle/cpuidle-cps.c index 72b5e47286b4..dac8ff6391fa 100644 --- a/drivers/cpuidle/cpuidle-cps.c +++ b/drivers/cpuidle/cpuidle-cps.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2014 Imagination Technologies | 2 | * Copyright (C) 2014 Imagination Technologies |
| 3 | * Author: Paul Burton <paul.burton@imgtec.com> | 3 | * Author: Paul Burton <paul.burton@mips.com> |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 2371a92808be..adaa4a964f0c 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile | |||
| @@ -34,13 +34,14 @@ lib-y := efi-stub-helper.o gop.o secureboot.o | |||
| 34 | lib-$(CONFIG_RESET_ATTACK_MITIGATION) += tpm.o | 34 | lib-$(CONFIG_RESET_ATTACK_MITIGATION) += tpm.o |
| 35 | 35 | ||
| 36 | # include the stub's generic dependencies from lib/ when building for ARM/arm64 | 36 | # include the stub's generic dependencies from lib/ when building for ARM/arm64 |
| 37 | arm-deps := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c sort.c | 37 | arm-deps-y := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c |
| 38 | arm-deps-$(CONFIG_ARM64) += sort.c | ||
| 38 | 39 | ||
| 39 | $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE | 40 | $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE |
| 40 | $(call if_changed_rule,cc_o_c) | 41 | $(call if_changed_rule,cc_o_c) |
| 41 | 42 | ||
| 42 | lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o random.o \ | 43 | lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o random.o \ |
| 43 | $(patsubst %.c,lib-%.o,$(arm-deps)) | 44 | $(patsubst %.c,lib-%.o,$(arm-deps-y)) |
| 44 | 45 | ||
| 45 | lib-$(CONFIG_ARM) += arm32-stub.o | 46 | lib-$(CONFIG_ARM) += arm32-stub.o |
| 46 | lib-$(CONFIG_ARM64) += arm64-stub.o | 47 | lib-$(CONFIG_ARM64) += arm64-stub.o |
| @@ -91,5 +92,4 @@ quiet_cmd_stubcopy = STUBCPY $@ | |||
| 91 | # explicitly by the decompressor linker script. | 92 | # explicitly by the decompressor linker script. |
| 92 | # | 93 | # |
| 93 | STUBCOPY_FLAGS-$(CONFIG_ARM) += --rename-section .data=.data.efistub | 94 | STUBCOPY_FLAGS-$(CONFIG_ARM) += --rename-section .data=.data.efistub |
| 94 | STUBCOPY_RM-$(CONFIG_ARM) += -R ___ksymtab+sort -R ___kcrctab+sort | ||
| 95 | STUBCOPY_RELOC-$(CONFIG_ARM) := R_ARM_ABS | 95 | STUBCOPY_RELOC-$(CONFIG_ARM) := R_ARM_ABS |
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index a94601d5939e..01a9d78ee415 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c | |||
| @@ -350,7 +350,9 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size, | |||
| 350 | * The easiest way to find adjacent regions is to sort the memory map | 350 | * The easiest way to find adjacent regions is to sort the memory map |
| 351 | * before traversing it. | 351 | * before traversing it. |
| 352 | */ | 352 | */ |
| 353 | sort(memory_map, map_size / desc_size, desc_size, cmp_mem_desc, NULL); | 353 | if (IS_ENABLED(CONFIG_ARM64)) |
| 354 | sort(memory_map, map_size / desc_size, desc_size, cmp_mem_desc, | ||
| 355 | NULL); | ||
| 354 | 356 | ||
| 355 | for (l = 0; l < map_size; l += desc_size, prev = in) { | 357 | for (l = 0; l < map_size; l += desc_size, prev = in) { |
| 356 | u64 paddr, size; | 358 | u64 paddr, size; |
| @@ -367,7 +369,8 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size, | |||
| 367 | * a 4k page size kernel to kexec a 64k page size kernel and | 369 | * a 4k page size kernel to kexec a 64k page size kernel and |
| 368 | * vice versa. | 370 | * vice versa. |
| 369 | */ | 371 | */ |
| 370 | if (!regions_are_adjacent(prev, in) || | 372 | if ((IS_ENABLED(CONFIG_ARM64) && |
| 373 | !regions_are_adjacent(prev, in)) || | ||
| 371 | !regions_have_compatible_memory_type_attrs(prev, in)) { | 374 | !regions_have_compatible_memory_type_attrs(prev, in)) { |
| 372 | 375 | ||
| 373 | paddr = round_down(in->phys_addr, SZ_64K); | 376 | paddr = round_down(in->phys_addr, SZ_64K); |
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 430a6b4dfac9..62cd16a23921 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |||
| @@ -93,6 +93,10 @@ static int uvd_v6_0_early_init(void *handle) | |||
| 93 | { | 93 | { |
| 94 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 94 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 95 | 95 | ||
| 96 | if (!(adev->flags & AMD_IS_APU) && | ||
| 97 | (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK)) | ||
| 98 | return -ENOENT; | ||
| 99 | |||
| 96 | uvd_v6_0_set_ring_funcs(adev); | 100 | uvd_v6_0_set_ring_funcs(adev); |
| 97 | uvd_v6_0_set_irq_funcs(adev); | 101 | uvd_v6_0_set_irq_funcs(adev); |
| 98 | 102 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 90332f55cfba..cf81065e3c5a 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | |||
| @@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev) | |||
| 365 | { | 365 | { |
| 366 | u32 tmp; | 366 | u32 tmp; |
| 367 | 367 | ||
| 368 | /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */ | ||
| 369 | if ((adev->asic_type == CHIP_FIJI) || | 368 | if ((adev->asic_type == CHIP_FIJI) || |
| 370 | (adev->asic_type == CHIP_STONEY) || | 369 | (adev->asic_type == CHIP_STONEY)) |
| 371 | (adev->asic_type == CHIP_POLARIS10) || | ||
| 372 | (adev->asic_type == CHIP_POLARIS11) || | ||
| 373 | (adev->asic_type == CHIP_POLARIS12)) | ||
| 374 | return AMDGPU_VCE_HARVEST_VCE1; | 370 | return AMDGPU_VCE_HARVEST_VCE1; |
| 375 | 371 | ||
| 376 | /* Tonga and CZ are dual or single pipe */ | ||
| 377 | if (adev->flags & AMD_IS_APU) | 372 | if (adev->flags & AMD_IS_APU) |
| 378 | tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) & | 373 | tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) & |
| 379 | VCE_HARVEST_FUSE_MACRO__MASK) >> | 374 | VCE_HARVEST_FUSE_MACRO__MASK) >> |
| @@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev) | |||
| 391 | case 3: | 386 | case 3: |
| 392 | return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1; | 387 | return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1; |
| 393 | default: | 388 | default: |
| 389 | if ((adev->asic_type == CHIP_POLARIS10) || | ||
| 390 | (adev->asic_type == CHIP_POLARIS11) || | ||
| 391 | (adev->asic_type == CHIP_POLARIS12)) | ||
| 392 | return AMDGPU_VCE_HARVEST_VCE1; | ||
| 393 | |||
| 394 | return 0; | 394 | return 0; |
| 395 | } | 395 | } |
| 396 | } | 396 | } |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 32e857dc507c..dc1faa49687d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -2214,8 +2214,10 @@ static void __i915_gem_object_reset_page_iter(struct drm_i915_gem_object *obj) | |||
| 2214 | struct radix_tree_iter iter; | 2214 | struct radix_tree_iter iter; |
| 2215 | void __rcu **slot; | 2215 | void __rcu **slot; |
| 2216 | 2216 | ||
| 2217 | rcu_read_lock(); | ||
| 2217 | radix_tree_for_each_slot(slot, &obj->mm.get_page.radix, &iter, 0) | 2218 | radix_tree_for_each_slot(slot, &obj->mm.get_page.radix, &iter, 0) |
| 2218 | radix_tree_delete(&obj->mm.get_page.radix, iter.index); | 2219 | radix_tree_delete(&obj->mm.get_page.radix, iter.index); |
| 2220 | rcu_read_unlock(); | ||
| 2219 | } | 2221 | } |
| 2220 | 2222 | ||
| 2221 | void __i915_gem_object_put_pages(struct drm_i915_gem_object *obj, | 2223 | void __i915_gem_object_put_pages(struct drm_i915_gem_object *obj, |
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 58a2a44f88bd..8afd2ce59b8d 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c | |||
| @@ -104,6 +104,7 @@ static void lut_close(struct i915_gem_context *ctx) | |||
| 104 | kmem_cache_free(ctx->i915->luts, lut); | 104 | kmem_cache_free(ctx->i915->luts, lut); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | rcu_read_lock(); | ||
| 107 | radix_tree_for_each_slot(slot, &ctx->handles_vma, &iter, 0) { | 108 | radix_tree_for_each_slot(slot, &ctx->handles_vma, &iter, 0) { |
| 108 | struct i915_vma *vma = rcu_dereference_raw(*slot); | 109 | struct i915_vma *vma = rcu_dereference_raw(*slot); |
| 109 | struct drm_i915_gem_object *obj = vma->obj; | 110 | struct drm_i915_gem_object *obj = vma->obj; |
| @@ -115,6 +116,7 @@ static void lut_close(struct i915_gem_context *ctx) | |||
| 115 | 116 | ||
| 116 | __i915_gem_object_release_unless_active(obj); | 117 | __i915_gem_object_release_unless_active(obj); |
| 117 | } | 118 | } |
| 119 | rcu_read_unlock(); | ||
| 118 | } | 120 | } |
| 119 | 121 | ||
| 120 | static void i915_gem_context_free(struct i915_gem_context *ctx) | 122 | static void i915_gem_context_free(struct i915_gem_context *ctx) |
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 92437f455b43..83876a1c8d98 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
| @@ -337,6 +337,10 @@ eb_vma_misplaced(const struct drm_i915_gem_exec_object2 *entry, | |||
| 337 | (vma->node.start + vma->node.size - 1) >> 32) | 337 | (vma->node.start + vma->node.size - 1) >> 32) |
| 338 | return true; | 338 | return true; |
| 339 | 339 | ||
| 340 | if (flags & __EXEC_OBJECT_NEEDS_MAP && | ||
| 341 | !i915_vma_is_map_and_fenceable(vma)) | ||
| 342 | return true; | ||
| 343 | |||
| 340 | return false; | 344 | return false; |
| 341 | } | 345 | } |
| 342 | 346 | ||
| @@ -2090,6 +2094,11 @@ get_fence_array(struct drm_i915_gem_execbuffer2 *args, | |||
| 2090 | goto err; | 2094 | goto err; |
| 2091 | } | 2095 | } |
| 2092 | 2096 | ||
| 2097 | if (fence.flags & __I915_EXEC_FENCE_UNKNOWN_FLAGS) { | ||
| 2098 | err = -EINVAL; | ||
| 2099 | goto err; | ||
| 2100 | } | ||
| 2101 | |||
| 2093 | syncobj = drm_syncobj_find(file, fence.handle); | 2102 | syncobj = drm_syncobj_find(file, fence.handle); |
| 2094 | if (!syncobj) { | 2103 | if (!syncobj) { |
| 2095 | DRM_DEBUG("Invalid syncobj handle provided\n"); | 2104 | DRM_DEBUG("Invalid syncobj handle provided\n"); |
| @@ -2097,6 +2106,9 @@ get_fence_array(struct drm_i915_gem_execbuffer2 *args, | |||
| 2097 | goto err; | 2106 | goto err; |
| 2098 | } | 2107 | } |
| 2099 | 2108 | ||
| 2109 | BUILD_BUG_ON(~(ARCH_KMALLOC_MINALIGN - 1) & | ||
| 2110 | ~__I915_EXEC_FENCE_UNKNOWN_FLAGS); | ||
| 2111 | |||
| 2100 | fences[n] = ptr_pack_bits(syncobj, fence.flags, 2); | 2112 | fences[n] = ptr_pack_bits(syncobj, fence.flags, 2); |
| 2101 | } | 2113 | } |
| 2102 | 2114 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index e2410eb5d96e..ad524cb0f6fc 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c | |||
| @@ -832,10 +832,14 @@ static void gen8_ppgtt_clear_4lvl(struct i915_address_space *vm, | |||
| 832 | } | 832 | } |
| 833 | } | 833 | } |
| 834 | 834 | ||
| 835 | struct sgt_dma { | 835 | static inline struct sgt_dma { |
| 836 | struct scatterlist *sg; | 836 | struct scatterlist *sg; |
| 837 | dma_addr_t dma, max; | 837 | dma_addr_t dma, max; |
| 838 | }; | 838 | } sgt_dma(struct i915_vma *vma) { |
| 839 | struct scatterlist *sg = vma->pages->sgl; | ||
| 840 | dma_addr_t addr = sg_dma_address(sg); | ||
| 841 | return (struct sgt_dma) { sg, addr, addr + sg->length }; | ||
| 842 | } | ||
| 839 | 843 | ||
| 840 | struct gen8_insert_pte { | 844 | struct gen8_insert_pte { |
| 841 | u16 pml4e; | 845 | u16 pml4e; |
| @@ -916,11 +920,7 @@ static void gen8_ppgtt_insert_3lvl(struct i915_address_space *vm, | |||
| 916 | u32 unused) | 920 | u32 unused) |
| 917 | { | 921 | { |
| 918 | struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); | 922 | struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); |
| 919 | struct sgt_dma iter = { | 923 | struct sgt_dma iter = sgt_dma(vma); |
| 920 | .sg = vma->pages->sgl, | ||
| 921 | .dma = sg_dma_address(iter.sg), | ||
| 922 | .max = iter.dma + iter.sg->length, | ||
| 923 | }; | ||
| 924 | struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); | 924 | struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); |
| 925 | 925 | ||
| 926 | gen8_ppgtt_insert_pte_entries(ppgtt, &ppgtt->pdp, &iter, &idx, | 926 | gen8_ppgtt_insert_pte_entries(ppgtt, &ppgtt->pdp, &iter, &idx, |
| @@ -933,11 +933,7 @@ static void gen8_ppgtt_insert_4lvl(struct i915_address_space *vm, | |||
| 933 | u32 unused) | 933 | u32 unused) |
| 934 | { | 934 | { |
| 935 | struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); | 935 | struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); |
| 936 | struct sgt_dma iter = { | 936 | struct sgt_dma iter = sgt_dma(vma); |
| 937 | .sg = vma->pages->sgl, | ||
| 938 | .dma = sg_dma_address(iter.sg), | ||
| 939 | .max = iter.dma + iter.sg->length, | ||
| 940 | }; | ||
| 941 | struct i915_page_directory_pointer **pdps = ppgtt->pml4.pdps; | 937 | struct i915_page_directory_pointer **pdps = ppgtt->pml4.pdps; |
| 942 | struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); | 938 | struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); |
| 943 | 939 | ||
| @@ -1632,13 +1628,10 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, | |||
| 1632 | unsigned act_pt = first_entry / GEN6_PTES; | 1628 | unsigned act_pt = first_entry / GEN6_PTES; |
| 1633 | unsigned act_pte = first_entry % GEN6_PTES; | 1629 | unsigned act_pte = first_entry % GEN6_PTES; |
| 1634 | const u32 pte_encode = vm->pte_encode(0, cache_level, flags); | 1630 | const u32 pte_encode = vm->pte_encode(0, cache_level, flags); |
| 1635 | struct sgt_dma iter; | 1631 | struct sgt_dma iter = sgt_dma(vma); |
| 1636 | gen6_pte_t *vaddr; | 1632 | gen6_pte_t *vaddr; |
| 1637 | 1633 | ||
| 1638 | vaddr = kmap_atomic_px(ppgtt->pd.page_table[act_pt]); | 1634 | vaddr = kmap_atomic_px(ppgtt->pd.page_table[act_pt]); |
| 1639 | iter.sg = vma->pages->sgl; | ||
| 1640 | iter.dma = sg_dma_address(iter.sg); | ||
| 1641 | iter.max = iter.dma + iter.sg->length; | ||
| 1642 | do { | 1635 | do { |
| 1643 | vaddr[act_pte] = pte_encode | GEN6_PTE_ADDR_ENCODE(iter.dma); | 1636 | vaddr[act_pte] = pte_encode | GEN6_PTE_ADDR_ENCODE(iter.dma); |
| 1644 | 1637 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5c7828c52d12..5ebdb63330dd 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -15227,6 +15227,23 @@ void intel_connector_unregister(struct drm_connector *connector) | |||
| 15227 | intel_panel_destroy_backlight(connector); | 15227 | intel_panel_destroy_backlight(connector); |
| 15228 | } | 15228 | } |
| 15229 | 15229 | ||
| 15230 | static void intel_hpd_poll_fini(struct drm_device *dev) | ||
| 15231 | { | ||
| 15232 | struct intel_connector *connector; | ||
| 15233 | struct drm_connector_list_iter conn_iter; | ||
| 15234 | |||
| 15235 | /* First disable polling... */ | ||
| 15236 | drm_kms_helper_poll_fini(dev); | ||
| 15237 | |||
| 15238 | /* Then kill the work that may have been queued by hpd. */ | ||
| 15239 | drm_connector_list_iter_begin(dev, &conn_iter); | ||
| 15240 | for_each_intel_connector_iter(connector, &conn_iter) { | ||
| 15241 | if (connector->modeset_retry_work.func) | ||
| 15242 | cancel_work_sync(&connector->modeset_retry_work); | ||
| 15243 | } | ||
| 15244 | drm_connector_list_iter_end(&conn_iter); | ||
| 15245 | } | ||
| 15246 | |||
| 15230 | void intel_modeset_cleanup(struct drm_device *dev) | 15247 | void intel_modeset_cleanup(struct drm_device *dev) |
| 15231 | { | 15248 | { |
| 15232 | struct drm_i915_private *dev_priv = to_i915(dev); | 15249 | struct drm_i915_private *dev_priv = to_i915(dev); |
| @@ -15247,7 +15264,7 @@ void intel_modeset_cleanup(struct drm_device *dev) | |||
| 15247 | * Due to the hpd irq storm handling the hotplug work can re-arm the | 15264 | * Due to the hpd irq storm handling the hotplug work can re-arm the |
| 15248 | * poll handlers. Hence disable polling after hpd handling is shut down. | 15265 | * poll handlers. Hence disable polling after hpd handling is shut down. |
| 15249 | */ | 15266 | */ |
| 15250 | drm_kms_helper_poll_fini(dev); | 15267 | intel_hpd_poll_fini(dev); |
| 15251 | 15268 | ||
| 15252 | /* poll work can call into fbdev, hence clean that up afterwards */ | 15269 | /* poll work can call into fbdev, hence clean that up afterwards */ |
| 15253 | intel_fbdev_fini(dev_priv); | 15270 | intel_fbdev_fini(dev_priv); |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 203198659ab2..09f274419eea 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
| @@ -3731,9 +3731,16 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp) | |||
| 3731 | 3731 | ||
| 3732 | } | 3732 | } |
| 3733 | 3733 | ||
| 3734 | /* Read the eDP Display control capabilities registers */ | 3734 | /* |
| 3735 | if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) && | 3735 | * Read the eDP display control registers. |
| 3736 | drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV, | 3736 | * |
| 3737 | * Do this independent of DP_DPCD_DISPLAY_CONTROL_CAPABLE bit in | ||
| 3738 | * DP_EDP_CONFIGURATION_CAP, because some buggy displays do not have it | ||
| 3739 | * set, but require eDP 1.4+ detection (e.g. for supported link rates | ||
| 3740 | * method). The display control registers should read zero if they're | ||
| 3741 | * not supported anyway. | ||
| 3742 | */ | ||
| 3743 | if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV, | ||
| 3737 | intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) == | 3744 | intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) == |
| 3738 | sizeof(intel_dp->edp_dpcd)) | 3745 | sizeof(intel_dp->edp_dpcd)) |
| 3739 | DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd), | 3746 | DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd), |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index fa47285918f4..79fbaf78f604 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
| @@ -496,7 +496,6 @@ struct intel_crtc_scaler_state { | |||
| 496 | 496 | ||
| 497 | struct intel_pipe_wm { | 497 | struct intel_pipe_wm { |
| 498 | struct intel_wm_level wm[5]; | 498 | struct intel_wm_level wm[5]; |
| 499 | struct intel_wm_level raw_wm[5]; | ||
| 500 | uint32_t linetime; | 499 | uint32_t linetime; |
| 501 | bool fbc_wm_enabled; | 500 | bool fbc_wm_enabled; |
| 502 | bool pipe_enabled; | 501 | bool pipe_enabled; |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 0a09f8ff6aff..cb950752c346 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
| @@ -2716,9 +2716,9 @@ static void ilk_compute_wm_level(const struct drm_i915_private *dev_priv, | |||
| 2716 | const struct intel_crtc *intel_crtc, | 2716 | const struct intel_crtc *intel_crtc, |
| 2717 | int level, | 2717 | int level, |
| 2718 | struct intel_crtc_state *cstate, | 2718 | struct intel_crtc_state *cstate, |
| 2719 | struct intel_plane_state *pristate, | 2719 | const struct intel_plane_state *pristate, |
| 2720 | struct intel_plane_state *sprstate, | 2720 | const struct intel_plane_state *sprstate, |
| 2721 | struct intel_plane_state *curstate, | 2721 | const struct intel_plane_state *curstate, |
| 2722 | struct intel_wm_level *result) | 2722 | struct intel_wm_level *result) |
| 2723 | { | 2723 | { |
| 2724 | uint16_t pri_latency = dev_priv->wm.pri_latency[level]; | 2724 | uint16_t pri_latency = dev_priv->wm.pri_latency[level]; |
| @@ -3038,28 +3038,24 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate) | |||
| 3038 | struct intel_pipe_wm *pipe_wm; | 3038 | struct intel_pipe_wm *pipe_wm; |
| 3039 | struct drm_device *dev = state->dev; | 3039 | struct drm_device *dev = state->dev; |
| 3040 | const struct drm_i915_private *dev_priv = to_i915(dev); | 3040 | const struct drm_i915_private *dev_priv = to_i915(dev); |
| 3041 | struct intel_plane *intel_plane; | 3041 | struct drm_plane *plane; |
| 3042 | struct intel_plane_state *pristate = NULL; | 3042 | const struct drm_plane_state *plane_state; |
| 3043 | struct intel_plane_state *sprstate = NULL; | 3043 | const struct intel_plane_state *pristate = NULL; |
| 3044 | struct intel_plane_state *curstate = NULL; | 3044 | const struct intel_plane_state *sprstate = NULL; |
| 3045 | const struct intel_plane_state *curstate = NULL; | ||
| 3045 | int level, max_level = ilk_wm_max_level(dev_priv), usable_level; | 3046 | int level, max_level = ilk_wm_max_level(dev_priv), usable_level; |
| 3046 | struct ilk_wm_maximums max; | 3047 | struct ilk_wm_maximums max; |
| 3047 | 3048 | ||
| 3048 | pipe_wm = &cstate->wm.ilk.optimal; | 3049 | pipe_wm = &cstate->wm.ilk.optimal; |
| 3049 | 3050 | ||
| 3050 | for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) { | 3051 | drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, &cstate->base) { |
| 3051 | struct intel_plane_state *ps; | 3052 | const struct intel_plane_state *ps = to_intel_plane_state(plane_state); |
| 3052 | |||
| 3053 | ps = intel_atomic_get_existing_plane_state(state, | ||
| 3054 | intel_plane); | ||
| 3055 | if (!ps) | ||
| 3056 | continue; | ||
| 3057 | 3053 | ||
| 3058 | if (intel_plane->base.type == DRM_PLANE_TYPE_PRIMARY) | 3054 | if (plane->type == DRM_PLANE_TYPE_PRIMARY) |
| 3059 | pristate = ps; | 3055 | pristate = ps; |
| 3060 | else if (intel_plane->base.type == DRM_PLANE_TYPE_OVERLAY) | 3056 | else if (plane->type == DRM_PLANE_TYPE_OVERLAY) |
| 3061 | sprstate = ps; | 3057 | sprstate = ps; |
| 3062 | else if (intel_plane->base.type == DRM_PLANE_TYPE_CURSOR) | 3058 | else if (plane->type == DRM_PLANE_TYPE_CURSOR) |
| 3063 | curstate = ps; | 3059 | curstate = ps; |
| 3064 | } | 3060 | } |
| 3065 | 3061 | ||
| @@ -3081,11 +3077,9 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate) | |||
| 3081 | if (pipe_wm->sprites_scaled) | 3077 | if (pipe_wm->sprites_scaled) |
| 3082 | usable_level = 0; | 3078 | usable_level = 0; |
| 3083 | 3079 | ||
| 3084 | ilk_compute_wm_level(dev_priv, intel_crtc, 0, cstate, | ||
| 3085 | pristate, sprstate, curstate, &pipe_wm->raw_wm[0]); | ||
| 3086 | |||
| 3087 | memset(&pipe_wm->wm, 0, sizeof(pipe_wm->wm)); | 3080 | memset(&pipe_wm->wm, 0, sizeof(pipe_wm->wm)); |
| 3088 | pipe_wm->wm[0] = pipe_wm->raw_wm[0]; | 3081 | ilk_compute_wm_level(dev_priv, intel_crtc, 0, cstate, |
| 3082 | pristate, sprstate, curstate, &pipe_wm->wm[0]); | ||
| 3089 | 3083 | ||
| 3090 | if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) | 3084 | if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) |
| 3091 | pipe_wm->linetime = hsw_compute_linetime_wm(cstate); | 3085 | pipe_wm->linetime = hsw_compute_linetime_wm(cstate); |
| @@ -3095,8 +3089,8 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate) | |||
| 3095 | 3089 | ||
| 3096 | ilk_compute_wm_reg_maximums(dev_priv, 1, &max); | 3090 | ilk_compute_wm_reg_maximums(dev_priv, 1, &max); |
| 3097 | 3091 | ||
| 3098 | for (level = 1; level <= max_level; level++) { | 3092 | for (level = 1; level <= usable_level; level++) { |
| 3099 | struct intel_wm_level *wm = &pipe_wm->raw_wm[level]; | 3093 | struct intel_wm_level *wm = &pipe_wm->wm[level]; |
| 3100 | 3094 | ||
| 3101 | ilk_compute_wm_level(dev_priv, intel_crtc, level, cstate, | 3095 | ilk_compute_wm_level(dev_priv, intel_crtc, level, cstate, |
| 3102 | pristate, sprstate, curstate, wm); | 3096 | pristate, sprstate, curstate, wm); |
| @@ -3106,13 +3100,10 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate) | |||
| 3106 | * register maximums since such watermarks are | 3100 | * register maximums since such watermarks are |
| 3107 | * always invalid. | 3101 | * always invalid. |
| 3108 | */ | 3102 | */ |
| 3109 | if (level > usable_level) | 3103 | if (!ilk_validate_wm_level(level, &max, wm)) { |
| 3110 | continue; | 3104 | memset(wm, 0, sizeof(*wm)); |
| 3111 | 3105 | break; | |
| 3112 | if (ilk_validate_wm_level(level, &max, wm)) | 3106 | } |
| 3113 | pipe_wm->wm[level] = *wm; | ||
| 3114 | else | ||
| 3115 | usable_level = level; | ||
| 3116 | } | 3107 | } |
| 3117 | 3108 | ||
| 3118 | return 0; | 3109 | return 0; |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index e4751f92b342..fb47d46050ec 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
| @@ -4099,7 +4099,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, | |||
| 4099 | { | 4099 | { |
| 4100 | struct nouveau_drm *drm = nouveau_drm(dev); | 4100 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 4101 | struct nv50_disp *disp = nv50_disp(dev); | 4101 | struct nv50_disp *disp = nv50_disp(dev); |
| 4102 | struct drm_plane_state *old_plane_state; | 4102 | struct drm_plane_state *new_plane_state; |
| 4103 | struct drm_plane *plane; | 4103 | struct drm_plane *plane; |
| 4104 | struct drm_crtc *crtc; | 4104 | struct drm_crtc *crtc; |
| 4105 | bool active = false; | 4105 | bool active = false; |
| @@ -4129,8 +4129,8 @@ nv50_disp_atomic_commit(struct drm_device *dev, | |||
| 4129 | if (ret) | 4129 | if (ret) |
| 4130 | goto err_cleanup; | 4130 | goto err_cleanup; |
| 4131 | 4131 | ||
| 4132 | for_each_old_plane_in_state(state, plane, old_plane_state, i) { | 4132 | for_each_new_plane_in_state(state, plane, new_plane_state, i) { |
| 4133 | struct nv50_wndw_atom *asyw = nv50_wndw_atom(old_plane_state); | 4133 | struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state); |
| 4134 | struct nv50_wndw *wndw = nv50_wndw(plane); | 4134 | struct nv50_wndw *wndw = nv50_wndw(plane); |
| 4135 | 4135 | ||
| 4136 | if (asyw->set.image) { | 4136 | if (asyw->set.image) { |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index e84fee3ec4f3..184340d486c3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
| @@ -721,7 +721,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) | |||
| 721 | * allocation taken by fbdev | 721 | * allocation taken by fbdev |
| 722 | */ | 722 | */ |
| 723 | if (!(dev_priv->capabilities & SVGA_CAP_3D)) | 723 | if (!(dev_priv->capabilities & SVGA_CAP_3D)) |
| 724 | mem_size *= 2; | 724 | mem_size *= 3; |
| 725 | 725 | ||
| 726 | dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE; | 726 | dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE; |
| 727 | dev_priv->prim_bb_mem = | 727 | dev_priv->prim_bb_mem = |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c index 3bbad22b3748..d6b1c509ae01 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | |||
| @@ -224,7 +224,7 @@ out: | |||
| 224 | return ret; | 224 | return ret; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static struct dma_fence_ops vmw_fence_ops = { | 227 | static const struct dma_fence_ops vmw_fence_ops = { |
| 228 | .get_driver_name = vmw_fence_get_driver_name, | 228 | .get_driver_name = vmw_fence_get_driver_name, |
| 229 | .get_timeline_name = vmw_fence_get_timeline_name, | 229 | .get_timeline_name = vmw_fence_get_timeline_name, |
| 230 | .enable_signaling = vmw_fence_enable_signaling, | 230 | .enable_signaling = vmw_fence_enable_signaling, |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index a7355ab3bb22..6ff0be8cbdc9 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
| @@ -867,11 +867,16 @@ static void msf_from_bcd(struct atapi_msf *msf) | |||
| 867 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) | 867 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) |
| 868 | { | 868 | { |
| 869 | struct cdrom_info *info = drive->driver_data; | 869 | struct cdrom_info *info = drive->driver_data; |
| 870 | struct cdrom_device_info *cdi = &info->devinfo; | 870 | struct cdrom_device_info *cdi; |
| 871 | unsigned char cmd[BLK_MAX_CDB]; | 871 | unsigned char cmd[BLK_MAX_CDB]; |
| 872 | 872 | ||
| 873 | ide_debug_log(IDE_DBG_FUNC, "enter"); | 873 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
| 874 | 874 | ||
| 875 | if (!info) | ||
| 876 | return -EIO; | ||
| 877 | |||
| 878 | cdi = &info->devinfo; | ||
| 879 | |||
| 875 | memset(cmd, 0, BLK_MAX_CDB); | 880 | memset(cmd, 0, BLK_MAX_CDB); |
| 876 | cmd[0] = GPCMD_TEST_UNIT_READY; | 881 | cmd[0] = GPCMD_TEST_UNIT_READY; |
| 877 | 882 | ||
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5dc7ea4b6bc4..f0b06b14e782 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
| @@ -913,15 +913,16 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev, | |||
| 913 | struct cpuidle_state *state = &drv->states[index]; | 913 | struct cpuidle_state *state = &drv->states[index]; |
| 914 | unsigned long eax = flg2MWAIT(state->flags); | 914 | unsigned long eax = flg2MWAIT(state->flags); |
| 915 | unsigned int cstate; | 915 | unsigned int cstate; |
| 916 | int cpu = smp_processor_id(); | ||
| 916 | 917 | ||
| 917 | cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; | 918 | cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; |
| 918 | 919 | ||
| 919 | /* | 920 | /* |
| 920 | * NB: if CPUIDLE_FLAG_TLB_FLUSHED is set, this idle transition | 921 | * leave_mm() to avoid costly and often unnecessary wakeups |
| 921 | * will probably flush the TLB. It's not guaranteed to flush | 922 | * for flushing the user TLB's associated with the active mm. |
| 922 | * the TLB, though, so it's not clear that we can do anything | ||
| 923 | * useful with this knowledge. | ||
| 924 | */ | 923 | */ |
| 924 | if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED) | ||
| 925 | leave_mm(cpu); | ||
| 925 | 926 | ||
| 926 | if (!(lapic_timer_reliable_states & (1 << (cstate)))) | 927 | if (!(lapic_timer_reliable_states & (1 << (cstate)))) |
| 927 | tick_broadcast_enter(); | 928 | tick_broadcast_enter(); |
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 6d6b092e2da9..d6135900da64 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c | |||
| @@ -1258,6 +1258,7 @@ static const struct acpi_device_id elan_acpi_id[] = { | |||
| 1258 | { "ELAN0605", 0 }, | 1258 | { "ELAN0605", 0 }, |
| 1259 | { "ELAN0609", 0 }, | 1259 | { "ELAN0609", 0 }, |
| 1260 | { "ELAN060B", 0 }, | 1260 | { "ELAN060B", 0 }, |
| 1261 | { "ELAN060C", 0 }, | ||
| 1261 | { "ELAN0611", 0 }, | 1262 | { "ELAN0611", 0 }, |
| 1262 | { "ELAN1000", 0 }, | 1263 | { "ELAN1000", 0 }, |
| 1263 | { } | 1264 | { } |
diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c index 225025a0940c..b6ccf39c6a7b 100644 --- a/drivers/input/rmi4/rmi_smbus.c +++ b/drivers/input/rmi4/rmi_smbus.c | |||
| @@ -312,7 +312,7 @@ static int rmi_smb_probe(struct i2c_client *client, | |||
| 312 | rmi_smb->xport.dev = &client->dev; | 312 | rmi_smb->xport.dev = &client->dev; |
| 313 | rmi_smb->xport.pdata = *pdata; | 313 | rmi_smb->xport.pdata = *pdata; |
| 314 | rmi_smb->xport.pdata.irq = client->irq; | 314 | rmi_smb->xport.pdata.irq = client->irq; |
| 315 | rmi_smb->xport.proto_name = "smb2"; | 315 | rmi_smb->xport.proto_name = "smb"; |
| 316 | rmi_smb->xport.ops = &rmi_smb_ops; | 316 | rmi_smb->xport.ops = &rmi_smb_ops; |
| 317 | 317 | ||
| 318 | smbus_version = rmi_smb_get_version(rmi_smb); | 318 | smbus_version = rmi_smb_get_version(rmi_smb); |
| @@ -322,7 +322,7 @@ static int rmi_smb_probe(struct i2c_client *client, | |||
| 322 | rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", | 322 | rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", |
| 323 | smbus_version); | 323 | smbus_version); |
| 324 | 324 | ||
| 325 | if (smbus_version != 2) { | 325 | if (smbus_version != 2 && smbus_version != 3) { |
| 326 | dev_err(&client->dev, "Unrecognized SMB version %d\n", | 326 | dev_err(&client->dev, "Unrecognized SMB version %d\n", |
| 327 | smbus_version); | 327 | smbus_version); |
| 328 | return -ENODEV; | 328 | return -ENODEV; |
diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index bb0349fa64bc..fd03e55768c9 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c | |||
| @@ -255,6 +255,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k | |||
| 255 | 255 | ||
| 256 | case KE_VSW: | 256 | case KE_VSW: |
| 257 | input_report_switch(dev, ke->sw.code, value); | 257 | input_report_switch(dev, ke->sw.code, value); |
| 258 | input_sync(dev); | ||
| 258 | break; | 259 | break; |
| 259 | } | 260 | } |
| 260 | } | 261 | } |
diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c index f9dcbd63e598..b35b640fdadf 100644 --- a/drivers/input/touchscreen/ar1021_i2c.c +++ b/drivers/input/touchscreen/ar1021_i2c.c | |||
| @@ -117,6 +117,7 @@ static int ar1021_i2c_probe(struct i2c_client *client, | |||
| 117 | input->open = ar1021_i2c_open; | 117 | input->open = ar1021_i2c_open; |
| 118 | input->close = ar1021_i2c_close; | 118 | input->close = ar1021_i2c_close; |
| 119 | 119 | ||
| 120 | __set_bit(INPUT_PROP_DIRECT, input->propbit); | ||
| 120 | input_set_capability(input, EV_KEY, BTN_TOUCH); | 121 | input_set_capability(input, EV_KEY, BTN_TOUCH); |
| 121 | input_set_abs_params(input, ABS_X, 0, AR1021_MAX_X, 0, 0); | 122 | input_set_abs_params(input, ABS_X, 0, AR1021_MAX_X, 0, 0); |
| 122 | input_set_abs_params(input, ABS_Y, 0, AR1021_MAX_Y, 0, 0); | 123 | input_set_abs_params(input, ABS_Y, 0, AR1021_MAX_Y, 0, 0); |
diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c index 88ea5e1b72ae..abf27578beb1 100644 --- a/drivers/input/touchscreen/tsc200x-core.c +++ b/drivers/input/touchscreen/tsc200x-core.c | |||
| @@ -531,6 +531,7 @@ int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id, | |||
| 531 | 531 | ||
| 532 | input_set_drvdata(input_dev, ts); | 532 | input_set_drvdata(input_dev, ts); |
| 533 | 533 | ||
| 534 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
| 534 | input_set_capability(input_dev, EV_KEY, BTN_TOUCH); | 535 | input_set_capability(input_dev, EV_KEY, BTN_TOUCH); |
| 535 | 536 | ||
| 536 | input_set_abs_params(input_dev, ABS_X, | 537 | input_set_abs_params(input_dev, ABS_X, |
diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c index b283fc90be1e..17a4a7b6cdbb 100644 --- a/drivers/irqchip/irq-mvebu-gicp.c +++ b/drivers/irqchip/irq-mvebu-gicp.c | |||
| @@ -194,6 +194,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev) | |||
| 194 | return -ENOMEM; | 194 | return -ENOMEM; |
| 195 | 195 | ||
| 196 | gicp->dev = &pdev->dev; | 196 | gicp->dev = &pdev->dev; |
| 197 | spin_lock_init(&gicp->spi_lock); | ||
| 197 | 198 | ||
| 198 | gicp->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 199 | gicp->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 199 | if (!gicp->res) | 200 | if (!gicp->res) |
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 860313bd952a..4f2806720c5c 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
| @@ -401,16 +401,37 @@ static u32 dw_mci_prep_stop_abort(struct dw_mci *host, struct mmc_command *cmd) | |||
| 401 | static inline void dw_mci_set_cto(struct dw_mci *host) | 401 | static inline void dw_mci_set_cto(struct dw_mci *host) |
| 402 | { | 402 | { |
| 403 | unsigned int cto_clks; | 403 | unsigned int cto_clks; |
| 404 | unsigned int cto_div; | ||
| 404 | unsigned int cto_ms; | 405 | unsigned int cto_ms; |
| 406 | unsigned long irqflags; | ||
| 405 | 407 | ||
| 406 | cto_clks = mci_readl(host, TMOUT) & 0xff; | 408 | cto_clks = mci_readl(host, TMOUT) & 0xff; |
| 407 | cto_ms = DIV_ROUND_UP(cto_clks, host->bus_hz / 1000); | 409 | cto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; |
| 410 | if (cto_div == 0) | ||
| 411 | cto_div = 1; | ||
| 412 | cto_ms = DIV_ROUND_UP(MSEC_PER_SEC * cto_clks * cto_div, host->bus_hz); | ||
| 408 | 413 | ||
| 409 | /* add a bit spare time */ | 414 | /* add a bit spare time */ |
| 410 | cto_ms += 10; | 415 | cto_ms += 10; |
| 411 | 416 | ||
| 412 | mod_timer(&host->cto_timer, | 417 | /* |
| 413 | jiffies + msecs_to_jiffies(cto_ms) + 1); | 418 | * The durations we're working with are fairly short so we have to be |
| 419 | * extra careful about synchronization here. Specifically in hardware a | ||
| 420 | * command timeout is _at most_ 5.1 ms, so that means we expect an | ||
| 421 | * interrupt (either command done or timeout) to come rather quickly | ||
| 422 | * after the mci_writel. ...but just in case we have a long interrupt | ||
| 423 | * latency let's add a bit of paranoia. | ||
| 424 | * | ||
| 425 | * In general we'll assume that at least an interrupt will be asserted | ||
| 426 | * in hardware by the time the cto_timer runs. ...and if it hasn't | ||
| 427 | * been asserted in hardware by that time then we'll assume it'll never | ||
| 428 | * come. | ||
| 429 | */ | ||
| 430 | spin_lock_irqsave(&host->irq_lock, irqflags); | ||
| 431 | if (!test_bit(EVENT_CMD_COMPLETE, &host->pending_events)) | ||
| 432 | mod_timer(&host->cto_timer, | ||
| 433 | jiffies + msecs_to_jiffies(cto_ms) + 1); | ||
| 434 | spin_unlock_irqrestore(&host->irq_lock, irqflags); | ||
| 414 | } | 435 | } |
| 415 | 436 | ||
| 416 | static void dw_mci_start_command(struct dw_mci *host, | 437 | static void dw_mci_start_command(struct dw_mci *host, |
| @@ -425,11 +446,11 @@ static void dw_mci_start_command(struct dw_mci *host, | |||
| 425 | wmb(); /* drain writebuffer */ | 446 | wmb(); /* drain writebuffer */ |
| 426 | dw_mci_wait_while_busy(host, cmd_flags); | 447 | dw_mci_wait_while_busy(host, cmd_flags); |
| 427 | 448 | ||
| 449 | mci_writel(host, CMD, cmd_flags | SDMMC_CMD_START); | ||
| 450 | |||
| 428 | /* response expected command only */ | 451 | /* response expected command only */ |
| 429 | if (cmd_flags & SDMMC_CMD_RESP_EXP) | 452 | if (cmd_flags & SDMMC_CMD_RESP_EXP) |
| 430 | dw_mci_set_cto(host); | 453 | dw_mci_set_cto(host); |
| 431 | |||
| 432 | mci_writel(host, CMD, cmd_flags | SDMMC_CMD_START); | ||
| 433 | } | 454 | } |
| 434 | 455 | ||
| 435 | static inline void send_stop_abort(struct dw_mci *host, struct mmc_data *data) | 456 | static inline void send_stop_abort(struct dw_mci *host, struct mmc_data *data) |
| @@ -1915,10 +1936,15 @@ static int dw_mci_data_complete(struct dw_mci *host, struct mmc_data *data) | |||
| 1915 | static void dw_mci_set_drto(struct dw_mci *host) | 1936 | static void dw_mci_set_drto(struct dw_mci *host) |
| 1916 | { | 1937 | { |
| 1917 | unsigned int drto_clks; | 1938 | unsigned int drto_clks; |
| 1939 | unsigned int drto_div; | ||
| 1918 | unsigned int drto_ms; | 1940 | unsigned int drto_ms; |
| 1919 | 1941 | ||
| 1920 | drto_clks = mci_readl(host, TMOUT) >> 8; | 1942 | drto_clks = mci_readl(host, TMOUT) >> 8; |
| 1921 | drto_ms = DIV_ROUND_UP(drto_clks, host->bus_hz / 1000); | 1943 | drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; |
| 1944 | if (drto_div == 0) | ||
| 1945 | drto_div = 1; | ||
| 1946 | drto_ms = DIV_ROUND_UP(MSEC_PER_SEC * drto_clks * drto_div, | ||
| 1947 | host->bus_hz); | ||
| 1922 | 1948 | ||
| 1923 | /* add a bit spare time */ | 1949 | /* add a bit spare time */ |
| 1924 | drto_ms += 10; | 1950 | drto_ms += 10; |
| @@ -1926,6 +1952,24 @@ static void dw_mci_set_drto(struct dw_mci *host) | |||
| 1926 | mod_timer(&host->dto_timer, jiffies + msecs_to_jiffies(drto_ms)); | 1952 | mod_timer(&host->dto_timer, jiffies + msecs_to_jiffies(drto_ms)); |
| 1927 | } | 1953 | } |
| 1928 | 1954 | ||
| 1955 | static bool dw_mci_clear_pending_cmd_complete(struct dw_mci *host) | ||
| 1956 | { | ||
| 1957 | if (!test_bit(EVENT_CMD_COMPLETE, &host->pending_events)) | ||
| 1958 | return false; | ||
| 1959 | |||
| 1960 | /* | ||
| 1961 | * Really be certain that the timer has stopped. This is a bit of | ||
| 1962 | * paranoia and could only really happen if we had really bad | ||
| 1963 | * interrupt latency and the interrupt routine and timeout were | ||
| 1964 | * running concurrently so that the del_timer() in the interrupt | ||
| 1965 | * handler couldn't run. | ||
| 1966 | */ | ||
| 1967 | WARN_ON(del_timer_sync(&host->cto_timer)); | ||
| 1968 | clear_bit(EVENT_CMD_COMPLETE, &host->pending_events); | ||
| 1969 | |||
| 1970 | return true; | ||
| 1971 | } | ||
| 1972 | |||
| 1929 | static void dw_mci_tasklet_func(unsigned long priv) | 1973 | static void dw_mci_tasklet_func(unsigned long priv) |
| 1930 | { | 1974 | { |
| 1931 | struct dw_mci *host = (struct dw_mci *)priv; | 1975 | struct dw_mci *host = (struct dw_mci *)priv; |
| @@ -1952,8 +1996,7 @@ static void dw_mci_tasklet_func(unsigned long priv) | |||
| 1952 | 1996 | ||
| 1953 | case STATE_SENDING_CMD11: | 1997 | case STATE_SENDING_CMD11: |
| 1954 | case STATE_SENDING_CMD: | 1998 | case STATE_SENDING_CMD: |
| 1955 | if (!test_and_clear_bit(EVENT_CMD_COMPLETE, | 1999 | if (!dw_mci_clear_pending_cmd_complete(host)) |
| 1956 | &host->pending_events)) | ||
| 1957 | break; | 2000 | break; |
| 1958 | 2001 | ||
| 1959 | cmd = host->cmd; | 2002 | cmd = host->cmd; |
| @@ -2122,8 +2165,7 @@ static void dw_mci_tasklet_func(unsigned long priv) | |||
| 2122 | /* fall through */ | 2165 | /* fall through */ |
| 2123 | 2166 | ||
| 2124 | case STATE_SENDING_STOP: | 2167 | case STATE_SENDING_STOP: |
| 2125 | if (!test_and_clear_bit(EVENT_CMD_COMPLETE, | 2168 | if (!dw_mci_clear_pending_cmd_complete(host)) |
| 2126 | &host->pending_events)) | ||
| 2127 | break; | 2169 | break; |
| 2128 | 2170 | ||
| 2129 | /* CMD error in data command */ | 2171 | /* CMD error in data command */ |
| @@ -2570,6 +2612,8 @@ done: | |||
| 2570 | 2612 | ||
| 2571 | static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status) | 2613 | static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status) |
| 2572 | { | 2614 | { |
| 2615 | del_timer(&host->cto_timer); | ||
| 2616 | |||
| 2573 | if (!host->cmd_status) | 2617 | if (!host->cmd_status) |
| 2574 | host->cmd_status = status; | 2618 | host->cmd_status = status; |
| 2575 | 2619 | ||
| @@ -2594,6 +2638,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
| 2594 | struct dw_mci *host = dev_id; | 2638 | struct dw_mci *host = dev_id; |
| 2595 | u32 pending; | 2639 | u32 pending; |
| 2596 | struct dw_mci_slot *slot = host->slot; | 2640 | struct dw_mci_slot *slot = host->slot; |
| 2641 | unsigned long irqflags; | ||
| 2597 | 2642 | ||
| 2598 | pending = mci_readl(host, MINTSTS); /* read-only mask reg */ | 2643 | pending = mci_readl(host, MINTSTS); /* read-only mask reg */ |
| 2599 | 2644 | ||
| @@ -2601,8 +2646,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
| 2601 | /* Check volt switch first, since it can look like an error */ | 2646 | /* Check volt switch first, since it can look like an error */ |
| 2602 | if ((host->state == STATE_SENDING_CMD11) && | 2647 | if ((host->state == STATE_SENDING_CMD11) && |
| 2603 | (pending & SDMMC_INT_VOLT_SWITCH)) { | 2648 | (pending & SDMMC_INT_VOLT_SWITCH)) { |
| 2604 | unsigned long irqflags; | ||
| 2605 | |||
| 2606 | mci_writel(host, RINTSTS, SDMMC_INT_VOLT_SWITCH); | 2649 | mci_writel(host, RINTSTS, SDMMC_INT_VOLT_SWITCH); |
| 2607 | pending &= ~SDMMC_INT_VOLT_SWITCH; | 2650 | pending &= ~SDMMC_INT_VOLT_SWITCH; |
| 2608 | 2651 | ||
| @@ -2618,11 +2661,15 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
| 2618 | } | 2661 | } |
| 2619 | 2662 | ||
| 2620 | if (pending & DW_MCI_CMD_ERROR_FLAGS) { | 2663 | if (pending & DW_MCI_CMD_ERROR_FLAGS) { |
| 2664 | spin_lock_irqsave(&host->irq_lock, irqflags); | ||
| 2665 | |||
| 2621 | del_timer(&host->cto_timer); | 2666 | del_timer(&host->cto_timer); |
| 2622 | mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); | 2667 | mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); |
| 2623 | host->cmd_status = pending; | 2668 | host->cmd_status = pending; |
| 2624 | smp_wmb(); /* drain writebuffer */ | 2669 | smp_wmb(); /* drain writebuffer */ |
| 2625 | set_bit(EVENT_CMD_COMPLETE, &host->pending_events); | 2670 | set_bit(EVENT_CMD_COMPLETE, &host->pending_events); |
| 2671 | |||
| 2672 | spin_unlock_irqrestore(&host->irq_lock, irqflags); | ||
| 2626 | } | 2673 | } |
| 2627 | 2674 | ||
| 2628 | if (pending & DW_MCI_DATA_ERROR_FLAGS) { | 2675 | if (pending & DW_MCI_DATA_ERROR_FLAGS) { |
| @@ -2662,9 +2709,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
| 2662 | } | 2709 | } |
| 2663 | 2710 | ||
| 2664 | if (pending & SDMMC_INT_CMD_DONE) { | 2711 | if (pending & SDMMC_INT_CMD_DONE) { |
| 2665 | del_timer(&host->cto_timer); | 2712 | spin_lock_irqsave(&host->irq_lock, irqflags); |
| 2713 | |||
| 2666 | mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE); | 2714 | mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE); |
| 2667 | dw_mci_cmd_interrupt(host, pending); | 2715 | dw_mci_cmd_interrupt(host, pending); |
| 2716 | |||
| 2717 | spin_unlock_irqrestore(&host->irq_lock, irqflags); | ||
| 2668 | } | 2718 | } |
| 2669 | 2719 | ||
| 2670 | if (pending & SDMMC_INT_CD) { | 2720 | if (pending & SDMMC_INT_CD) { |
| @@ -2938,7 +2988,35 @@ static void dw_mci_cmd11_timer(unsigned long arg) | |||
| 2938 | static void dw_mci_cto_timer(unsigned long arg) | 2988 | static void dw_mci_cto_timer(unsigned long arg) |
| 2939 | { | 2989 | { |
| 2940 | struct dw_mci *host = (struct dw_mci *)arg; | 2990 | struct dw_mci *host = (struct dw_mci *)arg; |
| 2991 | unsigned long irqflags; | ||
| 2992 | u32 pending; | ||
| 2941 | 2993 | ||
| 2994 | spin_lock_irqsave(&host->irq_lock, irqflags); | ||
| 2995 | |||
| 2996 | /* | ||
| 2997 | * If somehow we have very bad interrupt latency it's remotely possible | ||
| 2998 | * that the timer could fire while the interrupt is still pending or | ||
| 2999 | * while the interrupt is midway through running. Let's be paranoid | ||
| 3000 | * and detect those two cases. Note that this is paranoia is somewhat | ||
| 3001 | * justified because in this function we don't actually cancel the | ||
| 3002 | * pending command in the controller--we just assume it will never come. | ||
| 3003 | */ | ||
| 3004 | pending = mci_readl(host, MINTSTS); /* read-only mask reg */ | ||
| 3005 | if (pending & (DW_MCI_CMD_ERROR_FLAGS | SDMMC_INT_CMD_DONE)) { | ||
| 3006 | /* The interrupt should fire; no need to act but we can warn */ | ||
| 3007 | dev_warn(host->dev, "Unexpected interrupt latency\n"); | ||
| 3008 | goto exit; | ||
| 3009 | } | ||
| 3010 | if (test_bit(EVENT_CMD_COMPLETE, &host->pending_events)) { | ||
| 3011 | /* Presumably interrupt handler couldn't delete the timer */ | ||
| 3012 | dev_warn(host->dev, "CTO timeout when already completed\n"); | ||
| 3013 | goto exit; | ||
| 3014 | } | ||
| 3015 | |||
| 3016 | /* | ||
| 3017 | * Continued paranoia to make sure we're in the state we expect. | ||
| 3018 | * This paranoia isn't really justified but it seems good to be safe. | ||
| 3019 | */ | ||
| 2942 | switch (host->state) { | 3020 | switch (host->state) { |
| 2943 | case STATE_SENDING_CMD11: | 3021 | case STATE_SENDING_CMD11: |
| 2944 | case STATE_SENDING_CMD: | 3022 | case STATE_SENDING_CMD: |
| @@ -2957,6 +3035,9 @@ static void dw_mci_cto_timer(unsigned long arg) | |||
| 2957 | host->state); | 3035 | host->state); |
| 2958 | break; | 3036 | break; |
| 2959 | } | 3037 | } |
| 3038 | |||
| 3039 | exit: | ||
| 3040 | spin_unlock_irqrestore(&host->irq_lock, irqflags); | ||
| 2960 | } | 3041 | } |
| 2961 | 3042 | ||
| 2962 | static void dw_mci_dto_timer(unsigned long arg) | 3043 | static void dw_mci_dto_timer(unsigned long arg) |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c99dc59d729b..b2db581131b2 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
| @@ -2042,6 +2042,7 @@ static int bond_miimon_inspect(struct bonding *bond) | |||
| 2042 | 2042 | ||
| 2043 | bond_for_each_slave_rcu(bond, slave, iter) { | 2043 | bond_for_each_slave_rcu(bond, slave, iter) { |
| 2044 | slave->new_link = BOND_LINK_NOCHANGE; | 2044 | slave->new_link = BOND_LINK_NOCHANGE; |
| 2045 | slave->link_new_state = slave->link; | ||
| 2045 | 2046 | ||
| 2046 | link_state = bond_check_dev_link(bond, slave->dev, 0); | 2047 | link_state = bond_check_dev_link(bond, slave->dev, 0); |
| 2047 | 2048 | ||
| @@ -3253,7 +3254,7 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb) | |||
| 3253 | hash ^= (hash >> 16); | 3254 | hash ^= (hash >> 16); |
| 3254 | hash ^= (hash >> 8); | 3255 | hash ^= (hash >> 8); |
| 3255 | 3256 | ||
| 3256 | return hash; | 3257 | return hash >> 1; |
| 3257 | } | 3258 | } |
| 3258 | 3259 | ||
| 3259 | /*-------------------------- Device entry points ----------------------------*/ | 3260 | /*-------------------------- Device entry points ----------------------------*/ |
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c index 83eec9a8c275..eb441e5e2cd8 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c | |||
| @@ -1809,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv) | |||
| 1809 | 1809 | ||
| 1810 | static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv) | 1810 | static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv) |
| 1811 | { | 1811 | { |
| 1812 | u32 __maybe_unused reg; | 1812 | u32 reg; |
| 1813 | 1813 | ||
| 1814 | /* Include Broadcom tag in pad extension */ | 1814 | reg = gib_readl(priv, GIB_CONTROL); |
| 1815 | /* Include Broadcom tag in pad extension and fix up IPG_LENGTH */ | ||
| 1815 | if (netdev_uses_dsa(priv->netdev)) { | 1816 | if (netdev_uses_dsa(priv->netdev)) { |
| 1816 | reg = gib_readl(priv, GIB_CONTROL); | ||
| 1817 | reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT); | 1817 | reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT); |
| 1818 | reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT; | 1818 | reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT; |
| 1819 | gib_writel(priv, reg, GIB_CONTROL); | ||
| 1820 | } | 1819 | } |
| 1820 | reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT); | ||
| 1821 | reg |= 12 << GIB_IPG_LEN_SHIFT; | ||
| 1822 | gib_writel(priv, reg, GIB_CONTROL); | ||
| 1821 | } | 1823 | } |
| 1822 | 1824 | ||
| 1823 | static int bcm_sysport_open(struct net_device *dev) | 1825 | static int bcm_sysport_open(struct net_device *dev) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h b/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h index f2d623a7aee0..123e2c1b65f5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | #define T4FW_VERSION_MAJOR 0x01 | 38 | #define T4FW_VERSION_MAJOR 0x01 |
| 39 | #define T4FW_VERSION_MINOR 0x10 | 39 | #define T4FW_VERSION_MINOR 0x10 |
| 40 | #define T4FW_VERSION_MICRO 0x2D | 40 | #define T4FW_VERSION_MICRO 0x3F |
| 41 | #define T4FW_VERSION_BUILD 0x00 | 41 | #define T4FW_VERSION_BUILD 0x00 |
| 42 | 42 | ||
| 43 | #define T4FW_MIN_VERSION_MAJOR 0x01 | 43 | #define T4FW_MIN_VERSION_MAJOR 0x01 |
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | #define T5FW_VERSION_MAJOR 0x01 | 47 | #define T5FW_VERSION_MAJOR 0x01 |
| 48 | #define T5FW_VERSION_MINOR 0x10 | 48 | #define T5FW_VERSION_MINOR 0x10 |
| 49 | #define T5FW_VERSION_MICRO 0x2D | 49 | #define T5FW_VERSION_MICRO 0x3F |
| 50 | #define T5FW_VERSION_BUILD 0x00 | 50 | #define T5FW_VERSION_BUILD 0x00 |
| 51 | 51 | ||
| 52 | #define T5FW_MIN_VERSION_MAJOR 0x00 | 52 | #define T5FW_MIN_VERSION_MAJOR 0x00 |
| @@ -55,7 +55,7 @@ | |||
| 55 | 55 | ||
| 56 | #define T6FW_VERSION_MAJOR 0x01 | 56 | #define T6FW_VERSION_MAJOR 0x01 |
| 57 | #define T6FW_VERSION_MINOR 0x10 | 57 | #define T6FW_VERSION_MINOR 0x10 |
| 58 | #define T6FW_VERSION_MICRO 0x2D | 58 | #define T6FW_VERSION_MICRO 0x3F |
| 59 | #define T6FW_VERSION_BUILD 0x00 | 59 | #define T6FW_VERSION_BUILD 0x00 |
| 60 | 60 | ||
| 61 | #define T6FW_MIN_VERSION_MAJOR 0x00 | 61 | #define T6FW_MIN_VERSION_MAJOR 0x00 |
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index a37af5813f33..fcf9ba5eb8d1 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c | |||
| @@ -6747,6 +6747,9 @@ static int mvpp2_irqs_init(struct mvpp2_port *port) | |||
| 6747 | for (i = 0; i < port->nqvecs; i++) { | 6747 | for (i = 0; i < port->nqvecs; i++) { |
| 6748 | struct mvpp2_queue_vector *qv = port->qvecs + i; | 6748 | struct mvpp2_queue_vector *qv = port->qvecs + i; |
| 6749 | 6749 | ||
| 6750 | if (qv->type == MVPP2_QUEUE_VECTOR_PRIVATE) | ||
| 6751 | irq_set_status_flags(qv->irq, IRQ_NO_BALANCING); | ||
| 6752 | |||
| 6750 | err = request_irq(qv->irq, mvpp2_isr, 0, port->dev->name, qv); | 6753 | err = request_irq(qv->irq, mvpp2_isr, 0, port->dev->name, qv); |
| 6751 | if (err) | 6754 | if (err) |
| 6752 | goto err; | 6755 | goto err; |
| @@ -6776,6 +6779,7 @@ static void mvpp2_irqs_deinit(struct mvpp2_port *port) | |||
| 6776 | struct mvpp2_queue_vector *qv = port->qvecs + i; | 6779 | struct mvpp2_queue_vector *qv = port->qvecs + i; |
| 6777 | 6780 | ||
| 6778 | irq_set_affinity_hint(qv->irq, NULL); | 6781 | irq_set_affinity_hint(qv->irq, NULL); |
| 6782 | irq_clear_status_flags(qv->irq, IRQ_NO_BALANCING); | ||
| 6779 | free_irq(qv->irq, qv); | 6783 | free_irq(qv->irq, qv); |
| 6780 | } | 6784 | } |
| 6781 | } | 6785 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c index 850cdc980ab5..4837045ffba3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | |||
| @@ -365,21 +365,24 @@ static void mlx5e_execute_l2_action(struct mlx5e_priv *priv, | |||
| 365 | struct mlx5e_l2_hash_node *hn) | 365 | struct mlx5e_l2_hash_node *hn) |
| 366 | { | 366 | { |
| 367 | u8 action = hn->action; | 367 | u8 action = hn->action; |
| 368 | u8 mac_addr[ETH_ALEN]; | ||
| 368 | int l2_err = 0; | 369 | int l2_err = 0; |
| 369 | 370 | ||
| 371 | ether_addr_copy(mac_addr, hn->ai.addr); | ||
| 372 | |||
| 370 | switch (action) { | 373 | switch (action) { |
| 371 | case MLX5E_ACTION_ADD: | 374 | case MLX5E_ACTION_ADD: |
| 372 | mlx5e_add_l2_flow_rule(priv, &hn->ai, MLX5E_FULLMATCH); | 375 | mlx5e_add_l2_flow_rule(priv, &hn->ai, MLX5E_FULLMATCH); |
| 373 | if (!is_multicast_ether_addr(hn->ai.addr)) { | 376 | if (!is_multicast_ether_addr(mac_addr)) { |
| 374 | l2_err = mlx5_mpfs_add_mac(priv->mdev, hn->ai.addr); | 377 | l2_err = mlx5_mpfs_add_mac(priv->mdev, mac_addr); |
| 375 | hn->mpfs = !l2_err; | 378 | hn->mpfs = !l2_err; |
| 376 | } | 379 | } |
| 377 | hn->action = MLX5E_ACTION_NONE; | 380 | hn->action = MLX5E_ACTION_NONE; |
| 378 | break; | 381 | break; |
| 379 | 382 | ||
| 380 | case MLX5E_ACTION_DEL: | 383 | case MLX5E_ACTION_DEL: |
| 381 | if (!is_multicast_ether_addr(hn->ai.addr) && hn->mpfs) | 384 | if (!is_multicast_ether_addr(mac_addr) && hn->mpfs) |
| 382 | l2_err = mlx5_mpfs_del_mac(priv->mdev, hn->ai.addr); | 385 | l2_err = mlx5_mpfs_del_mac(priv->mdev, mac_addr); |
| 383 | mlx5e_del_l2_flow_rule(priv, &hn->ai); | 386 | mlx5e_del_l2_flow_rule(priv, &hn->ai); |
| 384 | mlx5e_del_l2_from_hash(hn); | 387 | mlx5e_del_l2_from_hash(hn); |
| 385 | break; | 388 | break; |
| @@ -387,7 +390,7 @@ static void mlx5e_execute_l2_action(struct mlx5e_priv *priv, | |||
| 387 | 390 | ||
| 388 | if (l2_err) | 391 | if (l2_err) |
| 389 | netdev_warn(priv->netdev, "MPFS, failed to %s mac %pM, err(%d)\n", | 392 | netdev_warn(priv->netdev, "MPFS, failed to %s mac %pM, err(%d)\n", |
| 390 | action == MLX5E_ACTION_ADD ? "add" : "del", hn->ai.addr, l2_err); | 393 | action == MLX5E_ACTION_ADD ? "add" : "del", mac_addr, l2_err); |
| 391 | } | 394 | } |
| 392 | 395 | ||
| 393 | static void mlx5e_sync_netdev_addr(struct mlx5e_priv *priv) | 396 | static void mlx5e_sync_netdev_addr(struct mlx5e_priv *priv) |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 6383695004a5..195eb7e71473 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |||
| @@ -168,8 +168,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev, | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | /* Processing RX queues common config */ | 170 | /* Processing RX queues common config */ |
| 171 | if (of_property_read_u8(rx_node, "snps,rx-queues-to-use", | 171 | if (of_property_read_u32(rx_node, "snps,rx-queues-to-use", |
| 172 | &plat->rx_queues_to_use)) | 172 | &plat->rx_queues_to_use)) |
| 173 | plat->rx_queues_to_use = 1; | 173 | plat->rx_queues_to_use = 1; |
| 174 | 174 | ||
| 175 | if (of_property_read_bool(rx_node, "snps,rx-sched-sp")) | 175 | if (of_property_read_bool(rx_node, "snps,rx-sched-sp")) |
| @@ -191,8 +191,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev, | |||
| 191 | else | 191 | else |
| 192 | plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; | 192 | plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; |
| 193 | 193 | ||
| 194 | if (of_property_read_u8(q_node, "snps,map-to-dma-channel", | 194 | if (of_property_read_u32(q_node, "snps,map-to-dma-channel", |
| 195 | &plat->rx_queues_cfg[queue].chan)) | 195 | &plat->rx_queues_cfg[queue].chan)) |
| 196 | plat->rx_queues_cfg[queue].chan = queue; | 196 | plat->rx_queues_cfg[queue].chan = queue; |
| 197 | /* TODO: Dynamic mapping to be included in the future */ | 197 | /* TODO: Dynamic mapping to be included in the future */ |
| 198 | 198 | ||
| @@ -222,8 +222,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev, | |||
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | /* Processing TX queues common config */ | 224 | /* Processing TX queues common config */ |
| 225 | if (of_property_read_u8(tx_node, "snps,tx-queues-to-use", | 225 | if (of_property_read_u32(tx_node, "snps,tx-queues-to-use", |
| 226 | &plat->tx_queues_to_use)) | 226 | &plat->tx_queues_to_use)) |
| 227 | plat->tx_queues_to_use = 1; | 227 | plat->tx_queues_to_use = 1; |
| 228 | 228 | ||
| 229 | if (of_property_read_bool(tx_node, "snps,tx-sched-wrr")) | 229 | if (of_property_read_bool(tx_node, "snps,tx-sched-wrr")) |
| @@ -244,8 +244,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev, | |||
| 244 | if (queue >= plat->tx_queues_to_use) | 244 | if (queue >= plat->tx_queues_to_use) |
| 245 | break; | 245 | break; |
| 246 | 246 | ||
| 247 | if (of_property_read_u8(q_node, "snps,weight", | 247 | if (of_property_read_u32(q_node, "snps,weight", |
| 248 | &plat->tx_queues_cfg[queue].weight)) | 248 | &plat->tx_queues_cfg[queue].weight)) |
| 249 | plat->tx_queues_cfg[queue].weight = 0x10 + queue; | 249 | plat->tx_queues_cfg[queue].weight = 0x10 + queue; |
| 250 | 250 | ||
| 251 | if (of_property_read_bool(q_node, "snps,dcb-algorithm")) { | 251 | if (of_property_read_bool(q_node, "snps,dcb-algorithm")) { |
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index b2ff88e69a81..3d4f7959dabb 100644 --- a/drivers/net/usb/asix_devices.c +++ b/drivers/net/usb/asix_devices.c | |||
| @@ -626,7 +626,7 @@ static int asix_suspend(struct usb_interface *intf, pm_message_t message) | |||
| 626 | struct usbnet *dev = usb_get_intfdata(intf); | 626 | struct usbnet *dev = usb_get_intfdata(intf); |
| 627 | struct asix_common_private *priv = dev->driver_priv; | 627 | struct asix_common_private *priv = dev->driver_priv; |
| 628 | 628 | ||
| 629 | if (priv->suspend) | 629 | if (priv && priv->suspend) |
| 630 | priv->suspend(dev); | 630 | priv->suspend(dev); |
| 631 | 631 | ||
| 632 | return usbnet_suspend(intf, message); | 632 | return usbnet_suspend(intf, message); |
| @@ -678,7 +678,7 @@ static int asix_resume(struct usb_interface *intf) | |||
| 678 | struct usbnet *dev = usb_get_intfdata(intf); | 678 | struct usbnet *dev = usb_get_intfdata(intf); |
| 679 | struct asix_common_private *priv = dev->driver_priv; | 679 | struct asix_common_private *priv = dev->driver_priv; |
| 680 | 680 | ||
| 681 | if (priv->resume) | 681 | if (priv && priv->resume) |
| 682 | priv->resume(dev); | 682 | priv->resume(dev); |
| 683 | 683 | ||
| 684 | return usbnet_resume(intf); | 684 | return usbnet_resume(intf); |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 3e7a3ac3a362..05dca3e5c93d 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -230,7 +230,7 @@ skip: | |||
| 230 | goto bad_desc; | 230 | goto bad_desc; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | if (header.usb_cdc_ether_desc) { | 233 | if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) { |
| 234 | dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize); | 234 | dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize); |
| 235 | /* because of Zaurus, we may be ignoring the host | 235 | /* because of Zaurus, we may be ignoring the host |
| 236 | * side link address we were given. | 236 | * side link address we were given. |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 8c3733608271..8d4a6f7cba61 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
| @@ -499,6 +499,7 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
| 499 | return 1; | 499 | return 1; |
| 500 | } | 500 | } |
| 501 | if (rawip) { | 501 | if (rawip) { |
| 502 | skb_reset_mac_header(skb); | ||
| 502 | skb->dev = dev->net; /* normally set by eth_type_trans */ | 503 | skb->dev = dev->net; /* normally set by eth_type_trans */ |
| 503 | skb->protocol = proto; | 504 | skb->protocol = proto; |
| 504 | return 1; | 505 | return 1; |
| @@ -681,7 +682,7 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 681 | } | 682 | } |
| 682 | 683 | ||
| 683 | /* errors aren't fatal - we can live with the dynamic address */ | 684 | /* errors aren't fatal - we can live with the dynamic address */ |
| 684 | if (cdc_ether) { | 685 | if (cdc_ether && cdc_ether->wMaxSegmentSize) { |
| 685 | dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize); | 686 | dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize); |
| 686 | usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress); | 687 | usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress); |
| 687 | } | 688 | } |
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 9b243e6f3008..7dc3bcac3506 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c | |||
| @@ -1165,7 +1165,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it) | |||
| 1165 | frh->family = family; | 1165 | frh->family = family; |
| 1166 | frh->action = FR_ACT_TO_TBL; | 1166 | frh->action = FR_ACT_TO_TBL; |
| 1167 | 1167 | ||
| 1168 | if (nla_put_u32(skb, FRA_L3MDEV, 1)) | 1168 | if (nla_put_u8(skb, FRA_L3MDEV, 1)) |
| 1169 | goto nla_put_failure; | 1169 | goto nla_put_failure; |
| 1170 | 1170 | ||
| 1171 | if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF)) | 1171 | if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF)) |
diff --git a/drivers/power/reset/piix4-poweroff.c b/drivers/power/reset/piix4-poweroff.c index bacfc95783f0..20ce3ff5e039 100644 --- a/drivers/power/reset/piix4-poweroff.c +++ b/drivers/power/reset/piix4-poweroff.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2016 Imagination Technologies | 2 | * Copyright (C) 2016 Imagination Technologies |
| 3 | * Author: Paul Burton <paul.burton@imgtec.com> | 3 | * Author: Paul Burton <paul.burton@mips.com> |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
| @@ -109,5 +109,5 @@ static struct pci_driver piix4_poweroff_driver = { | |||
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | module_pci_driver(piix4_poweroff_driver); | 111 | module_pci_driver(piix4_poweroff_driver); |
| 112 | MODULE_AUTHOR("Paul Burton <paul.burton@imgtec.com>"); | 112 | MODULE_AUTHOR("Paul Burton <paul.burton@mips.com>"); |
| 113 | MODULE_LICENSE("GPL"); | 113 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3bd956d3bc5d..dce42a416876 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
| @@ -3212,6 +3212,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 3212 | ql_log(ql_log_fatal, base_vha, 0x00ed, | 3212 | ql_log(ql_log_fatal, base_vha, 0x00ed, |
| 3213 | "Failed to start DPC thread.\n"); | 3213 | "Failed to start DPC thread.\n"); |
| 3214 | ret = PTR_ERR(ha->dpc_thread); | 3214 | ret = PTR_ERR(ha->dpc_thread); |
| 3215 | ha->dpc_thread = NULL; | ||
| 3215 | goto probe_failed; | 3216 | goto probe_failed; |
| 3216 | } | 3217 | } |
| 3217 | ql_dbg(ql_dbg_init, base_vha, 0x00ee, | 3218 | ql_dbg(ql_dbg_init, base_vha, 0x00ee, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ad3ea24f0885..bcc1694cebcd 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -2685,7 +2685,6 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
| 2685 | 2685 | ||
| 2686 | } | 2686 | } |
| 2687 | sdev->sdev_state = state; | 2687 | sdev->sdev_state = state; |
| 2688 | sysfs_notify(&sdev->sdev_gendev.kobj, NULL, "state"); | ||
| 2689 | return 0; | 2688 | return 0; |
| 2690 | 2689 | ||
| 2691 | illegal: | 2690 | illegal: |
| @@ -3109,7 +3108,6 @@ int scsi_internal_device_unblock_nowait(struct scsi_device *sdev, | |||
| 3109 | case SDEV_BLOCK: | 3108 | case SDEV_BLOCK: |
| 3110 | case SDEV_TRANSPORT_OFFLINE: | 3109 | case SDEV_TRANSPORT_OFFLINE: |
| 3111 | sdev->sdev_state = new_state; | 3110 | sdev->sdev_state = new_state; |
| 3112 | sysfs_notify(&sdev->sdev_gendev.kobj, NULL, "state"); | ||
| 3113 | break; | 3111 | break; |
| 3114 | case SDEV_CREATED_BLOCK: | 3112 | case SDEV_CREATED_BLOCK: |
| 3115 | if (new_state == SDEV_TRANSPORT_OFFLINE || | 3113 | if (new_state == SDEV_TRANSPORT_OFFLINE || |
| @@ -3117,7 +3115,6 @@ int scsi_internal_device_unblock_nowait(struct scsi_device *sdev, | |||
| 3117 | sdev->sdev_state = new_state; | 3115 | sdev->sdev_state = new_state; |
| 3118 | else | 3116 | else |
| 3119 | sdev->sdev_state = SDEV_CREATED; | 3117 | sdev->sdev_state = SDEV_CREATED; |
| 3120 | sysfs_notify(&sdev->sdev_gendev.kobj, NULL, "state"); | ||
| 3121 | break; | 3118 | break; |
| 3122 | case SDEV_CANCEL: | 3119 | case SDEV_CANCEL: |
| 3123 | case SDEV_OFFLINE: | 3120 | case SDEV_OFFLINE: |
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c index 4f6f01cf9968..36f6190931bc 100644 --- a/drivers/scsi/scsi_transport_srp.c +++ b/drivers/scsi/scsi_transport_srp.c | |||
| @@ -556,11 +556,8 @@ int srp_reconnect_rport(struct srp_rport *rport) | |||
| 556 | */ | 556 | */ |
| 557 | shost_for_each_device(sdev, shost) { | 557 | shost_for_each_device(sdev, shost) { |
| 558 | mutex_lock(&sdev->state_mutex); | 558 | mutex_lock(&sdev->state_mutex); |
| 559 | if (sdev->sdev_state == SDEV_OFFLINE) { | 559 | if (sdev->sdev_state == SDEV_OFFLINE) |
| 560 | sdev->sdev_state = SDEV_RUNNING; | 560 | sdev->sdev_state = SDEV_RUNNING; |
| 561 | sysfs_notify(&sdev->sdev_gendev.kobj, | ||
| 562 | NULL, "state"); | ||
| 563 | } | ||
| 564 | mutex_unlock(&sdev->state_mutex); | 561 | mutex_unlock(&sdev->state_mutex); |
| 565 | } | 562 | } |
| 566 | } else if (rport->state == SRP_RPORT_RUNNING) { | 563 | } else if (rport->state == SRP_RPORT_RUNNING) { |
