mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 05:38:00 +00:00
Kernel: bump 4.14 to 4.14.29
Right patch version this time, sorry! * Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be adjusted slightly because of upstream adapted code. * Refreshed patches. Compile-tested: ramips/mt7621, x86/64 Run-tested: ramips/mt7621, x86/64 Signed-off-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
4a788fcf63
commit
41a881a8d9
@ -5,12 +5,12 @@ LINUX_RELEASE?=1
|
|||||||
LINUX_VERSION-3.18 = .71
|
LINUX_VERSION-3.18 = .71
|
||||||
LINUX_VERSION-4.4 = .121
|
LINUX_VERSION-4.4 = .121
|
||||||
LINUX_VERSION-4.9 = .87
|
LINUX_VERSION-4.9 = .87
|
||||||
LINUX_VERSION-4.14 = .27
|
LINUX_VERSION-4.14 = .29
|
||||||
|
|
||||||
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
|
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
|
||||||
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
|
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
|
||||||
LINUX_KERNEL_HASH-4.9.87 = 7ac9f6af69dc5a7e38bf35cc3fa889e3a4b22504a85f57fdc87734a8abe4c917
|
LINUX_KERNEL_HASH-4.9.87 = 7ac9f6af69dc5a7e38bf35cc3fa889e3a4b22504a85f57fdc87734a8abe4c917
|
||||||
LINUX_KERNEL_HASH-4.14.27 = 0911a449c71a06c7232ece07dfcc041bd07efaf7e67799b9e2d0cf4bd9a028ea
|
LINUX_KERNEL_HASH-4.14.29 = 18f67b70ce9922c7ef95791bfd91f46e52ee9eb3e310978bb6ef6d2e93c14619
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||||
|
@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
|||||||
|
|
||||||
#include "xhci.h"
|
#include "xhci.h"
|
||||||
#include "xhci-trace.h"
|
#include "xhci-trace.h"
|
||||||
@@ -238,6 +240,458 @@ static void xhci_pme_acpi_rtd3_enable(st
|
@@ -241,6 +243,458 @@ static void xhci_pme_acpi_rtd3_enable(st
|
||||||
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
|
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
|
||||||
#endif /* CONFIG_ACPI */
|
#endif /* CONFIG_ACPI */
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
|||||||
/* called during probe() after chip reset completes */
|
/* called during probe() after chip reset completes */
|
||||||
static int xhci_pci_setup(struct usb_hcd *hcd)
|
static int xhci_pci_setup(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
@@ -273,6 +727,22 @@ static int xhci_pci_probe(struct pci_dev
|
@@ -276,6 +730,22 @@ static int xhci_pci_probe(struct pci_dev
|
||||||
struct hc_driver *driver;
|
struct hc_driver *driver;
|
||||||
struct usb_hcd *hcd;
|
struct usb_hcd *hcd;
|
||||||
|
|
||||||
@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
|||||||
driver = (struct hc_driver *)id->driver_data;
|
driver = (struct hc_driver *)id->driver_data;
|
||||||
|
|
||||||
/* For some HW implementation, a XHCI reset is just not enough... */
|
/* For some HW implementation, a XHCI reset is just not enough... */
|
||||||
@@ -337,6 +807,16 @@ static void xhci_pci_remove(struct pci_d
|
@@ -340,6 +810,16 @@ static void xhci_pci_remove(struct pci_d
|
||||||
{
|
{
|
||||||
struct xhci_hcd *xhci;
|
struct xhci_hcd *xhci;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ produce a noisy warning.
|
|||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
--- a/drivers/usb/host/xhci-pci.c
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
+++ b/drivers/usb/host/xhci-pci.c
|
||||||
@@ -196,7 +196,7 @@ static void xhci_pci_quirks(struct devic
|
@@ -199,7 +199,7 @@ static void xhci_pci_quirks(struct devic
|
||||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
||||||
pdev->device == 0x0015)
|
pdev->device == 0x0015)
|
||||||
@ -44,7 +44,7 @@ produce a noisy warning.
|
|||||||
hcd->msi_enabled = 1;
|
hcd->msi_enabled = 1;
|
||||||
--- a/drivers/usb/host/xhci.h
|
--- a/drivers/usb/host/xhci.h
|
||||||
+++ b/drivers/usb/host/xhci.h
|
+++ b/drivers/usb/host/xhci.h
|
||||||
@@ -1848,6 +1848,7 @@ struct xhci_hcd {
|
@@ -1850,6 +1850,7 @@ struct xhci_hcd {
|
||||||
/* support xHCI 0.96 spec USB2 software LPM */
|
/* support xHCI 0.96 spec USB2 software LPM */
|
||||||
unsigned sw_lpm_support:1;
|
unsigned sw_lpm_support:1;
|
||||||
/* support xHCI 1.0 spec USB2 hardware LPM */
|
/* support xHCI 1.0 spec USB2 hardware LPM */
|
||||||
|
@ -127,11 +127,11 @@ it on BCM4708 family.
|
|||||||
/*
|
/*
|
||||||
--- a/drivers/usb/host/xhci.h
|
--- a/drivers/usb/host/xhci.h
|
||||||
+++ b/drivers/usb/host/xhci.h
|
+++ b/drivers/usb/host/xhci.h
|
||||||
@@ -1830,6 +1830,7 @@ struct xhci_hcd {
|
@@ -1831,6 +1831,7 @@ struct xhci_hcd {
|
||||||
#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
|
#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
|
||||||
/* Reserved. It was XHCI_U2_DISABLE_WAKE */
|
/* Reserved. It was XHCI_U2_DISABLE_WAKE */
|
||||||
#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
|
#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
|
||||||
+#define XHCI_FAKE_DOORBELL (1 << 29)
|
+#define XHCI_FAKE_DOORBELL (1 << 29)
|
||||||
|
#define XHCI_SUSPEND_DELAY (1 << 30)
|
||||||
|
|
||||||
unsigned int num_active_eps;
|
unsigned int num_active_eps;
|
||||||
unsigned int limit_active_eps;
|
|
||||||
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/netfilter/nf_flow_table_core.c
|
--- a/net/netfilter/nf_flow_table_core.c
|
||||||
+++ b/net/netfilter/nf_flow_table_core.c
|
+++ b/net/netfilter/nf_flow_table_core.c
|
||||||
@@ -83,7 +83,7 @@ flow_offload_alloc(struct nf_conn *ct, s
|
@@ -84,7 +84,7 @@ flow_offload_alloc(struct nf_conn *ct, s
|
||||||
|
|
||||||
if (ct->status & IPS_SRC_NAT)
|
if (ct->status & IPS_SRC_NAT)
|
||||||
flow->flags |= FLOW_OFFLOAD_SNAT;
|
flow->flags |= FLOW_OFFLOAD_SNAT;
|
||||||
|
@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
EXPORT_SYMBOL(default_qdisc_ops);
|
EXPORT_SYMBOL(default_qdisc_ops);
|
||||||
|
|
||||||
/* Main transmission queue. */
|
/* Main transmission queue. */
|
||||||
@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str
|
@@ -760,7 +760,7 @@ static void attach_one_default_qdisc(str
|
||||||
void *_unused)
|
void *_unused)
|
||||||
{
|
{
|
||||||
struct Qdisc *qdisc;
|
struct Qdisc *qdisc;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
--- a/drivers/net/phy/phy_device.c
|
--- a/drivers/net/phy/phy_device.c
|
||||||
+++ b/drivers/net/phy/phy_device.c
|
+++ b/drivers/net/phy/phy_device.c
|
||||||
@@ -1437,6 +1437,9 @@ int genphy_update_link(struct phy_device
|
@@ -1451,6 +1451,9 @@ int genphy_update_link(struct phy_device
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+ tristate
|
+ tristate
|
||||||
default n
|
default n
|
||||||
select ANON_INODES
|
select ANON_INODES
|
||||||
help
|
select IRQ_WORK
|
||||||
--- a/drivers/dma-buf/Makefile
|
--- a/drivers/dma-buf/Makefile
|
||||||
+++ b/drivers/dma-buf/Makefile
|
+++ b/drivers/dma-buf/Makefile
|
||||||
@@ -1,3 +1,7 @@
|
@@ -1,3 +1,7 @@
|
||||||
@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
--- a/kernel/sched/core.c
|
--- a/kernel/sched/core.c
|
||||||
+++ b/kernel/sched/core.c
|
+++ b/kernel/sched/core.c
|
||||||
@@ -2146,6 +2146,7 @@ int wake_up_state(struct task_struct *p,
|
@@ -2147,6 +2147,7 @@ int wake_up_state(struct task_struct *p,
|
||||||
{
|
{
|
||||||
return try_to_wake_up(p, state, 0);
|
return try_to_wake_up(p, state, 0);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
#define ATH8035_PHY_ID 0x004dd072
|
#define ATH8035_PHY_ID 0x004dd072
|
||||||
#define AT803X_PHY_ID_MASK 0xffffffef
|
#define AT803X_PHY_ID_MASK 0xffffffef
|
||||||
|
|
||||||
@@ -260,7 +261,8 @@ static int at803x_probe(struct phy_devic
|
@@ -256,7 +257,8 @@ static int at803x_probe(struct phy_devic
|
||||||
if (!priv)
|
if (!priv)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
goto does_not_require_reset_workaround;
|
goto does_not_require_reset_workaround;
|
||||||
|
|
||||||
gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
|
gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
|
||||||
@@ -336,7 +338,7 @@ static void at803x_link_change_notify(st
|
@@ -332,7 +334,7 @@ static void at803x_link_change_notify(st
|
||||||
struct at803x_priv *priv = phydev->priv;
|
struct at803x_priv *priv = phydev->priv;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
* signalled. This is necessary to circumvent a hardware bug that
|
* signalled. This is necessary to circumvent a hardware bug that
|
||||||
* occurs when the cable is unplugged while TX packets are pending
|
* occurs when the cable is unplugged while TX packets are pending
|
||||||
* in the FIFO. In such cases, the FIFO enters an error mode it
|
* in the FIFO. In such cases, the FIFO enters an error mode it
|
||||||
@@ -448,6 +450,24 @@ static struct phy_driver at803x_driver[]
|
@@ -444,6 +446,24 @@ static struct phy_driver at803x_driver[]
|
||||||
.aneg_done = at803x_aneg_done,
|
.aneg_done = at803x_aneg_done,
|
||||||
.ack_interrupt = &at803x_ack_interrupt,
|
.ack_interrupt = &at803x_ack_interrupt,
|
||||||
.config_intr = &at803x_config_intr,
|
.config_intr = &at803x_config_intr,
|
||||||
@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
} };
|
} };
|
||||||
|
|
||||||
module_phy_driver(at803x_driver);
|
module_phy_driver(at803x_driver);
|
||||||
@@ -455,6 +475,7 @@ module_phy_driver(at803x_driver);
|
@@ -451,6 +471,7 @@ module_phy_driver(at803x_driver);
|
||||||
static struct mdio_device_id __maybe_unused atheros_tbl[] = {
|
static struct mdio_device_id __maybe_unused atheros_tbl[] = {
|
||||||
{ ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
|
{ ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
|
||||||
{ ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
|
{ ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
|
||||||
|
@ -85,7 +85,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
* @phydev: the phy_device struct
|
* @phydev: the phy_device struct
|
||||||
--- a/include/linux/phy.h
|
--- a/include/linux/phy.h
|
||||||
+++ b/include/linux/phy.h
|
+++ b/include/linux/phy.h
|
||||||
@@ -905,6 +905,7 @@ void phy_ethtool_ksettings_get(struct ph
|
@@ -906,6 +906,7 @@ void phy_ethtool_ksettings_get(struct ph
|
||||||
struct ethtool_link_ksettings *cmd);
|
struct ethtool_link_ksettings *cmd);
|
||||||
int phy_ethtool_ksettings_set(struct phy_device *phydev,
|
int phy_ethtool_ksettings_set(struct phy_device *phydev,
|
||||||
const struct ethtool_link_ksettings *cmd);
|
const struct ethtool_link_ksettings *cmd);
|
||||||
|
@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct at803x_context {
|
struct at803x_context {
|
||||||
@@ -277,8 +285,16 @@ does_not_require_reset_workaround:
|
@@ -273,8 +281,16 @@ does_not_require_reset_workaround:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = genphy_config_init(phydev);
|
ret = genphy_config_init(phydev);
|
||||||
@@ -299,6 +315,26 @@ static int at803x_config_init(struct phy
|
@@ -295,6 +311,26 @@ static int at803x_config_init(struct phy
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,6 +372,8 @@ static int at803x_config_intr(struct phy
|
@@ -332,6 +368,8 @@ static int at803x_config_intr(struct phy
|
||||||
static void at803x_link_change_notify(struct phy_device *phydev)
|
static void at803x_link_change_notify(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
struct at803x_priv *priv = phydev->priv;
|
struct at803x_priv *priv = phydev->priv;
|
||||||
@ -101,7 +101,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Conduct a hardware reset for AT8030/2 every time a link loss is
|
* Conduct a hardware reset for AT8030/2 every time a link loss is
|
||||||
@@ -364,6 +402,24 @@ static void at803x_link_change_notify(st
|
@@ -360,6 +398,24 @@ static void at803x_link_change_notify(st
|
||||||
} else {
|
} else {
|
||||||
priv->phy_reset = false;
|
priv->phy_reset = false;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Roman Yeryomin <roman@advem.lv>
|
|||||||
#define AT803X_MODE_CFG_MASK 0x0F
|
#define AT803X_MODE_CFG_MASK 0x0F
|
||||||
#define AT803X_MODE_CFG_SGMII 0x01
|
#define AT803X_MODE_CFG_SGMII 0x01
|
||||||
|
|
||||||
@@ -296,6 +300,27 @@ static int at803x_config_init(struct phy
|
@@ -292,6 +296,27 @@ static int at803x_config_init(struct phy
|
||||||
{
|
{
|
||||||
struct at803x_platform_data *pdata;
|
struct at803x_platform_data *pdata;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
|||||||
return -ERANGE;
|
return -ERANGE;
|
||||||
|
|
||||||
oobregion->length = ecc->total;
|
oobregion->length = ecc->total;
|
||||||
@@ -4707,6 +4707,19 @@ int nand_scan_tail(struct mtd_info *mtd)
|
@@ -4712,6 +4712,19 @@ int nand_scan_tail(struct mtd_info *mtd)
|
||||||
mtd_set_ooblayout(mtd, &nand_ooblayout_lp_hamming_ops);
|
mtd_set_ooblayout(mtd, &nand_ooblayout_lp_hamming_ops);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
|||||||
|
|
||||||
--- a/drivers/mtd/nand/nand_base.c
|
--- a/drivers/mtd/nand/nand_base.c
|
||||||
+++ b/drivers/mtd/nand/nand_base.c
|
+++ b/drivers/mtd/nand/nand_base.c
|
||||||
@@ -2989,11 +2989,17 @@ out:
|
@@ -2994,11 +2994,17 @@ out:
|
||||||
static int single_erase(struct mtd_info *mtd, int page)
|
static int single_erase(struct mtd_info *mtd, int page)
|
||||||
{
|
{
|
||||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||||
@ -37,7 +37,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3077,7 +3083,7 @@ int nand_erase_nand(struct mtd_info *mtd
|
@@ -3082,7 +3088,7 @@ int nand_erase_nand(struct mtd_info *mtd
|
||||||
status = chip->erase(mtd, page & chip->pagemask);
|
status = chip->erase(mtd, page & chip->pagemask);
|
||||||
|
|
||||||
/* See if block erase succeeded */
|
/* See if block erase succeeded */
|
||||||
|
@ -60,7 +60,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
break;
|
break;
|
||||||
touch_softlockup_watchdog();
|
touch_softlockup_watchdog();
|
||||||
} while (time_before(jiffies, timeo));
|
} while (time_before(jiffies, timeo));
|
||||||
@@ -1016,7 +1028,15 @@ static void panic_nand_wait(struct mtd_i
|
@@ -1021,7 +1033,15 @@ static void panic_nand_wait(struct mtd_i
|
||||||
if (chip->dev_ready(mtd))
|
if (chip->dev_ready(mtd))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -77,7 +77,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mdelay(1);
|
mdelay(1);
|
||||||
@@ -1033,8 +1053,9 @@ static void panic_nand_wait(struct mtd_i
|
@@ -1038,8 +1058,9 @@ static void panic_nand_wait(struct mtd_i
|
||||||
static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
|
static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Apply this short delay always to ensure that we do wait tWB in any
|
* Apply this short delay always to ensure that we do wait tWB in any
|
||||||
@@ -1042,7 +1063,9 @@ static int nand_wait(struct mtd_info *mt
|
@@ -1047,7 +1068,9 @@ static int nand_wait(struct mtd_info *mt
|
||||||
*/
|
*/
|
||||||
ndelay(100);
|
ndelay(100);
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
if (in_interrupt() || oops_in_progress)
|
if (in_interrupt() || oops_in_progress)
|
||||||
panic_nand_wait(mtd, chip, timeo);
|
panic_nand_wait(mtd, chip, timeo);
|
||||||
@@ -1053,14 +1076,22 @@ static int nand_wait(struct mtd_info *mt
|
@@ -1058,14 +1081,22 @@ static int nand_wait(struct mtd_info *mt
|
||||||
if (chip->dev_ready(mtd))
|
if (chip->dev_ready(mtd))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -124,7 +124,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
/* This can happen if in case of timeout or buggy dev_ready */
|
/* This can happen if in case of timeout or buggy dev_ready */
|
||||||
WARN_ON(!(status & NAND_STATUS_READY));
|
WARN_ON(!(status & NAND_STATUS_READY));
|
||||||
return status;
|
return status;
|
||||||
@@ -1215,6 +1246,516 @@ static void nand_release_data_interface(
|
@@ -1220,6 +1251,516 @@ static void nand_release_data_interface(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -641,7 +641,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
* nand_reset - Reset and initialize a NAND device
|
* nand_reset - Reset and initialize a NAND device
|
||||||
* @chip: The NAND chip
|
* @chip: The NAND chip
|
||||||
* @chipnr: Internal die id
|
* @chipnr: Internal die id
|
||||||
@@ -1235,8 +1776,10 @@ int nand_reset(struct nand_chip *chip, i
|
@@ -1240,8 +1781,10 @@ int nand_reset(struct nand_chip *chip, i
|
||||||
* interface settings, hence this weird ->select_chip() dance.
|
* interface settings, hence this weird ->select_chip() dance.
|
||||||
*/
|
*/
|
||||||
chip->select_chip(mtd, chipnr);
|
chip->select_chip(mtd, chipnr);
|
||||||
@ -653,7 +653,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
chip->select_chip(mtd, chipnr);
|
chip->select_chip(mtd, chipnr);
|
||||||
ret = nand_setup_data_interface(chip, chipnr);
|
ret = nand_setup_data_interface(chip, chipnr);
|
||||||
@@ -1392,9 +1935,19 @@ EXPORT_SYMBOL(nand_check_erased_ecc_chun
|
@@ -1397,9 +1940,19 @@ EXPORT_SYMBOL(nand_check_erased_ecc_chun
|
||||||
int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
uint8_t *buf, int oob_required, int page)
|
uint8_t *buf, int oob_required, int page)
|
||||||
{
|
{
|
||||||
@ -676,7 +676,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nand_read_page_raw);
|
EXPORT_SYMBOL(nand_read_page_raw);
|
||||||
@@ -1416,29 +1969,46 @@ static int nand_read_page_raw_syndrome(s
|
@@ -1421,29 +1974,46 @@ static int nand_read_page_raw_syndrome(s
|
||||||
int eccsize = chip->ecc.size;
|
int eccsize = chip->ecc.size;
|
||||||
int eccbytes = chip->ecc.bytes;
|
int eccbytes = chip->ecc.bytes;
|
||||||
uint8_t *oob = chip->oob_poi;
|
uint8_t *oob = chip->oob_poi;
|
||||||
@ -730,7 +730,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1527,7 +2097,9 @@ static int nand_read_subpage(struct mtd_
|
@@ -1532,7 +2102,9 @@ static int nand_read_subpage(struct mtd_
|
||||||
chip->cmdfunc(mtd, NAND_CMD_RNDOUT, data_col_addr, -1);
|
chip->cmdfunc(mtd, NAND_CMD_RNDOUT, data_col_addr, -1);
|
||||||
|
|
||||||
p = bufpoi + data_col_addr;
|
p = bufpoi + data_col_addr;
|
||||||
@ -741,7 +741,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
/* Calculate ECC */
|
/* Calculate ECC */
|
||||||
for (i = 0; i < eccfrag_len ; i += chip->ecc.bytes, p += chip->ecc.size)
|
for (i = 0; i < eccfrag_len ; i += chip->ecc.bytes, p += chip->ecc.size)
|
||||||
@@ -1545,8 +2117,11 @@ static int nand_read_subpage(struct mtd_
|
@@ -1550,8 +2122,11 @@ static int nand_read_subpage(struct mtd_
|
||||||
gaps = 1;
|
gaps = 1;
|
||||||
|
|
||||||
if (gaps) {
|
if (gaps) {
|
||||||
@ -755,7 +755,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Send the command to read the particular ECC bytes take care
|
* Send the command to read the particular ECC bytes take care
|
||||||
@@ -1560,9 +2135,12 @@ static int nand_read_subpage(struct mtd_
|
@@ -1565,9 +2140,12 @@ static int nand_read_subpage(struct mtd_
|
||||||
(busw - 1))
|
(busw - 1))
|
||||||
aligned_len++;
|
aligned_len++;
|
||||||
|
|
||||||
@ -771,7 +771,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = mtd_ooblayout_get_eccbytes(mtd, chip->buffers->ecccode,
|
ret = mtd_ooblayout_get_eccbytes(mtd, chip->buffers->ecccode,
|
||||||
@@ -1619,10 +2197,17 @@ static int nand_read_page_hwecc(struct m
|
@@ -1624,10 +2202,17 @@ static int nand_read_page_hwecc(struct m
|
||||||
|
|
||||||
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
|
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
|
||||||
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
||||||
@ -791,7 +791,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0,
|
ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0,
|
||||||
chip->ecc.total);
|
chip->ecc.total);
|
||||||
@@ -1681,9 +2266,13 @@ static int nand_read_page_hwecc_oob_firs
|
@@ -1686,9 +2271,13 @@ static int nand_read_page_hwecc_oob_firs
|
||||||
unsigned int max_bitflips = 0;
|
unsigned int max_bitflips = 0;
|
||||||
|
|
||||||
/* Read the OOB area first */
|
/* Read the OOB area first */
|
||||||
@ -808,7 +808,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0,
|
ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0,
|
||||||
chip->ecc.total);
|
chip->ecc.total);
|
||||||
@@ -1694,7 +2283,11 @@ static int nand_read_page_hwecc_oob_firs
|
@@ -1699,7 +2288,11 @@ static int nand_read_page_hwecc_oob_firs
|
||||||
int stat;
|
int stat;
|
||||||
|
|
||||||
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
||||||
@ -821,7 +821,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
chip->ecc.calculate(mtd, p, &ecc_calc[i]);
|
chip->ecc.calculate(mtd, p, &ecc_calc[i]);
|
||||||
|
|
||||||
stat = chip->ecc.correct(mtd, p, &ecc_code[i], NULL);
|
stat = chip->ecc.correct(mtd, p, &ecc_code[i], NULL);
|
||||||
@@ -1731,7 +2324,7 @@ static int nand_read_page_hwecc_oob_firs
|
@@ -1736,7 +2329,7 @@ static int nand_read_page_hwecc_oob_firs
|
||||||
static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
|
static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
uint8_t *buf, int oob_required, int page)
|
uint8_t *buf, int oob_required, int page)
|
||||||
{
|
{
|
||||||
@ -830,7 +830,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
int eccbytes = chip->ecc.bytes;
|
int eccbytes = chip->ecc.bytes;
|
||||||
int eccsteps = chip->ecc.steps;
|
int eccsteps = chip->ecc.steps;
|
||||||
int eccpadbytes = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
|
int eccpadbytes = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
|
||||||
@@ -1743,21 +2336,36 @@ static int nand_read_page_syndrome(struc
|
@@ -1748,21 +2341,36 @@ static int nand_read_page_syndrome(struc
|
||||||
int stat;
|
int stat;
|
||||||
|
|
||||||
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
||||||
@ -871,7 +871,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
oob += chip->ecc.postpad;
|
oob += chip->ecc.postpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1781,8 +2389,11 @@ static int nand_read_page_syndrome(struc
|
@@ -1786,8 +2394,11 @@ static int nand_read_page_syndrome(struc
|
||||||
|
|
||||||
/* Calculate remaining oob bytes */
|
/* Calculate remaining oob bytes */
|
||||||
i = mtd->oobsize - (oob - chip->oob_poi);
|
i = mtd->oobsize - (oob - chip->oob_poi);
|
||||||
@ -885,7 +885,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return max_bitflips;
|
return max_bitflips;
|
||||||
}
|
}
|
||||||
@@ -1903,8 +2514,11 @@ static int nand_do_read_ops(struct mtd_i
|
@@ -1908,8 +2519,11 @@ static int nand_do_read_ops(struct mtd_i
|
||||||
__func__, buf);
|
__func__, buf);
|
||||||
|
|
||||||
read_retry:
|
read_retry:
|
||||||
@ -899,7 +899,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Now read the page into the buffer. Absent an error,
|
* Now read the page into the buffer. Absent an error,
|
||||||
@@ -2063,9 +2677,7 @@ static int nand_read(struct mtd_info *mt
|
@@ -2068,9 +2682,7 @@ static int nand_read(struct mtd_info *mt
|
||||||
*/
|
*/
|
||||||
int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page)
|
int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page)
|
||||||
{
|
{
|
||||||
@ -910,7 +910,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nand_read_oob_std);
|
EXPORT_SYMBOL(nand_read_oob_std);
|
||||||
|
|
||||||
@@ -2083,25 +2695,43 @@ int nand_read_oob_syndrome(struct mtd_in
|
@@ -2088,25 +2700,43 @@ int nand_read_oob_syndrome(struct mtd_in
|
||||||
int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
|
int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
|
||||||
int eccsize = chip->ecc.size;
|
int eccsize = chip->ecc.size;
|
||||||
uint8_t *bufpoi = chip->oob_poi;
|
uint8_t *bufpoi = chip->oob_poi;
|
||||||
@ -961,7 +961,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2115,18 +2745,8 @@ EXPORT_SYMBOL(nand_read_oob_syndrome);
|
@@ -2120,18 +2750,8 @@ EXPORT_SYMBOL(nand_read_oob_syndrome);
|
||||||
*/
|
*/
|
||||||
int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page)
|
int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page)
|
||||||
{
|
{
|
||||||
@ -982,7 +982,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nand_write_oob_std);
|
EXPORT_SYMBOL(nand_write_oob_std);
|
||||||
|
|
||||||
@@ -2142,7 +2762,7 @@ int nand_write_oob_syndrome(struct mtd_i
|
@@ -2147,7 +2767,7 @@ int nand_write_oob_syndrome(struct mtd_i
|
||||||
{
|
{
|
||||||
int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
|
int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
|
||||||
int eccsize = chip->ecc.size, length = mtd->oobsize;
|
int eccsize = chip->ecc.size, length = mtd->oobsize;
|
||||||
@ -991,7 +991,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
const uint8_t *bufpoi = chip->oob_poi;
|
const uint8_t *bufpoi = chip->oob_poi;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2156,7 +2776,10 @@ int nand_write_oob_syndrome(struct mtd_i
|
@@ -2161,7 +2781,10 @@ int nand_write_oob_syndrome(struct mtd_i
|
||||||
} else
|
} else
|
||||||
pos = eccsize;
|
pos = eccsize;
|
||||||
|
|
||||||
@ -1003,7 +1003,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
for (i = 0; i < steps; i++) {
|
for (i = 0; i < steps; i++) {
|
||||||
if (sndcmd) {
|
if (sndcmd) {
|
||||||
if (mtd->writesize <= 512) {
|
if (mtd->writesize <= 512) {
|
||||||
@@ -2165,28 +2788,40 @@ int nand_write_oob_syndrome(struct mtd_i
|
@@ -2170,28 +2793,40 @@ int nand_write_oob_syndrome(struct mtd_i
|
||||||
len = eccsize;
|
len = eccsize;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
int num = min_t(int, len, 4);
|
int num = min_t(int, len, 4);
|
||||||
@ -1054,7 +1054,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nand_write_oob_syndrome);
|
EXPORT_SYMBOL(nand_write_oob_syndrome);
|
||||||
|
|
||||||
@@ -2341,9 +2976,18 @@ static int nand_read_oob(struct mtd_info
|
@@ -2346,9 +2981,18 @@ static int nand_read_oob(struct mtd_info
|
||||||
int nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
int nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
const uint8_t *buf, int oob_required, int page)
|
const uint8_t *buf, int oob_required, int page)
|
||||||
{
|
{
|
||||||
@ -1076,7 +1076,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2367,29 +3011,46 @@ static int nand_write_page_raw_syndrome(
|
@@ -2372,29 +3016,46 @@ static int nand_write_page_raw_syndrome(
|
||||||
int eccsize = chip->ecc.size;
|
int eccsize = chip->ecc.size;
|
||||||
int eccbytes = chip->ecc.bytes;
|
int eccbytes = chip->ecc.bytes;
|
||||||
uint8_t *oob = chip->oob_poi;
|
uint8_t *oob = chip->oob_poi;
|
||||||
@ -1130,7 +1130,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2443,7 +3104,11 @@ static int nand_write_page_hwecc(struct
|
@@ -2448,7 +3109,11 @@ static int nand_write_page_hwecc(struct
|
||||||
|
|
||||||
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
|
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
|
||||||
chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
|
chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
|
||||||
@ -1143,7 +1143,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
chip->ecc.calculate(mtd, p, &ecc_calc[i]);
|
chip->ecc.calculate(mtd, p, &ecc_calc[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2452,7 +3117,9 @@ static int nand_write_page_hwecc(struct
|
@@ -2457,7 +3122,9 @@ static int nand_write_page_hwecc(struct
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -1154,7 +1154,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2488,7 +3155,9 @@ static int nand_write_subpage_hwecc(stru
|
@@ -2493,7 +3160,9 @@ static int nand_write_subpage_hwecc(stru
|
||||||
chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
|
chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
|
||||||
|
|
||||||
/* write data (untouched subpages already masked by 0xFF) */
|
/* write data (untouched subpages already masked by 0xFF) */
|
||||||
@ -1165,7 +1165,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
/* mask ECC of un-touched subpages by padding 0xFF */
|
/* mask ECC of un-touched subpages by padding 0xFF */
|
||||||
if ((step < start_step) || (step > end_step))
|
if ((step < start_step) || (step > end_step))
|
||||||
@@ -2515,7 +3184,9 @@ static int nand_write_subpage_hwecc(stru
|
@@ -2520,7 +3189,9 @@ static int nand_write_subpage_hwecc(stru
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* write OOB buffer to NAND device */
|
/* write OOB buffer to NAND device */
|
||||||
@ -1176,7 +1176,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2542,31 +3213,49 @@ static int nand_write_page_syndrome(stru
|
@@ -2547,31 +3218,49 @@ static int nand_write_page_syndrome(stru
|
||||||
int eccsteps = chip->ecc.steps;
|
int eccsteps = chip->ecc.steps;
|
||||||
const uint8_t *p = buf;
|
const uint8_t *p = buf;
|
||||||
uint8_t *oob = chip->oob_poi;
|
uint8_t *oob = chip->oob_poi;
|
||||||
@ -1233,7 +1233,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2594,8 +3283,11 @@ static int nand_write_page(struct mtd_in
|
@@ -2599,8 +3288,11 @@ static int nand_write_page(struct mtd_in
|
||||||
else
|
else
|
||||||
subpage = 0;
|
subpage = 0;
|
||||||
|
|
||||||
@ -1247,7 +1247,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
if (unlikely(raw))
|
if (unlikely(raw))
|
||||||
status = chip->ecc.write_page_raw(mtd, chip, buf,
|
status = chip->ecc.write_page_raw(mtd, chip, buf,
|
||||||
@@ -2610,13 +3302,8 @@ static int nand_write_page(struct mtd_in
|
@@ -2615,13 +3307,8 @@ static int nand_write_page(struct mtd_in
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@ -1263,7 +1263,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2989,17 +3676,12 @@ out:
|
@@ -2994,17 +3681,12 @@ out:
|
||||||
static int single_erase(struct mtd_info *mtd, int page)
|
static int single_erase(struct mtd_info *mtd, int page)
|
||||||
{
|
{
|
||||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||||
@ -1284,7 +1284,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3226,22 +3908,12 @@ static int nand_max_bad_blocks(struct mt
|
@@ -3231,22 +3913,12 @@ static int nand_max_bad_blocks(struct mt
|
||||||
static int nand_onfi_set_features(struct mtd_info *mtd, struct nand_chip *chip,
|
static int nand_onfi_set_features(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
int addr, uint8_t *subfeature_param)
|
int addr, uint8_t *subfeature_param)
|
||||||
{
|
{
|
||||||
@ -1308,7 +1308,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3254,17 +3926,12 @@ static int nand_onfi_set_features(struct
|
@@ -3259,17 +3931,12 @@ static int nand_onfi_set_features(struct
|
||||||
static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip,
|
static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
int addr, uint8_t *subfeature_param)
|
int addr, uint8_t *subfeature_param)
|
||||||
{
|
{
|
||||||
@ -1327,7 +1327,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3407,12 +4074,11 @@ static u16 onfi_crc16(u16 crc, u8 const
|
@@ -3412,12 +4079,11 @@ static u16 onfi_crc16(u16 crc, u8 const
|
||||||
static int nand_flash_detect_ext_param_page(struct nand_chip *chip,
|
static int nand_flash_detect_ext_param_page(struct nand_chip *chip,
|
||||||
struct nand_onfi_params *p)
|
struct nand_onfi_params *p)
|
||||||
{
|
{
|
||||||
@ -1341,7 +1341,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
int len;
|
int len;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -3422,14 +4088,18 @@ static int nand_flash_detect_ext_param_p
|
@@ -3427,14 +4093,18 @@ static int nand_flash_detect_ext_param_p
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Send our own NAND_CMD_PARAM. */
|
/* Send our own NAND_CMD_PARAM. */
|
||||||
@ -1365,7 +1365,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
if ((onfi_crc16(ONFI_CRC_BASE, ((uint8_t *)ep) + 2, len - 2)
|
if ((onfi_crc16(ONFI_CRC_BASE, ((uint8_t *)ep) + 2, len - 2)
|
||||||
!= le16_to_cpu(ep->crc))) {
|
!= le16_to_cpu(ep->crc))) {
|
||||||
pr_debug("fail in the CRC.\n");
|
pr_debug("fail in the CRC.\n");
|
||||||
@@ -3482,19 +4152,23 @@ static int nand_flash_detect_onfi(struct
|
@@ -3487,19 +4157,23 @@ static int nand_flash_detect_onfi(struct
|
||||||
{
|
{
|
||||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||||
struct nand_onfi_params *p = &chip->onfi_params;
|
struct nand_onfi_params *p = &chip->onfi_params;
|
||||||
@ -1397,7 +1397,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) ==
|
if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) ==
|
||||||
le16_to_cpu(p->crc)) {
|
le16_to_cpu(p->crc)) {
|
||||||
break;
|
break;
|
||||||
@@ -3585,20 +4259,22 @@ static int nand_flash_detect_jedec(struc
|
@@ -3590,20 +4264,22 @@ static int nand_flash_detect_jedec(struc
|
||||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||||
struct nand_jedec_params *p = &chip->jedec_params;
|
struct nand_jedec_params *p = &chip->jedec_params;
|
||||||
struct jedec_ecc_info *ecc;
|
struct jedec_ecc_info *ecc;
|
||||||
@ -1429,7 +1429,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 510) ==
|
if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 510) ==
|
||||||
le16_to_cpu(p->crc))
|
le16_to_cpu(p->crc))
|
||||||
@@ -3877,8 +4553,7 @@ static int nand_detect(struct nand_chip
|
@@ -3882,8 +4558,7 @@ static int nand_detect(struct nand_chip
|
||||||
{
|
{
|
||||||
const struct nand_manufacturer *manufacturer;
|
const struct nand_manufacturer *manufacturer;
|
||||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||||
@ -1439,7 +1439,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
u8 *id_data = chip->id.data;
|
u8 *id_data = chip->id.data;
|
||||||
u8 maf_id, dev_id;
|
u8 maf_id, dev_id;
|
||||||
|
|
||||||
@@ -3886,17 +4561,21 @@ static int nand_detect(struct nand_chip
|
@@ -3891,17 +4566,21 @@ static int nand_detect(struct nand_chip
|
||||||
* Reset the chip, required by some chips (e.g. Micron MT29FxGxxxxx)
|
* Reset the chip, required by some chips (e.g. Micron MT29FxGxxxxx)
|
||||||
* after power-up.
|
* after power-up.
|
||||||
*/
|
*/
|
||||||
@ -1465,7 +1465,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Try again to make sure, as some systems the bus-hold or other
|
* Try again to make sure, as some systems the bus-hold or other
|
||||||
@@ -3905,11 +4584,10 @@ static int nand_detect(struct nand_chip
|
@@ -3910,11 +4589,10 @@ static int nand_detect(struct nand_chip
|
||||||
* not match, ignore the device completely.
|
* not match, ignore the device completely.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1480,7 +1480,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100
|
|||||||
|
|
||||||
if (id_data[0] != maf_id || id_data[1] != dev_id) {
|
if (id_data[0] != maf_id || id_data[1] != dev_id) {
|
||||||
pr_info("second ID read did not match %02x,%02x against %02x,%02x\n",
|
pr_info("second ID read did not match %02x,%02x against %02x,%02x\n",
|
||||||
@@ -4233,15 +4911,16 @@ int nand_scan_ident(struct mtd_info *mtd
|
@@ -4238,15 +4916,16 @@ int nand_scan_ident(struct mtd_info *mtd
|
||||||
|
|
||||||
/* Check for a chip array */
|
/* Check for a chip array */
|
||||||
for (i = 1; i < maxchips; i++) {
|
for (i = 1; i < maxchips; i++) {
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/phy_device.c
|
--- a/drivers/net/phy/phy_device.c
|
||||||
+++ b/drivers/net/phy/phy_device.c
|
+++ b/drivers/net/phy/phy_device.c
|
||||||
@@ -1912,7 +1912,7 @@ static struct phy_driver genphy_driver =
|
@@ -1922,7 +1922,7 @@ static struct phy_driver genphy_driver =
|
||||||
.config_init = genphy_config_init,
|
.config_init = genphy_config_init,
|
||||||
.features = PHY_GBIT_FEATURES | SUPPORTED_MII |
|
.features = PHY_GBIT_FEATURES | SUPPORTED_MII |
|
||||||
SUPPORTED_AUI | SUPPORTED_FIBRE |
|
SUPPORTED_AUI | SUPPORTED_FIBRE |
|
||||||
|
@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/phy.c
|
--- a/drivers/net/phy/phy.c
|
||||||
+++ b/drivers/net/phy/phy.c
|
+++ b/drivers/net/phy/phy.c
|
||||||
@@ -984,7 +984,10 @@ void phy_state_machine(struct work_struc
|
@@ -981,7 +981,10 @@ void phy_state_machine(struct work_struc
|
||||||
/* If the link is down, give up on negotiation for now */
|
/* If the link is down, give up on negotiation for now */
|
||||||
if (!phydev->link) {
|
if (!phydev->link) {
|
||||||
phydev->state = PHY_NOLINK;
|
phydev->state = PHY_NOLINK;
|
||||||
@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1071,7 +1074,10 @@ void phy_state_machine(struct work_struc
|
@@ -1068,7 +1071,10 @@ void phy_state_machine(struct work_struc
|
||||||
phy_link_up(phydev);
|
phy_link_up(phydev);
|
||||||
} else {
|
} else {
|
||||||
phydev->state = PHY_NOLINK;
|
phydev->state = PHY_NOLINK;
|
||||||
@ -35,7 +35,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (phy_interrupt_is_valid(phydev))
|
if (phy_interrupt_is_valid(phydev))
|
||||||
@@ -1081,7 +1087,10 @@ void phy_state_machine(struct work_struc
|
@@ -1078,7 +1084,10 @@ void phy_state_machine(struct work_struc
|
||||||
case PHY_HALTED:
|
case PHY_HALTED:
|
||||||
if (phydev->link) {
|
if (phydev->link) {
|
||||||
phydev->link = 0;
|
phydev->link = 0;
|
||||||
|
@ -4138,7 +4138,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
{
|
{
|
||||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||||
|
|
||||||
@@ -963,7 +963,7 @@ static void panic_nand_get_device(struct
|
@@ -968,7 +968,7 @@ static void panic_nand_get_device(struct
|
||||||
*
|
*
|
||||||
* Get the device and lock it for exclusive access
|
* Get the device and lock it for exclusive access
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
|
int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
--- a/drivers/mtd/nand/nand_base.c
|
--- a/drivers/mtd/nand/nand_base.c
|
||||||
+++ b/drivers/mtd/nand/nand_base.c
|
+++ b/drivers/mtd/nand/nand_base.c
|
||||||
@@ -2756,9 +2756,14 @@ static int nand_do_write_ops(struct mtd_
|
@@ -2761,9 +2761,14 @@ static int nand_do_write_ops(struct mtd_
|
||||||
memset(chip->oob_poi, 0xff, mtd->oobsize);
|
memset(chip->oob_poi, 0xff, mtd->oobsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -4714,6 +4719,9 @@ int nand_scan_tail(struct mtd_info *mtd)
|
@@ -4719,6 +4724,9 @@ int nand_scan_tail(struct mtd_info *mtd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/mtd/nand/nand_base.c
|
--- a/drivers/mtd/nand/nand_base.c
|
||||||
+++ b/drivers/mtd/nand/nand_base.c
|
+++ b/drivers/mtd/nand/nand_base.c
|
||||||
@@ -1903,6 +1903,9 @@ static int nand_do_read_ops(struct mtd_i
|
@@ -1908,6 +1908,9 @@ static int nand_do_read_ops(struct mtd_i
|
||||||
__func__, buf);
|
__func__, buf);
|
||||||
|
|
||||||
read_retry:
|
read_retry:
|
||||||
@ -10,7 +10,7 @@
|
|||||||
if (nand_standard_page_accessors(&chip->ecc))
|
if (nand_standard_page_accessors(&chip->ecc))
|
||||||
chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
|
chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
|
||||||
|
|
||||||
@@ -1922,6 +1925,7 @@ read_retry:
|
@@ -1927,6 +1930,7 @@ read_retry:
|
||||||
else
|
else
|
||||||
ret = chip->ecc.read_page(mtd, chip, bufpoi,
|
ret = chip->ecc.read_page(mtd, chip, bufpoi,
|
||||||
oob_required, page);
|
oob_required, page);
|
||||||
@ -18,7 +18,7 @@
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (use_bufpoi)
|
if (use_bufpoi)
|
||||||
/* Invalidate page cache */
|
/* Invalidate page cache */
|
||||||
@@ -3079,8 +3083,11 @@ int nand_erase_nand(struct mtd_info *mtd
|
@@ -3084,8 +3088,11 @@ int nand_erase_nand(struct mtd_info *mtd
|
||||||
(page + pages_per_block))
|
(page + pages_per_block))
|
||||||
chip->pagebuf = -1;
|
chip->pagebuf = -1;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@
|
|||||||
/* See if block erase succeeded */
|
/* See if block erase succeeded */
|
||||||
if (status & NAND_STATUS_FAIL) {
|
if (status & NAND_STATUS_FAIL) {
|
||||||
pr_debug("%s: failed erase, page 0x%08x\n",
|
pr_debug("%s: failed erase, page 0x%08x\n",
|
||||||
@@ -4210,6 +4217,7 @@ int nand_scan_ident(struct mtd_info *mtd
|
@@ -4215,6 +4222,7 @@ int nand_scan_ident(struct mtd_info *mtd
|
||||||
* cmdfunc() both expect cmd_ctrl() to be populated,
|
* cmdfunc() both expect cmd_ctrl() to be populated,
|
||||||
* so we need to check that that's the case
|
* so we need to check that that's the case
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user