parent
88f3c63572
commit
39e8ab17d5
@ -1,37 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 15 May 2016 13:09:20 +0200
|
||||
Subject: [PATCH] MIPS: ath79: fix regression in PCI window initialization
|
||||
|
||||
ath79_ddr_pci_win_base has the type void __iomem *, so register offsets
|
||||
need to be a multiple of 4.
|
||||
|
||||
Cc: Alban Bedel <albeu@free.fr>
|
||||
Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/arch/mips/ath79/common.c
|
||||
+++ b/arch/mips/ath79/common.c
|
||||
@@ -76,14 +76,14 @@ void ath79_ddr_set_pci_windows(void)
|
||||
{
|
||||
BUG_ON(!ath79_ddr_pci_win_base);
|
||||
|
||||
- __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0);
|
||||
- __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 1);
|
||||
- __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 2);
|
||||
- __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 3);
|
||||
- __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 4);
|
||||
- __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 5);
|
||||
- __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 6);
|
||||
- __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 7);
|
||||
+ __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0x0);
|
||||
+ __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 0x4);
|
||||
+ __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 0x8);
|
||||
+ __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 0xc);
|
||||
+ __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 0x10);
|
||||
+ __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 0x14);
|
||||
+ __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 0x18);
|
||||
+ __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 0x1c);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ath79_ddr_set_pci_windows);
|
||||
|
@ -1,41 +0,0 @@ |
||||
From 0e34079cd1f674449749aafe4be07336177de90d Mon Sep 17 00:00:00 2001
|
||||
From: Jon Mason <jon.mason@broadcom.com>
|
||||
Date: Thu, 2 Mar 2017 19:21:32 -0500
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GIC_PPI flags were misconfigured for the timers, resulting in errors
|
||||
like:
|
||||
[ 0.000000] GIC: PPI11 is secure or misconfigured
|
||||
|
||||
Changing them to being edge triggered corrects the issue
|
||||
|
||||
Suggested-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
|
||||
Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC")
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -66,14 +66,14 @@
|
||||
timer@20200 {
|
||||
compatible = "arm,cortex-a9-global-timer";
|
||||
reg = <0x20200 0x100>;
|
||||
- interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&periph_clk>;
|
||||
};
|
||||
|
||||
local-timer@20600 {
|
||||
compatible = "arm,cortex-a9-twd-timer";
|
||||
reg = <0x20600 0x100>;
|
||||
- interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&periph_clk>;
|
||||
};
|
||||
|
@ -1,48 +0,0 @@ |
||||
From bb1a619735b4660f21bce3e728b937640024b4ad Mon Sep 17 00:00:00 2001
|
||||
From: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
|
||||
Date: Wed, 8 Feb 2017 17:14:26 -0500
|
||||
Subject: [PATCH] net: phy: Initialize mdio clock at probe function
|
||||
|
||||
USB PHYs need the MDIO clock divisor enabled earlier to work.
|
||||
Initialize mdio clock divisor in probe function. The ext bus
|
||||
bit available in the same register will be used by mdio mux
|
||||
to enable external mdio.
|
||||
|
||||
Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
|
||||
Fixes: ddc24ae1 ("net: phy: Broadcom iProc MDIO bus driver")
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/mdio-bcm-iproc.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/mdio-bcm-iproc.c
|
||||
+++ b/drivers/net/phy/mdio-bcm-iproc.c
|
||||
@@ -81,8 +81,6 @@ static int iproc_mdio_read(struct mii_bu
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- iproc_mdio_config_clk(priv->base);
|
||||
-
|
||||
/* Prepare the read operation */
|
||||
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
|
||||
(reg << MII_DATA_RA_SHIFT) |
|
||||
@@ -112,8 +110,6 @@ static int iproc_mdio_write(struct mii_b
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- iproc_mdio_config_clk(priv->base);
|
||||
-
|
||||
/* Prepare the write operation */
|
||||
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
|
||||
(reg << MII_DATA_RA_SHIFT) |
|
||||
@@ -163,6 +159,8 @@ static int iproc_mdio_probe(struct platf
|
||||
bus->read = iproc_mdio_read;
|
||||
bus->write = iproc_mdio_write;
|
||||
|
||||
+ iproc_mdio_config_clk(priv->base);
|
||||
+
|
||||
rc = of_mdiobus_register(bus, pdev->dev.of_node);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "MDIO bus registration failed\n");
|
@ -1,35 +0,0 @@ |
||||
From 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Sat, 5 Dec 2015 02:09:43 +0100
|
||||
Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS)
|
||||
only
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
We allowed using bcm47xxpart on BCM5301X arch with commit:
|
||||
9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X")
|
||||
|
||||
BCM5301X devices may contain some partitions in higher memory, e.g.
|
||||
Netgear R8000 has board_data at 0x2600000. To detect them we should
|
||||
use size limit on MIPS only.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
---
|
||||
drivers/mtd/bcm47xxpart.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
/* Parse block by block looking for magics */
|
||||
for (offset = 0; offset <= master->size - blocksize;
|
||||
offset += blocksize) {
|
||||
- /* Nothing more in higher memory */
|
||||
- if (offset >= 0x2000000)
|
||||
+ /* Nothing more in higher memory on BCM47XX (MIPS) */
|
||||
+ if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000)
|
||||
break;
|
||||
|
||||
if (curr_part >= BCM47XXPART_MAX_PARTS) {
|
@ -1,93 +0,0 @@ |
||||
From 36bcc0c9c2bc8f56569cd735ba531a51358d7c2b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Sun, 6 Dec 2015 11:31:38 +0100
|
||||
Subject: [PATCH] mtd: bcm47xxpart: don't fail because of bit-flips
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bit-flip errors may occur on NAND flashes and are harmless. Handle them
|
||||
gracefully as read content is still reliable and can be parsed.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
---
|
||||
drivers/mtd/bcm47xxpart.c | 38 ++++++++++++++++++++++----------------
|
||||
1 file changed, 22 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -66,11 +66,13 @@ static const char *bcm47xxpart_trx_data_
|
||||
{
|
||||
uint32_t buf;
|
||||
size_t bytes_read;
|
||||
+ int err;
|
||||
|
||||
- if (mtd_read(master, offset, sizeof(buf), &bytes_read,
|
||||
- (uint8_t *)&buf) < 0) {
|
||||
- pr_err("mtd_read error while parsing (offset: 0x%X)!\n",
|
||||
- offset);
|
||||
+ err = mtd_read(master, offset, sizeof(buf), &bytes_read,
|
||||
+ (uint8_t *)&buf);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
|
||||
+ offset, err);
|
||||
goto out_default;
|
||||
}
|
||||
|
||||
@@ -95,6 +97,7 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
int trx_part = -1;
|
||||
int last_trx_part = -1;
|
||||
int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
|
||||
+ int err;
|
||||
|
||||
/*
|
||||
* Some really old flashes (like AT45DB*) had smaller erasesize-s, but
|
||||
@@ -128,10 +131,11 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
}
|
||||
|
||||
/* Read beginning of the block */
|
||||
- if (mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ,
|
||||
- &bytes_read, (uint8_t *)buf) < 0) {
|
||||
- pr_err("mtd_read error while parsing (offset: 0x%X)!\n",
|
||||
- offset);
|
||||
+ err = mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ,
|
||||
+ &bytes_read, (uint8_t *)buf);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
|
||||
+ offset, err);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -252,10 +256,11 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
}
|
||||
|
||||
/* Read middle of the block */
|
||||
- if (mtd_read(master, offset + 0x8000, 0x4,
|
||||
- &bytes_read, (uint8_t *)buf) < 0) {
|
||||
- pr_err("mtd_read error while parsing (offset: 0x%X)!\n",
|
||||
- offset);
|
||||
+ err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read,
|
||||
+ (uint8_t *)buf);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
|
||||
+ offset, err);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -275,10 +280,11 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
}
|
||||
|
||||
offset = master->size - possible_nvram_sizes[i];
|
||||
- if (mtd_read(master, offset, 0x4, &bytes_read,
|
||||
- (uint8_t *)buf) < 0) {
|
||||
- pr_err("mtd_read error while reading at offset 0x%X!\n",
|
||||
- offset);
|
||||
+ err = mtd_read(master, offset, 0x4, &bytes_read,
|
||||
+ (uint8_t *)buf);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("mtd_read error while reading (offset 0x%X): %d\n",
|
||||
+ offset, err);
|
||||
continue;
|
||||
}
|
||||
|
@ -1,28 +0,0 @@ |
||||
From f1640c3ddeec12804bc9a21feee85fc15aca95f6 Mon Sep 17 00:00:00 2001
|
||||
From: wangweidong <wangweidong1@huawei.com>
|
||||
Date: Wed, 13 Jan 2016 11:06:41 +0800
|
||||
Subject: [PATCH] bgmac: fix a missing check for build_skb
|
||||
|
||||
when build_skb failed, it may occure a NULL pointer.
|
||||
So add a 'NULL check' for it.
|
||||
|
||||
Signed-off-by: Weidong Wang <wangweidong1@huawei.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -469,6 +469,11 @@ static int bgmac_dma_rx_read(struct bgma
|
||||
len -= ETH_FCS_LEN;
|
||||
|
||||
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
|
||||
+ if (unlikely(skb)) {
|
||||
+ bgmac_err(bgmac, "build_skb failed\n");
|
||||
+ put_page(virt_to_head_page(buf));
|
||||
+ break;
|
||||
+ }
|
||||
skb_put(skb, BGMAC_RX_FRAME_OFFSET +
|
||||
BGMAC_RX_BUF_OFFSET + len);
|
||||
skb_pull(skb, BGMAC_RX_FRAME_OFFSET +
|
@ -1,22 +0,0 @@ |
||||
From 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 Mon Sep 17 00:00:00 2001
|
||||
From: "David S. Miller" <davem@davemloft.net>
|
||||
Date: Fri, 15 Jan 2016 16:07:13 -0500
|
||||
Subject: [PATCH] bgmac: Fix reversed test of build_skb() return value.
|
||||
|
||||
Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb")
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgma
|
||||
len -= ETH_FCS_LEN;
|
||||
|
||||
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
|
||||
- if (unlikely(skb)) {
|
||||
+ if (unlikely(!skb)) {
|
||||
bgmac_err(bgmac, "build_skb failed\n");
|
||||
put_page(virt_to_head_page(buf));
|
||||
break;
|
@ -1,31 +0,0 @@ |
||||
From b4dfd8e92956b396d3438212bc9a0be6267b8b34 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Tue, 12 Apr 2016 13:30:45 +0200
|
||||
Subject: [PATCH] bgmac: reset & enable Ethernet core before using it
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes Ethernet on D-Link DIR-885L with BCM47094 SoC. Felix reported
|
||||
similar fix was needed for his BCM4709 device (Buffalo WXR-1900DHP?).
|
||||
I tested this for regressions on BCM4706, BCM4708A0 and BCM47081A0.
|
||||
|
||||
Cc: Felix Fietkau <nbd@nbd.name>
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -1586,6 +1586,11 @@ static int bgmac_probe(struct bcma_devic
|
||||
dev_warn(&core->dev, "Using random MAC: %pM\n", mac);
|
||||
}
|
||||
|
||||
+ /* This (reset &) enable is not preset in specs or reference driver but
|
||||
+ * Broadcom does it in arch PCI code when enabling fake PCI device.
|
||||
+ */
|
||||
+ bcma_core_enable(core, 0);
|
||||
+
|
||||
/* Allocation and references */
|
||||
net_dev = alloc_etherdev(sizeof(*bgmac));
|
||||
if (!net_dev)
|
@ -1,37 +0,0 @@ |
||||
From d2b13233879ca1268a1c027d4573109e5a777811 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 23 Jun 2016 14:23:12 -0700
|
||||
Subject: [PATCH 1/3] net: bgmac: Fix SOF bit checking
|
||||
|
||||
We are checking for the Start of Frame bit in the ctl1 word, while this
|
||||
bit is set in the ctl0 word instead. Read the ctl0 word and update the
|
||||
check to verify that.
|
||||
|
||||
Fixes: 9cde94506eac ("bgmac: implement scatter/gather support")
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -269,15 +269,16 @@ static void bgmac_dma_tx_free(struct bgm
|
||||
while (ring->start != ring->end) {
|
||||
int slot_idx = ring->start % BGMAC_TX_RING_SLOTS;
|
||||
struct bgmac_slot_info *slot = &ring->slots[slot_idx];
|
||||
- u32 ctl1;
|
||||
+ u32 ctl0, ctl1;
|
||||
int len;
|
||||
|
||||
if (slot_idx == empty_slot)
|
||||
break;
|
||||
|
||||
+ ctl0 = le32_to_cpu(ring->cpu_base[slot_idx].ctl0);
|
||||
ctl1 = le32_to_cpu(ring->cpu_base[slot_idx].ctl1);
|
||||
len = ctl1 & BGMAC_DESC_CTL1_LEN;
|
||||
- if (ctl1 & BGMAC_DESC_CTL0_SOF)
|
||||
+ if (ctl0 & BGMAC_DESC_CTL0_SOF)
|
||||
/* Unmap no longer used buffer */
|
||||
dma_unmap_single(dma_dev, slot->dma_addr, len,
|
||||
DMA_TO_DEVICE);
|
@ -1,28 +0,0 @@ |
||||
From c3897f2a69e54dd113fc9abd2daf872e5b495798 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 23 Jun 2016 14:25:32 -0700
|
||||
Subject: [PATCH 2/3] net: bgmac: Start transmit queue in bgmac_open
|
||||
|
||||
The driver does not start the transmit queue in bgmac_open(). If the
|
||||
queue was stopped prior to closing then re-opening the interface, we
|
||||
would never be able to wake-up again.
|
||||
|
||||
Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus")
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -1327,6 +1327,9 @@ static int bgmac_open(struct net_device
|
||||
phy_start(net_dev->phydev);
|
||||
|
||||
netif_carrier_on(net_dev);
|
||||
+
|
||||
+ netif_start_queue(net_dev);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,28 +0,0 @@ |
||||
From 3894396e64994f31c3ef5c7e6f63dded0593e567 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 23 Jun 2016 14:25:33 -0700
|
||||
Subject: [PATCH 3/3] net: bgmac: Remove superflous netif_carrier_on()
|
||||
|
||||
bgmac_open() calls phy_start() to initialize the PHY state machine,
|
||||
which will set the interface's carrier state accordingly, no need to
|
||||
force that as this could be conflicting with the PHY state determined by
|
||||
PHYLIB.
|
||||
|
||||
Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus")
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||
@@ -1326,8 +1326,6 @@ static int bgmac_open(struct net_device
|
||||
|
||||
phy_start(net_dev->phydev);
|
||||
|
||||
- netif_carrier_on(net_dev);
|
||||
-
|
||||
netif_start_queue(net_dev);
|
||||
|
||||
return 0;
|
@ -1,30 +0,0 @@ |
||||
From: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
Date: Wed, 23 Nov 2016 10:40:07 +0100
|
||||
Subject: [PATCH] of: Add check to of_scan_flat_dt() before accessing
|
||||
initial_boot_params
|
||||
|
||||
An empty __dtb_start to __dtb_end section might result in initial_boot_params
|
||||
being null for arch/mips/ralink. This showed that the boot process hangs
|
||||
indefinitely in of_scan_flat_dt().
|
||||
|
||||
Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
---
|
||||
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -632,9 +632,12 @@ int __init of_scan_flat_dt(int (*it)(uns
|
||||
const char *pathp;
|
||||
int offset, rc = 0, depth = -1;
|
||||
|
||||
- for (offset = fdt_next_node(blob, -1, &depth);
|
||||
- offset >= 0 && depth >= 0 && !rc;
|
||||
- offset = fdt_next_node(blob, offset, &depth)) {
|
||||
+ if (!blob)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (offset = fdt_next_node(blob, -1, &depth);
|
||||
+ offset >= 0 && depth >= 0 && !rc;
|
||||
+ offset = fdt_next_node(blob, offset, &depth)) {
|
||||
|
||||
pathp = fdt_get_name(blob, offset, NULL);
|
||||
if (*pathp == '/')
|
@ -1,55 +0,0 @@ |
||||
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
|
||||
Date: Thu, 4 Feb 2016 22:09:23 +0100
|
||||
Subject: [PATCH] net: mvneta: Fix for_each_present_cpu usage
|
||||
|
||||
This patch convert the for_each_present in on_each_cpu, instead of
|
||||
applying on the present cpus it will be applied only on the online cpus.
|
||||
This fix a bug reported on
|
||||
http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173.
|
||||
|
||||
Using the macro on_each_cpu (instead of a for_each_* loop) also ensures
|
||||
that all the calls will be done all at once.
|
||||
|
||||
Fixes: f86428854480 ("net: mvneta: Statically assign queues to CPUs")
|
||||
Reported-by: Stefan Roese <stefan.roese@gmail.com>
|
||||
Suggested-by: Jisheng Zhang <jszhang@marvell.com>
|
||||
Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -2562,7 +2562,7 @@ static void mvneta_start_dev(struct mvne
|
||||
mvneta_port_enable(pp);
|
||||
|
||||
/* Enable polling on the port */
|
||||
- for_each_present_cpu(cpu) {
|
||||
+ for_each_online_cpu(cpu) {
|
||||
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
|
||||
|
||||
napi_enable(&port->napi);
|
||||
@@ -2587,7 +2587,7 @@ static void mvneta_stop_dev(struct mvnet
|
||||
|
||||
phy_stop(pp->phy_dev);
|
||||
|
||||
- for_each_present_cpu(cpu) {
|
||||
+ for_each_online_cpu(cpu) {
|
||||
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
|
||||
|
||||
napi_disable(&port->napi);
|
||||
@@ -3055,13 +3055,11 @@ err_cleanup_rxqs:
|
||||
static int mvneta_stop(struct net_device *dev)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
- int cpu;
|
||||
|
||||
mvneta_stop_dev(pp);
|
||||
mvneta_mdio_remove(pp);
|
||||
unregister_cpu_notifier(&pp->cpu_notifier);
|
||||
- for_each_present_cpu(cpu)
|
||||
- smp_call_function_single(cpu, mvneta_percpu_disable, pp, true);
|
||||
+ on_each_cpu(mvneta_percpu_disable, pp, true);
|
||||
free_percpu_irq(dev->irq, pp->ports);
|
||||
mvneta_cleanup_rxqs(pp);
|
||||
mvneta_cleanup_txqs(pp);
|
@ -1,51 +0,0 @@ |
||||
From 5833532b49820aa221248f296c207cc50d20ca2d Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Fri, 23 Dec 2016 19:36:31 -0800
|
||||
Subject: [PATCH net] net: korina: Fix NAPI versus resources freeing
|
||||
|
||||
Commit beb0babfb77e ("korina: disable napi on close and restart")
|
||||
introduced calls to napi_disable() that were missing before,
|
||||
unfortunately this leaves a small window during which NAPI has a chance
|
||||
to run, yet we just freed resources since korina_free_ring() has been
|
||||
called:
|
||||
|
||||
Fix this by disabling NAPI first then freeing resource, and make sure
|
||||
that we also cancel the restart taks before doing the resource freeing.
|
||||
|
||||
Fixes: beb0babfb77e ("korina: disable napi on close and restart")
|
||||
Reported-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/net/ethernet/korina.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/korina.c
|
||||
+++ b/drivers/net/ethernet/korina.c
|
||||
@@ -900,10 +900,10 @@ static void korina_restart_task(struct w
|
||||
DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR,
|
||||
&lp->rx_dma_regs->dmasm);
|
||||
|
||||
- korina_free_ring(dev);
|
||||
-
|
||||
napi_disable(&lp->napi);
|
||||
|
||||
+ korina_free_ring(dev);
|
||||
+
|
||||
if (korina_init(dev) < 0) {
|
||||
printk(KERN_ERR "%s: cannot restart device\n", dev->name);
|
||||
return;
|
||||
@@ -1064,12 +1064,12 @@ static int korina_close(struct net_devic
|
||||
tmp = tmp | DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR;
|
||||
writel(tmp, &lp->rx_dma_regs->dmasm);
|
||||
|
||||
- korina_free_ring(dev);
|
||||
-
|
||||
napi_disable(&lp->napi);
|
||||
|
||||
cancel_work_sync(&lp->restart_task);
|
||||
|
||||
+ korina_free_ring(dev);
|
||||
+
|
||||
free_irq(lp->rx_irq, dev);
|
||||
free_irq(lp->tx_irq, dev);
|
||||
free_irq(lp->ovr_irq, dev);
|
Loading…
Reference in new issue