mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
c7634180fc
Refreshed all patches. Remove upstreamed: - 023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch - 023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch - 023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch - 950-0252-staging-bcm2835_camera-Ensure-all-buffers-are-return.patch - 950-0253-staging-bcm2835-camera-Remove-check-of-the-number-of.patch - 950-0254-staging-bcm2835-camera-Handle-empty-EOS-buffers-whil.patch - 950-0489-staging-mmal-vchiq-Replace-spinlock-protecting-conte.patch - 0021-ARM-dts-gemini-Fix-up-DNS-313-compatible-string.patch - 049-v4.20-mips-remove-superfluous-check-for-linux.patch - 100-MIPS-fix-build-on-non-linux-hosts.patch - 303-MIPS-Fix-bounds-check-virt_addr_valid.patch - 0002-usb-dwc2-use-a-longer-AHB-idle-timeout-in-dwc2_core_.patch Altered patches: - 950-0267-staging-vc04_services-Split-vchiq-mmal-into-a-module.patch - 700-net-add-qualcomm-mdio-and-phy.patch Fixes: - CVE-2019-3846 New symbol: - AX88796B_PHY Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From e26af2726067ff260b77485df6af8375b82bfb1d Mon Sep 17 00:00:00 2001
|
|
From: Russell King <rmk+kernel@armlinux.org.uk>
|
|
Date: Sat, 23 Dec 2017 12:22:58 +0000
|
|
Subject: [PATCH] sfp: more cotsworks fixes
|
|
|
|
Cotsworks also gets the date code wrong.
|
|
|
|
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
|
---
|
|
drivers/net/phy/sfp.c | 15 ++++++++-------
|
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/net/phy/sfp.c
|
|
+++ b/drivers/net/phy/sfp.c
|
|
@@ -1571,9 +1571,9 @@ static int sfp_sm_mod_probe(struct sfp *
|
|
return -EAGAIN;
|
|
}
|
|
|
|
- /* Cotsworks do not seem to update the checksums when they
|
|
- * do the final programming with the final module part number,
|
|
- * serial number and date code.
|
|
+ /* Cotsworks do not seem to update the checksums when they update the
|
|
+ * module part number, serial number and date code. They also format
|
|
+ * the date code incorrectly.
|
|
*/
|
|
cotsworks = !memcmp(id.base.vendor_name, "COTSWORKS ", 16);
|
|
|
|
@@ -1612,11 +1612,12 @@ static int sfp_sm_mod_probe(struct sfp *
|
|
|
|
sfp->id = id;
|
|
|
|
- date[0] = sfp->id.ext.datecode[4];
|
|
- date[1] = sfp->id.ext.datecode[5];
|
|
+ /* Cotsworks also gets the date code wrong. */
|
|
+ date[0] = sfp->id.ext.datecode[4 - 2 * cotsworks];
|
|
+ date[1] = sfp->id.ext.datecode[5 - 2 * cotsworks];
|
|
date[2] = '-';
|
|
- date[3] = sfp->id.ext.datecode[2];
|
|
- date[4] = sfp->id.ext.datecode[3];
|
|
+ date[3] = sfp->id.ext.datecode[2 + 2 * cotsworks];
|
|
+ date[4] = sfp->id.ext.datecode[3 + 2 * cotsworks];
|
|
date[5] = '-';
|
|
date[6] = sfp->id.ext.datecode[0];
|
|
date[7] = sfp->id.ext.datecode[1];
|