This is a note to let you know that I've just added the patch titled
scsi: lpfc: Add missing memory barrier
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-lpfc-add-missing-memory-barrier.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: James Smart <james.smart(a)broadcom.com>
Date: Mon, 19 Dec 2016 15:07:30 -0800
Subject: scsi: lpfc: Add missing memory barrier
From: James Smart <james.smart(a)broadcom.com>
[ Upstream commit 6b3b3bdb83b4ad51252d21bb13596db879e51850 ]
On loosely ordered memory systems (PPC for example), the WQE elements
were being updated in memory, but not necessarily flushed before the
separate doorbell was written to hw which would cause hw to dma the
WQE element. Thus, the hardware occasionally received partially
updated WQE data.
Add the memory barrier after updating the WQE memory.
Signed-off-by: Dick Kennedy <dick.kennedy(a)broadcom.com>
Signed-off-by: James Smart <james.smart(a)broadcom.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/lpfc/lpfc_sli.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -119,6 +119,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, u
if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED)
bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id);
lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size);
+ /* ensure WQE bcopy flushed before doorbell write */
+ wmb();
/* Update the host index before invoking device */
host_index = q->host_index;
Patches currently in stable-queue which might be from james.smart(a)broadcom.com are
queue-4.9/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch
queue-4.9/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch
queue-4.9/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch
queue-4.9/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch
queue-4.9/scsi-lpfc-add-missing-memory-barrier.patch
This is a note to let you know that I've just added the patch titled
Revert "uapi: fix linux/rds.h userspace compilation errors"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-uapi-fix-linux-rds.h-userspace-compilation-errors.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Mon, 13 Nov 2017 18:03:32 -0500
Subject: Revert "uapi: fix linux/rds.h userspace compilation errors"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit ad50561ba7a664bc581826c9d57d137fcf17bfa5.
There was a mixup with the commit message for two upstream commit
that have the same subject line.
This revert will be followed by the two commits with proper commit
messages.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
include/uapi/linux/rds.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -35,7 +35,6 @@
#define _LINUX_RDS_H
#include <linux/types.h>
-#include <linux/socket.h> /* For __kernel_sockaddr_storage. */
#define RDS_IB_ABI_VERSION 0x301
@@ -224,7 +223,7 @@ struct rds_get_mr_args {
};
struct rds_get_mr_for_dest_args {
- struct __kernel_sockaddr_storage dest_addr;
+ struct sockaddr_storage dest_addr;
struct rds_iovec vec;
uint64_t cookie_addr;
uint64_t flags;
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/ata-sata_mv-should-depend-on-has_dma.patch
queue-4.9/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch
queue-4.9/arm-dts-omap5-uevm-allow-bootloader-to-configure-usb-ethernet-mac.patch
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
queue-4.9/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch
queue-4.9/alsa-vx-don-t-try-to-update-capture-stream-before-running.patch
queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch
queue-4.9/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-4.9/staging-rtl8188eu-fix-incorrect-error-tags-from-logs.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-error.patch
queue-4.9/ata-sata_highbank-should-depend-on-has_dma.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
queue-4.9/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
queue-4.9/revert-dt-bindings-add-vendor-prefix-for-lego.patch
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/x86-irq-trace-add-__irq_entry-annotation-to-x86-s-platform-irq-handlers.patch
queue-4.9/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch
queue-4.9/igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
queue-4.9/arm-dts-fix-omap3-off-mode-pull-defines.patch
queue-4.9/arm-dts-fix-compatible-for-ti81xx-uarts-for-8250.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/scsi-lpfc-add-missing-memory-barrier.patch
queue-4.9/alsa-vx-fix-possible-transfer-overflow.patch
queue-4.9/backlight-lcd-fix-race-condition-during-register.patch
queue-4.9/fm10k-request-reset-when-mbx-state-changes.patch
queue-4.9/arm64-dts-ns2-reserve-memory-for-nitro-firmware.patch
queue-4.9/staging-rtl8712-fixed-little-endian-problem.patch
queue-4.9/revert-crypto-xts-add-ecb-dependency.patch
queue-4.9/backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
queue-4.9/staging-wilc1000-fix-endian-sparse-warning.patch
queue-4.9/alsa-hda-realtek-add-new-codec-id-alc299.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/scsi-ufs-add-capability-to-keep-auto-bkops-always-enabled.patch
queue-4.9/tcp-provide-timestamps-for-partial-writes.patch
queue-4.9/revert-uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
queue-4.9/revert-dt-bindings-add-lego-mindstorms-ev3-compatible-specification.patch
queue-4.9/rtc-rx8010-change-lock-mechanism.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
queue-4.9/ata-ata_bmdma-should-depend-on-has_dma.patch
queue-4.9/drm-omap-panel-sony-acx565akm.c-add-module_alias.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
queue-4.9/igb-close-suspend-race-in-netif_device_detach.patch
queue-4.9/igb-reset-the-phy-before-reading-the-phy-id.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
queue-4.9/arm-omap2-fix-init-for-multiple-quirks-for-the-same-soc.patch
queue-4.9/scsi-ufs-qcom-fix-module-autoload.patch
queue-4.9/arm-dts-fix-am335x-and-dm814x-scm-syscon-to-probe-children.patch
This is a note to let you know that I've just added the patch titled
Revert "crypto: xts - Add ECB dependency"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-crypto-xts-add-ecb-dependency.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Mon, 13 Nov 2017 17:55:20 -0500
Subject: Revert "crypto: xts - Add ECB dependency"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit 6145171a6bc0abdc3eca7a4b795ede467d2ba569.
The commit fixes a bug that was only introduced in 4.10, thus is
irrelevant for <=4.9.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
crypto/Kconfig | 1 -
1 file changed, 1 deletion(-)
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -360,7 +360,6 @@ config CRYPTO_XTS
select CRYPTO_BLKCIPHER
select CRYPTO_MANAGER
select CRYPTO_GF128MUL
- select CRYPTO_ECB
help
XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain,
key size 256, 384 or 512 bits. This implementation currently
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/ata-sata_mv-should-depend-on-has_dma.patch
queue-4.9/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch
queue-4.9/arm-dts-omap5-uevm-allow-bootloader-to-configure-usb-ethernet-mac.patch
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
queue-4.9/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch
queue-4.9/alsa-vx-don-t-try-to-update-capture-stream-before-running.patch
queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch
queue-4.9/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-4.9/staging-rtl8188eu-fix-incorrect-error-tags-from-logs.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-error.patch
queue-4.9/ata-sata_highbank-should-depend-on-has_dma.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
queue-4.9/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
queue-4.9/revert-dt-bindings-add-vendor-prefix-for-lego.patch
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/x86-irq-trace-add-__irq_entry-annotation-to-x86-s-platform-irq-handlers.patch
queue-4.9/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch
queue-4.9/igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
queue-4.9/arm-dts-fix-omap3-off-mode-pull-defines.patch
queue-4.9/arm-dts-fix-compatible-for-ti81xx-uarts-for-8250.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/scsi-lpfc-add-missing-memory-barrier.patch
queue-4.9/alsa-vx-fix-possible-transfer-overflow.patch
queue-4.9/backlight-lcd-fix-race-condition-during-register.patch
queue-4.9/fm10k-request-reset-when-mbx-state-changes.patch
queue-4.9/arm64-dts-ns2-reserve-memory-for-nitro-firmware.patch
queue-4.9/staging-rtl8712-fixed-little-endian-problem.patch
queue-4.9/revert-crypto-xts-add-ecb-dependency.patch
queue-4.9/backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
queue-4.9/staging-wilc1000-fix-endian-sparse-warning.patch
queue-4.9/alsa-hda-realtek-add-new-codec-id-alc299.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/scsi-ufs-add-capability-to-keep-auto-bkops-always-enabled.patch
queue-4.9/tcp-provide-timestamps-for-partial-writes.patch
queue-4.9/revert-uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
queue-4.9/revert-dt-bindings-add-lego-mindstorms-ev3-compatible-specification.patch
queue-4.9/rtc-rx8010-change-lock-mechanism.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
queue-4.9/ata-ata_bmdma-should-depend-on-has_dma.patch
queue-4.9/drm-omap-panel-sony-acx565akm.c-add-module_alias.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
queue-4.9/igb-close-suspend-race-in-netif_device_detach.patch
queue-4.9/igb-reset-the-phy-before-reading-the-phy-id.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
queue-4.9/arm-omap2-fix-init-for-multiple-quirks-for-the-same-soc.patch
queue-4.9/scsi-ufs-qcom-fix-module-autoload.patch
queue-4.9/arm-dts-fix-am335x-and-dm814x-scm-syscon-to-probe-children.patch
This is a note to let you know that I've just added the patch titled
Revert "dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-dt-bindings-add-lego-mindstorms-ev3-compatible-specification.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Thu, 16 Nov 2017 21:04:58 -0500
Subject: Revert "dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit 852bf68b7a62195c3c0c63f3b11f3f30958fc220.
As Ben pointed out, these drivers don't exist in <=4.9.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
Documentation/devicetree/bindings/arm/davinci.txt | 4 ----
1 file changed, 4 deletions(-)
--- a/Documentation/devicetree/bindings/arm/davinci.txt
+++ b/Documentation/devicetree/bindings/arm/davinci.txt
@@ -13,10 +13,6 @@ EnBW AM1808 based CMC board
Required root node properties:
- compatible = "enbw,cmc", "ti,da850;
-LEGO MINDSTORMS EV3 (AM1808 based)
-Required root node properties:
- - compatible = "lego,ev3", "ti,da850";
-
Generic DaVinci Boards
----------------------
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/ata-sata_mv-should-depend-on-has_dma.patch
queue-4.9/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch
queue-4.9/arm-dts-omap5-uevm-allow-bootloader-to-configure-usb-ethernet-mac.patch
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
queue-4.9/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch
queue-4.9/alsa-vx-don-t-try-to-update-capture-stream-before-running.patch
queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch
queue-4.9/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-4.9/staging-rtl8188eu-fix-incorrect-error-tags-from-logs.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-error.patch
queue-4.9/ata-sata_highbank-should-depend-on-has_dma.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
queue-4.9/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
queue-4.9/revert-dt-bindings-add-vendor-prefix-for-lego.patch
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/x86-irq-trace-add-__irq_entry-annotation-to-x86-s-platform-irq-handlers.patch
queue-4.9/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch
queue-4.9/igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
queue-4.9/arm-dts-fix-omap3-off-mode-pull-defines.patch
queue-4.9/arm-dts-fix-compatible-for-ti81xx-uarts-for-8250.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/scsi-lpfc-add-missing-memory-barrier.patch
queue-4.9/alsa-vx-fix-possible-transfer-overflow.patch
queue-4.9/backlight-lcd-fix-race-condition-during-register.patch
queue-4.9/fm10k-request-reset-when-mbx-state-changes.patch
queue-4.9/arm64-dts-ns2-reserve-memory-for-nitro-firmware.patch
queue-4.9/staging-rtl8712-fixed-little-endian-problem.patch
queue-4.9/revert-crypto-xts-add-ecb-dependency.patch
queue-4.9/backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
queue-4.9/staging-wilc1000-fix-endian-sparse-warning.patch
queue-4.9/alsa-hda-realtek-add-new-codec-id-alc299.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/scsi-ufs-add-capability-to-keep-auto-bkops-always-enabled.patch
queue-4.9/tcp-provide-timestamps-for-partial-writes.patch
queue-4.9/revert-uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
queue-4.9/revert-dt-bindings-add-lego-mindstorms-ev3-compatible-specification.patch
queue-4.9/rtc-rx8010-change-lock-mechanism.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
queue-4.9/ata-ata_bmdma-should-depend-on-has_dma.patch
queue-4.9/drm-omap-panel-sony-acx565akm.c-add-module_alias.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
queue-4.9/igb-close-suspend-race-in-netif_device_detach.patch
queue-4.9/igb-reset-the-phy-before-reading-the-phy-id.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
queue-4.9/arm-omap2-fix-init-for-multiple-quirks-for-the-same-soc.patch
queue-4.9/scsi-ufs-qcom-fix-module-autoload.patch
queue-4.9/arm-dts-fix-am335x-and-dm814x-scm-syscon-to-probe-children.patch
This is a note to let you know that I've just added the patch titled
Revert "dt-bindings: Add vendor prefix for LEGO"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-dt-bindings-add-vendor-prefix-for-lego.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Thu, 16 Nov 2017 21:04:38 -0500
Subject: Revert "dt-bindings: Add vendor prefix for LEGO"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit 04e13a5ec96db94c1cc8ce7b0b1e1b626e0c00c7.
As Ben pointed out, these drivers don't exist in <=4.9.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 -
1 file changed, 1 deletion(-)
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -154,7 +154,6 @@ kosagi Sutajio Ko-Usagi PTE Ltd.
kyo Kyocera Corporation
lacie LaCie
lantiq Lantiq Semiconductor
-lego LEGO Systems A/S
lenovo Lenovo Group Ltd.
lg LG Corporation
linux Linux-specific binding
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/ata-sata_mv-should-depend-on-has_dma.patch
queue-4.9/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch
queue-4.9/arm-dts-omap5-uevm-allow-bootloader-to-configure-usb-ethernet-mac.patch
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
queue-4.9/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch
queue-4.9/alsa-vx-don-t-try-to-update-capture-stream-before-running.patch
queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch
queue-4.9/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-4.9/staging-rtl8188eu-fix-incorrect-error-tags-from-logs.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-error.patch
queue-4.9/ata-sata_highbank-should-depend-on-has_dma.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
queue-4.9/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
queue-4.9/revert-dt-bindings-add-vendor-prefix-for-lego.patch
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/x86-irq-trace-add-__irq_entry-annotation-to-x86-s-platform-irq-handlers.patch
queue-4.9/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch
queue-4.9/igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
queue-4.9/arm-dts-fix-omap3-off-mode-pull-defines.patch
queue-4.9/arm-dts-fix-compatible-for-ti81xx-uarts-for-8250.patch
queue-4.9/uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/scsi-lpfc-add-missing-memory-barrier.patch
queue-4.9/alsa-vx-fix-possible-transfer-overflow.patch
queue-4.9/backlight-lcd-fix-race-condition-during-register.patch
queue-4.9/fm10k-request-reset-when-mbx-state-changes.patch
queue-4.9/arm64-dts-ns2-reserve-memory-for-nitro-firmware.patch
queue-4.9/staging-rtl8712-fixed-little-endian-problem.patch
queue-4.9/revert-crypto-xts-add-ecb-dependency.patch
queue-4.9/backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
queue-4.9/staging-wilc1000-fix-endian-sparse-warning.patch
queue-4.9/alsa-hda-realtek-add-new-codec-id-alc299.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/scsi-ufs-add-capability-to-keep-auto-bkops-always-enabled.patch
queue-4.9/tcp-provide-timestamps-for-partial-writes.patch
queue-4.9/revert-uapi-fix-linux-rds.h-userspace-compilation-errors.patch
queue-4.9/ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
queue-4.9/revert-dt-bindings-add-lego-mindstorms-ev3-compatible-specification.patch
queue-4.9/rtc-rx8010-change-lock-mechanism.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
queue-4.9/ata-ata_bmdma-should-depend-on-has_dma.patch
queue-4.9/drm-omap-panel-sony-acx565akm.c-add-module_alias.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
queue-4.9/igb-close-suspend-race-in-netif_device_detach.patch
queue-4.9/igb-reset-the-phy-before-reading-the-phy-id.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
queue-4.9/arm-omap2-fix-init-for-multiple-quirks-for-the-same-soc.patch
queue-4.9/scsi-ufs-qcom-fix-module-autoload.patch
queue-4.9/arm-dts-fix-am335x-and-dm814x-scm-syscon-to-probe-children.patch
This is a note to let you know that I've just added the patch titled
power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a time
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Wed, 14 Dec 2016 17:38:51 +0100
Subject: power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a time
From: Hans de Goede <hdegoede(a)redhat.com>
[ Upstream commit 4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258 ]
In order for the MSB -> LSB latching to work correctly we must read the
2 8 bit registers of a 15 bit value in one consecutive read.
This fixes charge_full reporting 3498768 on some reads and 3354624 one
other reads on my tablet (for the 3354624 value the raw LSB is 0x00).
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
Signed-off-by: Sebastian Reichel <sre(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/power/supply/axp288_fuel_gauge.c | 63 ++++++++++++++++---------------
1 file changed, 34 insertions(+), 29 deletions(-)
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -29,6 +29,7 @@
#include <linux/iio/consumer.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
+#include <asm/unaligned.h>
#define CHRG_STAT_BAT_SAFE_MODE (1 << 3)
#define CHRG_STAT_BAT_VALID (1 << 4)
@@ -73,17 +74,15 @@
#define FG_CNTL_CC_EN (1 << 6)
#define FG_CNTL_GAUGE_EN (1 << 7)
+#define FG_15BIT_WORD_VALID (1 << 15)
+#define FG_15BIT_VAL_MASK 0x7fff
+
#define FG_REP_CAP_VALID (1 << 7)
#define FG_REP_CAP_VAL_MASK 0x7F
#define FG_DES_CAP1_VALID (1 << 7)
-#define FG_DES_CAP1_VAL_MASK 0x7F
-#define FG_DES_CAP0_VAL_MASK 0xFF
#define FG_DES_CAP_RES_LSB 1456 /* 1.456mAhr */
-#define FG_CC_MTR1_VALID (1 << 7)
-#define FG_CC_MTR1_VAL_MASK 0x7F
-#define FG_CC_MTR0_VAL_MASK 0xFF
#define FG_DES_CC_RES_LSB 1456 /* 1.456mAhr */
#define FG_OCV_CAP_VALID (1 << 7)
@@ -189,6 +188,28 @@ static int fuel_gauge_reg_writeb(struct
return ret;
}
+static int fuel_gauge_read_15bit_word(struct axp288_fg_info *info, int reg)
+{
+ unsigned char buf[2];
+ int ret;
+
+ ret = regmap_bulk_read(info->regmap, reg, buf, 2);
+ if (ret < 0) {
+ dev_err(&info->pdev->dev, "Error reading reg 0x%02x err: %d\n",
+ reg, ret);
+ return ret;
+ }
+
+ ret = get_unaligned_be16(buf);
+ if (!(ret & FG_15BIT_WORD_VALID)) {
+ dev_err(&info->pdev->dev, "Error reg 0x%02x contents not valid\n",
+ reg);
+ return -ENXIO;
+ }
+
+ return ret & FG_15BIT_VAL_MASK;
+}
+
static int pmic_read_adc_val(const char *name, int *raw_val,
struct axp288_fg_info *info)
{
@@ -255,18 +276,12 @@ static int fuel_gauge_debug_show(struct
seq_printf(s, " FG_OCVL[%02x] : %02x\n",
AXP288_FG_OCVL_REG,
fuel_gauge_reg_readb(info, AXP288_FG_OCVL_REG));
- seq_printf(s, "FG_DES_CAP1[%02x] : %02x\n",
+ seq_printf(s, " FG_DES_CAP[%02x] : %04x\n",
AXP288_FG_DES_CAP1_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_DES_CAP1_REG));
- seq_printf(s, "FG_DES_CAP0[%02x] : %02x\n",
- AXP288_FG_DES_CAP0_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_DES_CAP0_REG));
- seq_printf(s, " FG_CC_MTR1[%02x] : %02x\n",
+ fuel_gauge_read_15bit_word(info, AXP288_FG_DES_CAP1_REG));
+ seq_printf(s, " FG_CC_MTR[%02x] : %04x\n",
AXP288_FG_CC_MTR1_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_CC_MTR1_REG));
- seq_printf(s, " FG_CC_MTR0[%02x] : %02x\n",
- AXP288_FG_CC_MTR0_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_CC_MTR0_REG));
+ fuel_gauge_read_15bit_word(info, AXP288_FG_CC_MTR1_REG));
seq_printf(s, " FG_OCV_CAP[%02x] : %02x\n",
AXP288_FG_OCV_CAP_REG,
fuel_gauge_reg_readb(info, AXP288_FG_OCV_CAP_REG));
@@ -663,28 +678,18 @@ static int fuel_gauge_get_property(struc
val->intval = POWER_SUPPLY_TECHNOLOGY_LION;
break;
case POWER_SUPPLY_PROP_CHARGE_NOW:
- ret = fuel_gauge_reg_readb(info, AXP288_FG_CC_MTR1_REG);
+ ret = fuel_gauge_read_15bit_word(info, AXP288_FG_CC_MTR1_REG);
if (ret < 0)
goto fuel_gauge_read_err;
- value = (ret & FG_CC_MTR1_VAL_MASK) << 8;
- ret = fuel_gauge_reg_readb(info, AXP288_FG_CC_MTR0_REG);
- if (ret < 0)
- goto fuel_gauge_read_err;
- value |= (ret & FG_CC_MTR0_VAL_MASK);
- val->intval = value * FG_DES_CAP_RES_LSB;
+ val->intval = ret * FG_DES_CAP_RES_LSB;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL:
- ret = fuel_gauge_reg_readb(info, AXP288_FG_DES_CAP1_REG);
+ ret = fuel_gauge_read_15bit_word(info, AXP288_FG_DES_CAP1_REG);
if (ret < 0)
goto fuel_gauge_read_err;
- value = (ret & FG_DES_CAP1_VAL_MASK) << 8;
- ret = fuel_gauge_reg_readb(info, AXP288_FG_DES_CAP0_REG);
- if (ret < 0)
- goto fuel_gauge_read_err;
- value |= (ret & FG_DES_CAP0_VAL_MASK);
- val->intval = value * FG_DES_CAP_RES_LSB;
+ val->intval = ret * FG_DES_CAP_RES_LSB;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
val->intval = PROP_CURR(info->pdata->design_cap);
Patches currently in stable-queue which might be from hdegoede(a)redhat.com are
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
This is a note to let you know that I've just added the patch titled
power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Wed, 14 Dec 2016 17:38:52 +0100
Subject: power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time
From: Hans de Goede <hdegoede(a)redhat.com>
[ Upstream commit 248efcf00602f0282587999bcc221a872bd72530 ]
In order for the MSB -> LSB latching to work correctly we must read the
2 8 bit registers of a 12 bit value in one consecutive read.
This fixes voltage_ocv reporting inconsistent values on my tablet.
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
Signed-off-by: Sebastian Reichel <sre(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/power/supply/axp288_fuel_gauge.c | 40 +++++++++++++++++--------------
1 file changed, 22 insertions(+), 18 deletions(-)
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -210,6 +210,22 @@ static int fuel_gauge_read_15bit_word(st
return ret & FG_15BIT_VAL_MASK;
}
+static int fuel_gauge_read_12bit_word(struct axp288_fg_info *info, int reg)
+{
+ unsigned char buf[2];
+ int ret;
+
+ ret = regmap_bulk_read(info->regmap, reg, buf, 2);
+ if (ret < 0) {
+ dev_err(&info->pdev->dev, "Error reading reg 0x%02x err: %d\n",
+ reg, ret);
+ return ret;
+ }
+
+ /* 12-bit data values have upper 8 bits in buf[0], lower 4 in buf[1] */
+ return (buf[0] << 4) | ((buf[1] >> 4) & 0x0f);
+}
+
static int pmic_read_adc_val(const char *name, int *raw_val,
struct axp288_fg_info *info)
{
@@ -270,12 +286,9 @@ static int fuel_gauge_debug_show(struct
seq_printf(s, " FG_RDC0[%02x] : %02x\n",
AXP288_FG_RDC0_REG,
fuel_gauge_reg_readb(info, AXP288_FG_RDC0_REG));
- seq_printf(s, " FG_OCVH[%02x] : %02x\n",
+ seq_printf(s, " FG_OCV[%02x] : %04x\n",
AXP288_FG_OCVH_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_OCVH_REG));
- seq_printf(s, " FG_OCVL[%02x] : %02x\n",
- AXP288_FG_OCVL_REG,
- fuel_gauge_reg_readb(info, AXP288_FG_OCVL_REG));
+ fuel_gauge_read_12bit_word(info, AXP288_FG_OCVH_REG));
seq_printf(s, " FG_DES_CAP[%02x] : %04x\n",
AXP288_FG_DES_CAP1_REG,
fuel_gauge_read_15bit_word(info, AXP288_FG_DES_CAP1_REG));
@@ -532,21 +545,12 @@ temp_read_fail:
static int fuel_gauge_get_vocv(struct axp288_fg_info *info, int *vocv)
{
- int ret, value;
-
- /* 12-bit data value, upper 8 in OCVH, lower 4 in OCVL */
- ret = fuel_gauge_reg_readb(info, AXP288_FG_OCVH_REG);
- if (ret < 0)
- goto vocv_read_fail;
- value = ret << 4;
+ int ret;
- ret = fuel_gauge_reg_readb(info, AXP288_FG_OCVL_REG);
- if (ret < 0)
- goto vocv_read_fail;
- value |= (ret & 0xf);
+ ret = fuel_gauge_read_12bit_word(info, AXP288_FG_OCVH_REG);
+ if (ret >= 0)
+ *vocv = VOLTAGE_FROM_ADC(ret);
- *vocv = VOLTAGE_FROM_ADC(value);
-vocv_read_fail:
return ret;
}
Patches currently in stable-queue which might be from hdegoede(a)redhat.com are
queue-4.9/power-supply-axp288_fuel_gauge-read-15-bit-values-2-registers-at-a-time.patch
queue-4.9/power-supply-axp288_fuel_gauge-read-12-bit-values-2-registers-at-a-time.patch
This is a note to let you know that I've just added the patch titled
MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Paul Burton <paul.burton(a)imgtec.com>
Date: Mon, 7 Nov 2016 11:30:41 +0000
Subject: MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds
From: Paul Burton <paul.burton(a)imgtec.com>
[ Upstream commit 9799270affc53414da96e77e454a5616b39cdab0 ]
Code in arch/mips/netlogic/common/irq.c which handles the XLP PIC fails
to build in XLR configurations due to cpu_is_xlp9xx not being defined,
leading to the following build failure:
arch/mips/netlogic/common/irq.c: In function ‘xlp_of_pic_init’:
arch/mips/netlogic/common/irq.c:298:2: error: implicit declaration
of function ‘cpu_is_xlp9xx’ [-Werror=implicit-function-declaration]
if (cpu_is_xlp9xx()) {
^
Although the code was conditional upon CONFIG_OF which is indirectly
selected by CONFIG_NLM_XLP_BOARD but not CONFIG_NLM_XLR_BOARD, the
failing XLR with CONFIG_OF configuration can be configured manually or
by randconfig.
Fix the build failure by making the affected XLP PIC code conditional
upon CONFIG_CPU_XLP which is used to guard the inclusion of
asm/netlogic/xlp-hal/xlp.h that provides the required cpu_is_xlp9xx
function.
[ralf(a)linux-mips.org: Fixed up as per Jayachandran's suggestion.]
Signed-off-by: Paul Burton <paul.burton(a)imgtec.com>
Cc: Jayachandran C <jchandra(a)broadcom.com>
Cc: linux-mips(a)linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14524/
Signed-off-by: Ralf Baechle <ralf(a)linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/mips/netlogic/common/irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/mips/netlogic/common/irq.c
+++ b/arch/mips/netlogic/common/irq.c
@@ -275,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
do_IRQ(nlm_irq_to_xirq(node, i));
}
-#ifdef CONFIG_OF
+#ifdef CONFIG_CPU_XLP
static const struct irq_domain_ops xlp_pic_irq_domain_ops = {
.xlate = irq_domain_xlate_onetwocell,
};
@@ -348,7 +348,7 @@ void __init arch_init_irq(void)
#if defined(CONFIG_CPU_XLR)
nlm_setup_fmn_irq();
#endif
-#if defined(CONFIG_OF)
+#ifdef CONFIG_CPU_XLP
of_irq_init(xlp_pic_irq_ids);
#endif
}
Patches currently in stable-queue which might be from paul.burton(a)imgtec.com are
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
This is a note to let you know that I've just added the patch titled
MIPS: traps: Ensure L1 & L2 ECC checking match for CM3 systems
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Paul Burton <paul.burton(a)imgtec.com>
Date: Mon, 17 Oct 2016 16:01:07 +0100
Subject: MIPS: traps: Ensure L1 & L2 ECC checking match for CM3 systems
From: Paul Burton <paul.burton(a)imgtec.com>
[ Upstream commit 35e6de38858f59b6b65dcfeaf700b5d06fc2b93d ]
On systems with CM3, we must ensure that the L1 & L2 ECC enables are set
to the same value. This is presumed by the hardware & cache corruption
can occur when it is not the case. Support enabling & disabling the L2
ECC checking on CM3 systems where this is controlled via a GCR, and
ensure that it matches the state of L1 ECC checking. Remove I6400 from
the switch statement it will no longer hit, and which was incorrect
since the L2 ECC enable bit isn't in the CP0 ErrCtl register.
Signed-off-by: Paul Burton <paul.burton(a)imgtec.com>
Cc: linux-mips(a)linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14413/
Signed-off-by: Ralf Baechle <ralf(a)linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/mips/include/asm/mips-cm.h | 7 ++++
arch/mips/kernel/traps.c | 63 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 67 insertions(+), 3 deletions(-)
--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -187,6 +187,7 @@ BUILD_CM_R_(config, MIPS_CM_GCB_OFS + 0
BUILD_CM_RW(base, MIPS_CM_GCB_OFS + 0x08)
BUILD_CM_RW(access, MIPS_CM_GCB_OFS + 0x20)
BUILD_CM_R_(rev, MIPS_CM_GCB_OFS + 0x30)
+BUILD_CM_RW(err_control, MIPS_CM_GCB_OFS + 0x38)
BUILD_CM_RW(error_mask, MIPS_CM_GCB_OFS + 0x40)
BUILD_CM_RW(error_cause, MIPS_CM_GCB_OFS + 0x48)
BUILD_CM_RW(error_addr, MIPS_CM_GCB_OFS + 0x50)
@@ -266,6 +267,12 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80)
#define CM_REV_CM2_5 CM_ENCODE_REV(7, 0)
#define CM_REV_CM3 CM_ENCODE_REV(8, 0)
+/* GCR_ERR_CONTROL register fields */
+#define CM_GCR_ERR_CONTROL_L2_ECC_EN_SHF 1
+#define CM_GCR_ERR_CONTROL_L2_ECC_EN_MSK (_ULCAST_(0x1) << 1)
+#define CM_GCR_ERR_CONTROL_L2_ECC_SUPPORT_SHF 0
+#define CM_GCR_ERR_CONTROL_L2_ECC_SUPPORT_MSK (_ULCAST_(0x1) << 0)
+
/* GCR_ERROR_CAUSE register fields */
#define CM_GCR_ERROR_CAUSE_ERRTYPE_SHF 27
#define CM_GCR_ERROR_CAUSE_ERRTYPE_MSK (_ULCAST_(0x1f) << 27)
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -51,6 +51,7 @@
#include <asm/idle.h>
#include <asm/mips-cm.h>
#include <asm/mips-r2-to-r6-emul.h>
+#include <asm/mips-cm.h>
#include <asm/mipsregs.h>
#include <asm/mipsmtregs.h>
#include <asm/module.h>
@@ -1646,6 +1647,65 @@ __setup("nol2par", nol2parity);
*/
static inline void parity_protection_init(void)
{
+#define ERRCTL_PE 0x80000000
+#define ERRCTL_L2P 0x00800000
+
+ if (mips_cm_revision() >= CM_REV_CM3) {
+ ulong gcr_ectl, cp0_ectl;
+
+ /*
+ * With CM3 systems we need to ensure that the L1 & L2
+ * parity enables are set to the same value, since this
+ * is presumed by the hardware engineers.
+ *
+ * If the user disabled either of L1 or L2 ECC checking,
+ * disable both.
+ */
+ l1parity &= l2parity;
+ l2parity &= l1parity;
+
+ /* Probe L1 ECC support */
+ cp0_ectl = read_c0_ecc();
+ write_c0_ecc(cp0_ectl | ERRCTL_PE);
+ back_to_back_c0_hazard();
+ cp0_ectl = read_c0_ecc();
+
+ /* Probe L2 ECC support */
+ gcr_ectl = read_gcr_err_control();
+
+ if (!(gcr_ectl & CM_GCR_ERR_CONTROL_L2_ECC_SUPPORT_MSK) ||
+ !(cp0_ectl & ERRCTL_PE)) {
+ /*
+ * One of L1 or L2 ECC checking isn't supported,
+ * so we cannot enable either.
+ */
+ l1parity = l2parity = 0;
+ }
+
+ /* Configure L1 ECC checking */
+ if (l1parity)
+ cp0_ectl |= ERRCTL_PE;
+ else
+ cp0_ectl &= ~ERRCTL_PE;
+ write_c0_ecc(cp0_ectl);
+ back_to_back_c0_hazard();
+ WARN_ON(!!(read_c0_ecc() & ERRCTL_PE) != l1parity);
+
+ /* Configure L2 ECC checking */
+ if (l2parity)
+ gcr_ectl |= CM_GCR_ERR_CONTROL_L2_ECC_EN_MSK;
+ else
+ gcr_ectl &= ~CM_GCR_ERR_CONTROL_L2_ECC_EN_MSK;
+ write_gcr_err_control(gcr_ectl);
+ gcr_ectl = read_gcr_err_control();
+ gcr_ectl &= CM_GCR_ERR_CONTROL_L2_ECC_EN_MSK;
+ WARN_ON(!!gcr_ectl != l2parity);
+
+ pr_info("Cache parity protection %sabled\n",
+ l1parity ? "en" : "dis");
+ return;
+ }
+
switch (current_cpu_type()) {
case CPU_24K:
case CPU_34K:
@@ -1656,11 +1716,8 @@ static inline void parity_protection_ini
case CPU_PROAPTIV:
case CPU_P5600:
case CPU_QEMU_GENERIC:
- case CPU_I6400:
case CPU_P6600:
{
-#define ERRCTL_PE 0x80000000
-#define ERRCTL_L2P 0x00800000
unsigned long errctl;
unsigned int l1parity_present, l2parity_present;
Patches currently in stable-queue which might be from paul.burton(a)imgtec.com are
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
This is a note to let you know that I've just added the patch titled
MIPS: init: Ensure reserved memory regions are not added to bootmem
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
Date: Wed, 23 Nov 2016 14:43:44 +0100
Subject: MIPS: init: Ensure reserved memory regions are not added to bootmem
From: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
[ Upstream commit e89ef66d7682f031f026eee6bba03c8c2248d2a9 ]
Memories managed through boot_mem_map are generally expected to define
non-crossing areas. However, if part of a larger memory block is marked
as reserved, it would still be added to bootmem allocator as an
available block and could end up being overwritten by the allocator.
Prevent this by explicitly marking the memory as reserved it if exists
in the range used by bootmem allocator.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
Cc: linux-mips(a)linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14608/
Signed-off-by: Ralf Baechle <ralf(a)linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/mips/kernel/setup.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -551,6 +551,10 @@ static void __init bootmem_init(void)
continue;
default:
/* Not usable memory */
+ if (start > min_low_pfn && end < max_low_pfn)
+ reserve_bootmem(boot_mem_map.map[i].addr,
+ boot_mem_map.map[i].size,
+ BOOTMEM_DEFAULT);
continue;
}
Patches currently in stable-queue which might be from marcin.nowakowski(a)imgtec.com are
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
This is a note to let you know that I've just added the patch titled
MIPS: init: Ensure bootmem does not corrupt reserved memory
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
Date: Wed, 23 Nov 2016 14:43:45 +0100
Subject: MIPS: init: Ensure bootmem does not corrupt reserved memory
From: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
[ Upstream commit d9b5b658210f28ed9f70c757d553e679d76e2986 ]
Current init code initialises bootmem allocator with all of the low
memory that it assumes is available, but does not check for reserved
memory block, which can lead to corruption of data that may be stored
there.
Move bootmem's allocation map to a location that does not cross any
reserved regions
Signed-off-by: Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
Cc: linux-mips(a)linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14609/
Signed-off-by: Ralf Baechle <ralf(a)linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/mips/kernel/setup.c | 74 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 3 deletions(-)
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -153,6 +153,35 @@ void __init detect_memory_region(phys_ad
add_memory_region(start, size, BOOT_MEM_RAM);
}
+bool __init memory_region_available(phys_addr_t start, phys_addr_t size)
+{
+ int i;
+ bool in_ram = false, free = true;
+
+ for (i = 0; i < boot_mem_map.nr_map; i++) {
+ phys_addr_t start_, end_;
+
+ start_ = boot_mem_map.map[i].addr;
+ end_ = boot_mem_map.map[i].addr + boot_mem_map.map[i].size;
+
+ switch (boot_mem_map.map[i].type) {
+ case BOOT_MEM_RAM:
+ if (start >= start_ && start + size <= end_)
+ in_ram = true;
+ break;
+ case BOOT_MEM_RESERVED:
+ if ((start >= start_ && start < end_) ||
+ (start < start_ && start + size >= start_))
+ free = false;
+ break;
+ default:
+ continue;
+ }
+ }
+
+ return in_ram && free;
+}
+
static void __init print_memory_map(void)
{
int i;
@@ -332,11 +361,19 @@ static void __init bootmem_init(void)
#else /* !CONFIG_SGI_IP27 */
+static unsigned long __init bootmap_bytes(unsigned long pages)
+{
+ unsigned long bytes = DIV_ROUND_UP(pages, 8);
+
+ return ALIGN(bytes, sizeof(long));
+}
+
static void __init bootmem_init(void)
{
unsigned long reserved_end;
unsigned long mapstart = ~0UL;
unsigned long bootmap_size;
+ bool bootmap_valid = false;
int i;
/*
@@ -430,11 +467,42 @@ static void __init bootmem_init(void)
#endif
/*
- * Initialize the boot-time allocator with low memory only.
+ * check that mapstart doesn't overlap with any of
+ * memory regions that have been reserved through eg. DTB
*/
- bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
- min_low_pfn, max_low_pfn);
+ bootmap_size = bootmap_bytes(max_low_pfn - min_low_pfn);
+
+ bootmap_valid = memory_region_available(PFN_PHYS(mapstart),
+ bootmap_size);
+ for (i = 0; i < boot_mem_map.nr_map && !bootmap_valid; i++) {
+ unsigned long mapstart_addr;
+
+ switch (boot_mem_map.map[i].type) {
+ case BOOT_MEM_RESERVED:
+ mapstart_addr = PFN_ALIGN(boot_mem_map.map[i].addr +
+ boot_mem_map.map[i].size);
+ if (PHYS_PFN(mapstart_addr) < mapstart)
+ break;
+
+ bootmap_valid = memory_region_available(mapstart_addr,
+ bootmap_size);
+ if (bootmap_valid)
+ mapstart = PHYS_PFN(mapstart_addr);
+ break;
+ default:
+ break;
+ }
+ }
+ if (!bootmap_valid)
+ panic("No memory area to place a bootmap bitmap");
+
+ /*
+ * Initialize the boot-time allocator with low memory only.
+ */
+ if (bootmap_size != init_bootmem_node(NODE_DATA(0), mapstart,
+ min_low_pfn, max_low_pfn))
+ panic("Unexpected memory size required for bootmap");
for (i = 0; i < boot_mem_map.nr_map; i++) {
unsigned long start, end;
Patches currently in stable-queue which might be from marcin.nowakowski(a)imgtec.com are
queue-4.9/mips-init-ensure-bootmem-does-not-corrupt-reserved-memory.patch
queue-4.9/mips-init-ensure-reserved-memory-regions-are-not-added-to-bootmem.patch
This is a note to let you know that I've just added the patch titled
MIPS: End asm function prologue macros with .insn
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mips-end-asm-function-prologue-macros-with-.insn.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Paul Burton <paul.burton(a)imgtec.com>
Date: Mon, 7 Nov 2016 11:14:09 +0000
Subject: MIPS: End asm function prologue macros with .insn
From: Paul Burton <paul.burton(a)imgtec.com>
[ Upstream commit 08889582b8aa0bbc01a1e5a0033b9f98d2e11caa ]
When building a kernel targeting a microMIPS ISA, recent GNU linkers
will fail the link if they cannot determine that the target of a branch
or jump is microMIPS code, with errors such as the following:
mips-img-linux-gnu-ld: arch/mips/built-in.o: .text+0x542c:
Unsupported jump between ISA modes; consider recompiling with
interlinking enabled.
mips-img-linux-gnu-ld: final link failed: Bad value
or:
./arch/mips/include/asm/uaccess.h:1017: warning: JALX to a
non-word-aligned address
Placing anything other than an instruction at the start of a function
written in assembly appears to trigger such errors. In order to prepare
for allowing us to follow function prologue macros with an EXPORT_SYMBOL
invocation, end the prologue macros (LEAD, NESTED & FEXPORT) with a
.insn directive. This ensures that the start of the function is marked
as code, which always makes sense for functions & safely prevents us
from hitting the link errors described above.
Signed-off-by: Paul Burton <paul.burton(a)imgtec.com>
Reviewed-by: Maciej W. Rozycki <macro(a)imgtec.com>
Cc: linux-mips(a)linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14508/
Signed-off-by: Ralf Baechle <ralf(a)linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/mips/include/asm/asm.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -54,7 +54,8 @@
.align 2; \
.type symbol, @function; \
.ent symbol, 0; \
-symbol: .frame sp, 0, ra
+symbol: .frame sp, 0, ra; \
+ .insn
/*
* NESTED - declare nested routine entry point
@@ -63,8 +64,9 @@ symbol: .frame sp, 0, ra
.globl symbol; \
.align 2; \
.type symbol, @function; \
- .ent symbol, 0; \
-symbol: .frame sp, framesize, rpc
+ .ent symbol, 0; \
+symbol: .frame sp, framesize, rpc; \
+ .insn
/*
* END - mark end of function
@@ -86,7 +88,7 @@ symbol:
#define FEXPORT(symbol) \
.globl symbol; \
.type symbol, @function; \
-symbol:
+symbol: .insn
/*
* ABS - export absolute symbol
Patches currently in stable-queue which might be from paul.burton(a)imgtec.com are
queue-4.9/mips-netlogic-exclude-netlogic-xlp-pic-code-from-xlr-builds.patch
queue-4.9/mips-traps-ensure-l1-l2-ecc-checking-match-for-cm3-systems.patch
queue-4.9/mips-end-asm-function-prologue-macros-with-.insn.patch
This is a note to let you know that I've just added the patch titled
ixgbe: handle close/suspend race with netif_device_detach/present
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
Date: Fri, 11 Nov 2016 10:07:47 -0800
Subject: ixgbe: handle close/suspend race with netif_device_detach/present
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
[ Upstream commit f7f37e7ff2b9b7eff7fbd035569cab35896869a3 ]
When an interface is part of a namespace it is possible that
ixgbe_close() may be called while __ixgbe_shutdown() is running
which ends up in a double free WARN and/or a BUG in free_msi_irqs().
To handle this situation we extend the rtnl_lock() to protect the
call to netif_device_detach() and ixgbe_clear_interrupt_scheme()
in __ixgbe_shutdown() and check for netif_device_present()
to avoid clearing the interrupts second time in ixgbe_close();
Also extend the rtnl lock in ixgbe_resume() to netif_device_attach().
Signed-off-by: Emil Tantilov <emil.s.tantilov(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6194,7 +6194,8 @@ int ixgbe_close(struct net_device *netde
ixgbe_ptp_stop(adapter);
- ixgbe_close_suspend(adapter);
+ if (netif_device_present(netdev))
+ ixgbe_close_suspend(adapter);
ixgbe_fdir_filter_exit(adapter);
@@ -6239,14 +6240,12 @@ static int ixgbe_resume(struct pci_dev *
if (!err && netif_running(netdev))
err = ixgbe_open(netdev);
- rtnl_unlock();
- if (err)
- return err;
-
- netif_device_attach(netdev);
+ if (!err)
+ netif_device_attach(netdev);
+ rtnl_unlock();
- return 0;
+ return err;
}
#endif /* CONFIG_PM */
@@ -6261,14 +6260,14 @@ static int __ixgbe_shutdown(struct pci_d
int retval = 0;
#endif
+ rtnl_lock();
netif_device_detach(netdev);
- rtnl_lock();
if (netif_running(netdev))
ixgbe_close_suspend(adapter);
- rtnl_unlock();
ixgbe_clear_interrupt_scheme(adapter);
+ rtnl_unlock();
#ifdef CONFIG_PM
retval = pci_save_state(pdev);
Patches currently in stable-queue which might be from emil.s.tantilov(a)intel.com are
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
This is a note to let you know that I've just added the patch titled
ixgbe: Reduce I2C retry count on X550 devices
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Date: Thu, 10 Nov 2016 09:57:29 -0800
Subject: ixgbe: Reduce I2C retry count on X550 devices
From: Tony Nguyen <anthony.l.nguyen(a)intel.com>
[ Upstream commit 3f0d646b720d541309b11e190db58086f446f41e ]
A retry count of 10 is likely to run into problems on X550 devices that
have to detect and reset unresponsive CS4227 devices. So, reduce the I2C
retry count to 3 for X550 and above. This should avoid any possible
regressions in existing devices.
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -113,7 +113,7 @@ static s32 ixgbe_read_i2c_combined_gener
u16 reg, u16 *val, bool lock)
{
u32 swfw_mask = hw->phy.phy_semaphore_mask;
- int max_retry = 10;
+ int max_retry = 3;
int retry = 0;
u8 csum_byte;
u8 high_bits;
@@ -1764,6 +1764,8 @@ static s32 ixgbe_read_i2c_byte_generic_i
u32 swfw_mask = hw->phy.phy_semaphore_mask;
bool nack = true;
+ if (hw->mac.type >= ixgbe_mac_X550)
+ max_retry = 3;
if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
max_retry = IXGBE_SFP_DETECT_RETRIES;
Patches currently in stable-queue which might be from anthony.l.nguyen(a)intel.com are
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
This is a note to let you know that I've just added the patch titled
ixgbe: fix AER error handling
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-fix-aer-error-handling.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
Date: Wed, 16 Nov 2016 09:48:02 -0800
Subject: ixgbe: fix AER error handling
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
[ Upstream commit 126db13fa0e6d05c9f94e0125f61e773bd5ab079 ]
Make sure that we free the IRQs in ixgbe_io_error_detected() when
responding to an PCIe AER error and also restore them when the
interface recovers from it.
Previously it was possible to trigger BUG_ON() check in free_msix_irqs()
in the case where we call ixgbe_remove() after a failed recovery from
AER error because the interrupts were not freed.
Signed-off-by: Emil Tantilov <emil.s.tantilov(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -10027,7 +10027,7 @@ skip_bad_vf_detection:
}
if (netif_running(netdev))
- ixgbe_down(adapter);
+ ixgbe_close_suspend(adapter);
if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
pci_disable_device(pdev);
@@ -10097,10 +10097,12 @@ static void ixgbe_io_resume(struct pci_d
}
#endif
+ rtnl_lock();
if (netif_running(netdev))
- ixgbe_up(adapter);
+ ixgbe_open(netdev);
netif_device_attach(netdev);
+ rtnl_unlock();
}
static const struct pci_error_handlers ixgbe_err_handler = {
Patches currently in stable-queue which might be from emil.s.tantilov(a)intel.com are
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
This is a note to let you know that I've just added the patch titled
ixgbe: do not disable FEC from the driver
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-do-not-disable-fec-from-the-driver.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
Date: Wed, 28 Sep 2016 16:01:48 -0700
Subject: ixgbe: do not disable FEC from the driver
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
[ Upstream commit 1fe954b2097bb907b4578e6a74e4c1d23785a601 ]
FEC is configured by the NVM and the driver should not be
overriding it.
Signed-off-by: Emil Tantilov <emil.s.tantilov(a)intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1932,8 +1932,6 @@ static s32 ixgbe_setup_kr_speed_x550em(s
return status;
reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
- reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ |
- IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC);
reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KR |
IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KX);
Patches currently in stable-queue which might be from emil.s.tantilov(a)intel.com are
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
This is a note to let you know that I've just added the patch titled
ixgbe: Fix reporting of 100Mb capability
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-fix-reporting-of-100mb-capability.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Date: Thu, 10 Nov 2016 16:00:33 -0800
Subject: ixgbe: Fix reporting of 100Mb capability
From: Tony Nguyen <anthony.l.nguyen(a)intel.com>
[ Upstream commit f215266470dfe86196a31fe0725a86cea77f9a18 ]
BaseT adapters that are capable of supporting 100Mb are not reporting this
capability. This patch corrects the reporting so that 100Mb is shown as
supported on those adapters.
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -199,7 +199,7 @@ static int ixgbe_get_settings(struct net
if (supported_link & IXGBE_LINK_SPEED_100_FULL)
ecmd->supported |= ixgbe_isbackplane(hw->phy.media_type) ?
SUPPORTED_1000baseKX_Full :
- SUPPORTED_1000baseT_Full;
+ SUPPORTED_100baseT_Full;
/* default advertised speed if phy.autoneg_advertised isn't set */
ecmd->advertising = ecmd->supported;
Patches currently in stable-queue which might be from anthony.l.nguyen(a)intel.com are
queue-4.9/ixgbe-reduce-i2c-retry-count-on-x550-devices.patch
queue-4.9/ixgbe-fix-reporting-of-100mb-capability.patch
This is a note to let you know that I've just added the patch titled
igb: reset the PHY before reading the PHY ID
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
igb-reset-the-phy-before-reading-the-phy-id.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Aaron Sierra <asierra(a)xes-inc.com>
Date: Tue, 29 Nov 2016 10:03:56 -0600
Subject: igb: reset the PHY before reading the PHY ID
From: Aaron Sierra <asierra(a)xes-inc.com>
[ Upstream commit 182785335447957409282ca745aa5bc3968facee ]
Several people have reported firmware leaving the I210/I211 PHY's page
select register set to something other than the default of zero. This
causes the first accesses, PHY_IDx register reads, to access something
else, resulting in device probe failure:
igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
igb: Copyright (c) 2007-2014 Intel Corporation.
igb: probe of 0000:01:00.0 failed with error -2
This problem began for them after a previous patch I submitted was
applied:
commit 2a3cdead8b408351fa1e3079b220fa331480ffbc
Author: Aaron Sierra <asierra(a)xes-inc.com>
Date: Tue Nov 3 12:37:09 2015 -0600
igb: Remove GS40G specific defines/functions
I personally experienced this problem after attempting to PXE boot from
I210 devices using this firmware:
Intel(R) Boot Agent GE v1.5.78
Copyright (C) 1997-2014, Intel Corporation
Resetting the PHY before reading from it, ensures the page select
register is in its default state and doesn't make assumptions about
the PHY's register set before the PHY has been probed.
Cc: Matwey V. Kornilov <matwey(a)sai.msu.ru>
Cc: Chris Arges <carges(a)vectranetworks.com>
Cc: Jochen Henneberg <jh(a)henneberg-systemdesign.com>
Signed-off-by: Aaron Sierra <asierra(a)xes-inc.com>
Tested-by: Matwey V. Kornilov <matwey(a)sai.msu.ru>
Tested-by: Chris J Arges <christopherarges(a)gmail.com>
Tested-by: Aaron Brown <aaron.f.brown(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/igb/e1000_82575.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -245,6 +245,17 @@ static s32 igb_init_phy_params_82575(str
hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
E1000_STATUS_FUNC_SHIFT;
+ /* Make sure the PHY is in a good state. Several people have reported
+ * firmware leaving the PHY's page select register set to something
+ * other than the default of zero, which causes the PHY ID read to
+ * access something other than the intended register.
+ */
+ ret_val = hw->phy.ops.reset(hw);
+ if (ret_val) {
+ hw_dbg("Error resetting the PHY.\n");
+ goto out;
+ }
+
/* Set phy->phy_addr and phy->id. */
igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
ret_val = igb_get_phy_id_82575(hw);
Patches currently in stable-queue which might be from asierra(a)xes-inc.com are
queue-4.9/igb-reset-the-phy-before-reading-the-phy-id.patch
This is a note to let you know that I've just added the patch titled
ixgbe: add mask for 64 RSS queues
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-add-mask-for-64-rss-queues.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
Date: Fri, 4 Nov 2016 14:03:03 -0700
Subject: ixgbe: add mask for 64 RSS queues
From: Emil Tantilov <emil.s.tantilov(a)intel.com>
[ Upstream commit 2bf1a87b903bd81b1448a1cef73de59fb6c4d340 ]
The indirection table was reported incorrectly for X550 and newer
where we can support up to 64 RSS queues.
Reported-by Krishneil Singh <krishneil.k.singh(a)intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -308,6 +308,7 @@ static void ixgbe_cache_ring_register(st
ixgbe_cache_ring_rss(adapter);
}
+#define IXGBE_RSS_64Q_MASK 0x3F
#define IXGBE_RSS_16Q_MASK 0xF
#define IXGBE_RSS_8Q_MASK 0x7
#define IXGBE_RSS_4Q_MASK 0x3
@@ -604,6 +605,7 @@ static bool ixgbe_set_sriov_queues(struc
**/
static bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
{
+ struct ixgbe_hw *hw = &adapter->hw;
struct ixgbe_ring_feature *f;
u16 rss_i;
@@ -612,7 +614,11 @@ static bool ixgbe_set_rss_queues(struct
rss_i = f->limit;
f->indices = rss_i;
- f->mask = IXGBE_RSS_16Q_MASK;
+
+ if (hw->mac.type < ixgbe_mac_X550)
+ f->mask = IXGBE_RSS_16Q_MASK;
+ else
+ f->mask = IXGBE_RSS_64Q_MASK;
/* disable ATR by default, it will be configured below */
adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
Patches currently in stable-queue which might be from emil.s.tantilov(a)intel.com are
queue-4.9/ixgbe-handle-close-suspend-race-with-netif_device_detach-present.patch
queue-4.9/ixgbe-do-not-disable-fec-from-the-driver.patch
queue-4.9/ixgbe-fix-aer-error-handling.patch
queue-4.9/ixgbe-add-mask-for-64-rss-queues.patch
This is a note to let you know that I've just added the patch titled
ixgbe: Configure advertised speeds correctly for KR/KX backplane
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Don Skidmore <donald.c.skidmore(a)intel.com>
Date: Tue, 13 Dec 2016 20:34:51 -0500
Subject: ixgbe: Configure advertised speeds correctly for KR/KX backplane
From: Don Skidmore <donald.c.skidmore(a)intel.com>
[ Upstream commit 54f6d4c42451dbd2cc7e0f0bd8fc3eddcab511fe ]
This patch ensures that the advertised link speeds are configured
for X553 KR/KX backplane. Without this patch the link remains at
1G when resuming from low power after being downshifted by LPLU.
Signed-off-by: Don Skidmore <donald.c.skidmore(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1995,12 +1995,11 @@ static s32 ixgbe_setup_kx4_x550em(struct
/**
* ixgbe_setup_kr_x550em - Configure the KR PHY
* @hw: pointer to hardware structure
- *
- * Configures the integrated KR PHY for X550EM_x.
**/
static s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
{
- if (hw->mac.type != ixgbe_mac_X550EM_x)
+ /* leave link alone for 2.5G */
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_2_5GB_FULL)
return 0;
return ixgbe_setup_kr_speed_x550em(hw, hw->phy.autoneg_advertised);
Patches currently in stable-queue which might be from donald.c.skidmore(a)intel.com are
queue-4.9/ixgbe-configure-advertised-speeds-correctly-for-kr-kx-backplane.patch
This is a note to let you know that I've just added the patch titled
igb: Fix hw_dbg logging in igb_update_flash_i210
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Hannu Lounento <hannu.lounento(a)ge.com>
Date: Mon, 2 Jan 2017 18:26:06 +0100
Subject: igb: Fix hw_dbg logging in igb_update_flash_i210
From: Hannu Lounento <hannu.lounento(a)ge.com>
[ Upstream commit 76ed5a8f47476e4984cc8c0c1bc4cee62650f7fd ]
Fix an if statement with hw_dbg lines where the logic was inverted with
regards to the corresponding return value used in the if statement.
Signed-off-by: Hannu Lounento <hannu.lounento(a)ge.com>
Signed-off-by: Peter Senna Tschudin <peter.senna(a)collabora.com>
Tested-by: Aaron Brown <aaron.f.brown(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/igb/e1000_i210.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
@@ -699,9 +699,9 @@ static s32 igb_update_flash_i210(struct
ret_val = igb_pool_flash_update_done_i210(hw);
if (ret_val)
- hw_dbg("Flash update complete\n");
- else
hw_dbg("Flash update time out\n");
+ else
+ hw_dbg("Flash update complete\n");
out:
return ret_val;
Patches currently in stable-queue which might be from hannu.lounento(a)ge.com are
queue-4.9/igb-fix-hw_dbg-logging-in-igb_update_flash_i210.patch
This is a note to let you know that I've just added the patch titled
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Date: Tue, 3 Jan 2017 17:00:27 +0530
Subject: gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
[ Upstream commit 4b0ea93f250afc6c1128e201b0a8a115ae613e47 ]
Here, pci_iomap can fail, handle this case and return -ENOMEM.
Signed-off-by: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-em…
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_devi
}
mem = pci_iomap(mdev->dev->pdev, 0, 0);
+ if (!mem)
+ return -ENOMEM;
mdev->mc.vram_size = mga_probe_vram(mdev, mem);
Patches currently in stable-queue which might be from arvind.yadav.cs(a)gmail.com are
queue-4.9/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-4.9/media-imon-fix-null-ptr-deref-in-imon_probe.patch
queue-4.9/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
This is a note to let you know that I've just added the patch titled
igb: close/suspend race in netif_device_detach
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
igb-close-suspend-race-in-netif_device_detach.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Todd Fujinaka <todd.fujinaka(a)intel.com>
Date: Tue, 15 Nov 2016 08:54:26 -0800
Subject: igb: close/suspend race in netif_device_detach
From: Todd Fujinaka <todd.fujinaka(a)intel.com>
[ Upstream commit 9474933caf21a4cb5147223dca1551f527aaac36 ]
Similar to ixgbe, when an interface is part of a namespace it is
possible that igb_close() may be called while __igb_shutdown() is
running which ends up in a double free WARN and/or a BUG in
free_msi_irqs().
Extend the rtnl_lock() to protect the call to netif_device_detach() and
igb_clear_interrupt_scheme() in __igb_shutdown() and check for
netif_device_present() to avoid calling igb_clear_interrupt_scheme() a
second time in igb_close().
Also extend the rtnl lock in igb_resume() to netif_device_attach().
Signed-off-by: Todd Fujinaka <todd.fujinaka(a)intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck(a)intel.com>
Tested-by: Aaron Brown <aaron.f.brown(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/igb/igb_main.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3271,7 +3271,9 @@ static int __igb_close(struct net_device
int igb_close(struct net_device *netdev)
{
- return __igb_close(netdev, false);
+ if (netif_device_present(netdev))
+ return __igb_close(netdev, false);
+ return 0;
}
/**
@@ -7548,6 +7550,7 @@ static int __igb_shutdown(struct pci_dev
int retval = 0;
#endif
+ rtnl_lock();
netif_device_detach(netdev);
if (netif_running(netdev))
@@ -7556,6 +7559,7 @@ static int __igb_shutdown(struct pci_dev
igb_ptp_suspend(adapter);
igb_clear_interrupt_scheme(adapter);
+ rtnl_unlock();
#ifdef CONFIG_PM
retval = pci_save_state(pdev);
@@ -7674,16 +7678,15 @@ static int igb_resume(struct device *dev
wr32(E1000_WUS, ~0);
- if (netdev->flags & IFF_UP) {
- rtnl_lock();
+ rtnl_lock();
+ if (!err && netif_running(netdev))
err = __igb_open(netdev, true);
- rtnl_unlock();
- if (err)
- return err;
- }
- netif_device_attach(netdev);
- return 0;
+ if (!err)
+ netif_device_attach(netdev);
+ rtnl_unlock();
+
+ return err;
}
static int igb_runtime_idle(struct device *dev)
Patches currently in stable-queue which might be from todd.fujinaka(a)intel.com are
queue-4.9/igb-close-suspend-race-in-netif_device_detach.patch
This is a note to let you know that I've just added the patch titled
extcon: Remove potential problem when calling extcon_register_notifier()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 11:32:28 CET 2017
From: Chanwoo Choi <cw00.choi(a)samsung.com>
Date: Mon, 19 Dec 2016 21:02:33 +0900
Subject: extcon: Remove potential problem when calling extcon_register_notifier()
From: Chanwoo Choi <cw00.choi(a)samsung.com>
[ Upstream commit 01b4c9a1ae07a25d208cad0da7dd288007a22984 ]
This patch removes the potential problem of extcon_register_notifier()
when edev parameter is NULL. When edev is NULL, this function returns
the first extcon device which includes the sepecific external connector
of second paramter. But, it don't guarantee the same operation in all cases.
To remove this confusion and potential problem, this patch fixes it.
Signed-off-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/extcon/extcon.c | 35 ++++++++---------------------------
1 file changed, 8 insertions(+), 27 deletions(-)
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -906,35 +906,16 @@ int extcon_register_notifier(struct extc
unsigned long flags;
int ret, idx = -EINVAL;
- if (!nb)
+ if (!edev || !nb)
return -EINVAL;
- if (edev) {
- idx = find_cable_index_by_id(edev, id);
- if (idx < 0)
- return idx;
-
- spin_lock_irqsave(&edev->lock, flags);
- ret = raw_notifier_chain_register(&edev->nh[idx], nb);
- spin_unlock_irqrestore(&edev->lock, flags);
- } else {
- struct extcon_dev *extd;
-
- mutex_lock(&extcon_dev_list_lock);
- list_for_each_entry(extd, &extcon_dev_list, entry) {
- idx = find_cable_index_by_id(extd, id);
- if (idx >= 0)
- break;
- }
- mutex_unlock(&extcon_dev_list_lock);
-
- if (idx >= 0) {
- edev = extd;
- return extcon_register_notifier(extd, id, nb);
- } else {
- ret = -ENODEV;
- }
- }
+ idx = find_cable_index_by_id(edev, id);
+ if (idx < 0)
+ return idx;
+
+ spin_lock_irqsave(&edev->lock, flags);
+ ret = raw_notifier_chain_register(&edev->nh[idx], nb);
+ spin_unlock_irqrestore(&edev->lock, flags);
return ret;
}
Patches currently in stable-queue which might be from cw00.choi(a)samsung.com are
queue-4.9/extcon-remove-potential-problem-when-calling-extcon_register_notifier.patch
queue-4.9/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch