* RE: [PATCH v4 4/5] net: macb: add support for high speed interface
From: Parshuram Raju Thombare @ 2019-06-24 6:52 UTC (permalink / raw)
To: Andrew Lunn
Cc: nicolas.ferre@microchip.com, davem@davemloft.net,
f.fainelli@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, hkallweit1@gmail.com,
linux-kernel@vger.kernel.org, Rafal Ciepiela, Anil Joy Varughese,
Piotr Sroka
In-Reply-To: <20190623150902.GB28942@lunn.ch>
Hi Andrew,
>> +enum {
>> + MACB_SERDES_RATE_5_PT_15625Gbps = 5,
>> + MACB_SERDES_RATE_10_PT_3125Gbps = 10,
>> +};
>What do the units mean here? Why would you clock the SERDES at 15Tbps,
>or 3Tbps? 3.125Mbps would give you 2.5Gbps when using 8b/10b encoding.
>
MACB_SERDES_RATE_5_PT_15625Gbps is for 5.15625Gbps, I think this should be just
MACB_SERDES_RATE_5_Gbps and MACB_SERDES_RATE_10_Gbps. I will do it in next patch set.
>Xilinx documentation:
>https://urldefense.proofpoint.com/v2/url?u=https-
>3A__www.xilinx.com_support_documentation_ip-5Fdocumentation_usxgmii_v1-
>5F1_pg251-
>2Dusxgmii.pdf&d=DwIBAg&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-
>_haXqY&r=GTefrem3hiBCnsjCOqAuapQHRN8-rKC1FRbk0it-
>LDs&m=6V8fNIg49czRjfvVtDJ5BbR28p9UPlLLyB7fah7ypcw&s=LsDphgLBe1VDpM
>_K9pkuyal873WeKqHDv64NDRUWy1Q&e=
>seems to suggest USXGMII uses a fixed rate of 10.3125Gb/s. So why do
>you need to change the rate?
For USXGMII, Cadence MAC need to be correctly programmed for external serdes rate.
Regards,
Parshuram Thombare
^ permalink raw reply
* RE: [PATCH v4 3/5] net: macb: add support for c45 PHY
From: Parshuram Raju Thombare @ 2019-06-24 6:47 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, davem@davemloft.net,
f.fainelli@gmail.com, netdev@vger.kernel.org,
hkallweit1@gmail.com, linux-kernel@vger.kernel.org,
Rafal Ciepiela, Anil Joy Varughese, Piotr Sroka
In-Reply-To: <20190623101252.olfxbls3phgxttcb@shell.armlinux.org.uk>
>Which Clause 45 PHY are you using?
I am using emulated PHY in our CSP environment.
This is using 10G generic PHY driver, with PHY having compatible = "ethernet-phy-ieee802.3-c45"
Hi Andrew,
Can I add your "Reviewed-by" tag for this patch. You added it to this patch in last series.
Regards,
Parshuram Thombare
^ permalink raw reply
* Re: [PATCH v2 1/3] net: fddi: skfp: Rename PCI_REV_ID to PCI_REVISION_ID
From: Christoph Hellwig @ 2019-06-24 6:45 UTC (permalink / raw)
To: Puranjay Mohan
Cc: Shuah Khan, Bjorn Helgaas, netdev, Linux Kernel Mailing List,
linux-kernel-mentees, linux-pci
In-Reply-To: <20190620180754.15413-2-puranjay12@gmail.com>
On Thu, Jun 20, 2019 at 11:37:52PM +0530, Puranjay Mohan wrote:
> Rename the PCI_REV_ID define to PCI_REVISION_ID in skfbi.h
> and drvfbi.c to make it compatible with the pci_regs.h
> which defines it as PCI_REVISION_ID.
We already cache the revision in struct pci_dev. In doubt you should
use that one.
^ permalink raw reply
* RE: [PATCH v4 2/5] net: macb: add support for sgmii MAC-PHY interface
From: Parshuram Raju Thombare @ 2019-06-24 6:35 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, davem@davemloft.net,
f.fainelli@gmail.com, netdev@vger.kernel.org,
hkallweit1@gmail.com, linux-kernel@vger.kernel.org,
Rafal Ciepiela, Anil Joy Varughese, Piotr Sroka
In-Reply-To: <20190623101224.nzwodgfo6vvv65cx@shell.armlinux.org.uk>
>> + if (change_interface) {
>> + if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
>> + gem_writel(bp, NCFGR, ~GEM_BIT(SGMIIEN) &
>> + ~GEM_BIT(PCSSEL) &
>> + gem_readl(bp, NCFGR));
>> + gem_writel(bp, NCR, ~GEM_BIT(TWO_PT_FIVE_GIG) &
>> + gem_readl(bp, NCR));
>> + gem_writel(bp, PCS_CTRL, gem_readl(bp, PCS_CTRL) |
>> + GEM_BIT(PCS_CTRL_RST));
>> + }
>I still don't think this makes much sense, splitting the interface
>configuration between here and below.
Do you mean splitting mac_config in two *_configure functions ?
This was done as per Andrew's suggestion to make code mode readable
and easy to manage by splitting MAC configuration for different interfaces.
>> + bp->phy_interface = state->interface;
>> + }
>> +
>> if (!phylink_autoneg_inband(mode) &&
>> (bp->speed != state->speed ||
>> - bp->duplex != state->duplex)) {
>> + bp->duplex != state->duplex ||
>> + change_interface)) {
>> u32 reg;
>>
>> reg = macb_readl(bp, NCFGR);
>> reg &= ~(MACB_BIT(SPD) | MACB_BIT(FD));
>> if (macb_is_gem(bp))
>> reg &= ~GEM_BIT(GBE);
>> + macb_or_gem_writel(bp, NCFGR, reg);
>> +
>> + if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII)
>> + gem_writel(bp, NCFGR, GEM_BIT(SGMIIEN) |
>> + GEM_BIT(PCSSEL) |
>> + gem_readl(bp, NCFGR));
>This will only be executed when we are not using inband mode, which
>basically means it's not possible to switch to SGMII in-band mode.
SGMII is used in default PHY mode. And above code is to program MAC to
select PCS and SGMII interface.
>> +
>> + if (!interface_supported) {
>> + netdev_err(dev, "Phy mode %s not supported",
>> + phy_modes(phy_mode));
>> + goto err_out_free_netdev;
>> + }
>> +
>> bp->phy_interface = phy_mode;
>> + } else {
>> + bp->phy_interface = phy_mode;
>> + }
>If bp->phy_interface is PHY_INTERFACE_MODE_SGMII here, and mac_config()
>is called with state->interface = PHY_INTERFACE_MODE_SGMII, then
>mac_config() won't configure the MAC for the interface type - is that
>intentional?
In mac_config configure MAC for non in-band mode, there is also check for speed, duplex
changes. bp->speed and bp->duplex are initialized to SPEED_UNKNOWN and DUPLEX_UNKNOWN
values so it is expected that for non in band mode state contains valid speed and duplex mode
which are different from *_UNKNOWN values.
Regards,
Parshuram Thombare
^ permalink raw reply
* RE: [PATCH v4 1/5] net: macb: add phylink support
From: Parshuram Raju Thombare @ 2019-06-24 6:20 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, davem@davemloft.net,
f.fainelli@gmail.com, netdev@vger.kernel.org,
hkallweit1@gmail.com, linux-kernel@vger.kernel.org,
Rafal Ciepiela, Anil Joy Varughese, Piotr Sroka
In-Reply-To: <20190623100824.3xlmkofiqebdf4sa@shell.armlinux.org.uk>
>From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
>On Sun, Jun 23, 2019 at 10:17:37AM +0100, Parshuram Thombare wrote:
>> + switch (state->interface) {
>> + case PHY_INTERFACE_MODE_GMII:
>> + case PHY_INTERFACE_MODE_RGMII:
>> + if (bp->caps & MACB_CAPS_GIGABIT_MODE_AVAILABLE) {
>> + phylink_set(mask, 1000baseT_Full);
>> + phylink_set(mask, 1000baseX_Full);
>> + if (!(bp->caps & MACB_CAPS_NO_GIGABIT_HALF)) {
>> + phylink_set(mask, 1000baseT_Half);
>> + phylink_set(mask, 1000baseT_Half);
>I think this can be cleaned up.
Ok, I will remove duplicate 1000baseT_Half
>> - spin_lock_irqsave(&bp->lock, flags);
>> + linkmode_and(supported, supported, mask);
>> + linkmode_and(state->advertising, state->advertising, mask);
>You remove this blank line in the next patch, so given that this is a
>new function, you might as well clean that up in this patch.
Ok
Regards,
Parshuram Thombare
^ permalink raw reply
* [PATCH 2/2] net: macb: Kconfig: Rename Atmel to Cadence
From: Palmer Dabbelt @ 2019-06-24 6:16 UTC (permalink / raw)
To: davem; +Cc: nicolas.ferre, netdev, linux-kernel, Palmer Dabbelt
In-Reply-To: <20190624061603.1704-1-palmer@sifive.com>
When touching the Kconfig for this driver I noticed that both the
Kconfig help text and a comment referred to this being an Atmel driver.
As far as I know, this is a Cadence driver. The fix is just
s/Atmel/Cadence/, but I did go and re-wrap the Kconfig help text as that
change caused it to go over 80 characters.
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
drivers/net/ethernet/cadence/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig
index 74ee2bfd2369..29b6132b418e 100644
--- a/drivers/net/ethernet/cadence/Kconfig
+++ b/drivers/net/ethernet/cadence/Kconfig
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
#
-# Atmel device configuration
+# Cadence device configuration
#
config NET_VENDOR_CADENCE
@@ -13,8 +13,8 @@ config NET_VENDOR_CADENCE
If unsure, say Y.
Note that the answer to this question doesn't directly affect the
- kernel: saying N will just cause the configurator to skip all
- the remaining Atmel network card questions. If you say Y, you will be
+ kernel: saying N will just cause the configurator to skip all the
+ remaining Cadence network card questions. If you say Y, you will be
asked for your specific card in the following questions.
if NET_VENDOR_CADENCE
--
2.21.0
^ permalink raw reply related
* [PATCH 1/2] net: macb: Fix compilation on systems without COMMON_CLK
From: Palmer Dabbelt @ 2019-06-24 6:16 UTC (permalink / raw)
To: davem; +Cc: nicolas.ferre, netdev, linux-kernel, Palmer Dabbelt
In-Reply-To: <20190624061603.1704-1-palmer@sifive.com>
The patch to add support for the FU540-C000 added a dependency on
COMMON_CLK, but didn't express that via Kconfig. This fixes the build
failure by adding CONFIG_MACB_FU540, which depends on COMMON_CLK and
conditionally enables the FU540-C000 support.
I've built this with a powerpc allyesconfig (which pointed out the bug)
and on RISC-V, manually checking to ensure the code was built. I
haven't even booted the resulting kernels.
Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000")
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
drivers/net/ethernet/cadence/Kconfig | 11 +++++++++++
drivers/net/ethernet/cadence/macb_main.c | 12 ++++++++++++
2 files changed, 23 insertions(+)
diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig
index 1766697c9c5a..74ee2bfd2369 100644
--- a/drivers/net/ethernet/cadence/Kconfig
+++ b/drivers/net/ethernet/cadence/Kconfig
@@ -40,6 +40,17 @@ config MACB_USE_HWSTAMP
---help---
Enable IEEE 1588 Precision Time Protocol (PTP) support for MACB.
+config MACB_FU540
+ bool "Enable support for the SiFive FU540 clock controller"
+ depends on MACB && COMMON_CLK
+ default y
+ ---help---
+ Enable support for the MACB/GEM clock controller on the SiFive
+ FU540-C000. This device is necessary for switching between 10/100
+ and gigabit modes on the FU540-C000 SoC, without which it is only
+ possible to bring up the Ethernet link in whatever mode the
+ bootloader probed.
+
config MACB_PCI
tristate "Cadence PCI MACB/GEM support"
depends on MACB && PCI && COMMON_CLK
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index c545c5b435d8..a903dfdd4183 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -41,6 +41,7 @@
#include <linux/pm_runtime.h>
#include "macb.h"
+#ifdef CONFIG_MACB_FU540
/* This structure is only used for MACB on SiFive FU540 devices */
struct sifive_fu540_macb_mgmt {
void __iomem *reg;
@@ -49,6 +50,7 @@ struct sifive_fu540_macb_mgmt {
};
static struct sifive_fu540_macb_mgmt *mgmt;
+#endif
#define MACB_RX_BUFFER_SIZE 128
#define RX_BUFFER_MULTIPLE 64 /* bytes */
@@ -3956,6 +3958,7 @@ static int at91ether_init(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_MACB_FU540
static unsigned long fu540_macb_tx_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
@@ -4056,7 +4059,9 @@ static int fu540_c000_init(struct platform_device *pdev)
return macb_init(pdev);
}
+#endif
+#ifdef CONFIG_MACB_FU540
static const struct macb_config fu540_c000_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP,
@@ -4065,6 +4070,7 @@ static const struct macb_config fu540_c000_config = {
.init = fu540_c000_init,
.jumbo_max_len = 10240,
};
+#endif
static const struct macb_config at91sam9260_config = {
.caps = MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
@@ -4155,7 +4161,9 @@ static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "cdns,emac", .data = &emac_config },
{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
+#ifdef CONFIG_MACB_FU540
{ .compatible = "sifive,fu540-macb", .data = &fu540_c000_config },
+#endif
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, macb_dt_ids);
@@ -4363,7 +4371,9 @@ static int macb_probe(struct platform_device *pdev)
err_disable_clocks:
clk_disable_unprepare(tx_clk);
+#ifdef CONFIG_MACB_FU540
clk_unregister(tx_clk);
+#endif
clk_disable_unprepare(hclk);
clk_disable_unprepare(pclk);
clk_disable_unprepare(rx_clk);
@@ -4398,7 +4408,9 @@ static int macb_remove(struct platform_device *pdev)
pm_runtime_dont_use_autosuspend(&pdev->dev);
if (!pm_runtime_suspended(&pdev->dev)) {
clk_disable_unprepare(bp->tx_clk);
+#ifdef CONFIG_MACB_FU540
clk_unregister(bp->tx_clk);
+#endif
clk_disable_unprepare(bp->hclk);
clk_disable_unprepare(bp->pclk);
clk_disable_unprepare(bp->rx_clk);
--
2.21.0
^ permalink raw reply related
* net: macb: Fix compilation on systems without COMMON_CLK
From: Palmer Dabbelt @ 2019-06-24 6:16 UTC (permalink / raw)
To: davem; +Cc: nicolas.ferre, netdev, linux-kernel
Our patch to add support for the FU540-C000 broke compilation on at
least powerpc allyesconfig, which was found as part of the linux-next
build regression tests. This must have somehow slipped through the
cracks, as the patch has been reverted in linux-next for a while now. This
patch applies on top of the offending commit, which is the only one I've even
tried it on as I'm not sure how this subsystem makes it to Linus.
This patch set fixes the issue by adding another Kconfig entry to
conditionally enable the FU540-C000 support. It would be less code to
just make MACB depend on COMMON_CLK, but I'm not sure if that dependency
would cause trouble for anyone so I didn't do it that way. I'm happy to
re-spin the patch to add the dependency, but as it's a very small change
I'm also happy if you do it yourself :).
I've also included a second patch to indicate this is a Cadence driver,
not an Atmel driver. As far as I know the controller is from Cadence,
but it looks like maybe it showed up first on some Atmel chips. I'm
fine either way, so feel free to just drop it if you think the old name
is better. The only relation is that I stumbled across it when writing the
first patch.
^ permalink raw reply
* [PATCH bpf-next] MAINTAINERS: add reviewer to maintainers entry
From: Björn Töpel @ 2019-06-24 5:24 UTC (permalink / raw)
To: ast, daniel, netdev
Cc: Björn Töpel, magnus.karlsson, bpf, linux-kernel,
jonathan.lemon
From: Björn Töpel <bjorn.topel@intel.com>
Jonathan Lemon has volunteered as an official AF_XDP reviewer. Thank
you, Jonathan!
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0cfe98a6761a..dd875578d53c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17284,6 +17284,7 @@ N: xdp
XDP SOCKETS (AF_XDP)
M: Björn Töpel <bjorn.topel@intel.com>
M: Magnus Karlsson <magnus.karlsson@intel.com>
+R: Jonathan Lemon <jonathan.lemon@gmail.com>
L: netdev@vger.kernel.org
L: bpf@vger.kernel.org
S: Maintained
--
2.20.1
^ permalink raw reply related
* [PATCH V2] net: ethernet: ti: cpsw: Fix suspend/resume break
From: Keerthy @ 2019-06-24 5:16 UTC (permalink / raw)
To: davem, ivan.khoronzhuk, andrew, ilias.apalodimas
Cc: linux-kernel, netdev, linux-omap, t-kristo, j-keerthy,
grygorii.strashko, nsekhar
Commit bfe59032bd6127ee190edb30be9381a01765b958 ("net: ethernet:
ti: cpsw: use cpsw as drv data")changes
the driver data to struct cpsw_common *cpsw. This is done
only in probe/remove but the suspend/resume functions are
still left with struct net_device *ndev. Hence fix both
suspend & resume also to fetch the updated driver data.
Fixes: bfe59032bd6127ee1 ("net: ethernet: ti: cpsw: use cpsw as drv data")
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Change in v2:
* Added NULL Checks for cpsw->slaves[i].ndev in suspend/resume functions.
drivers/net/ethernet/ti/cpsw.c | 30 +++++++++---------------------
1 file changed, 9 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7bdd287074fc..32b7b3b74a6b 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2590,20 +2590,13 @@ static int cpsw_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int cpsw_suspend(struct device *dev)
{
- struct net_device *ndev = dev_get_drvdata(dev);
- struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
-
- if (cpsw->data.dual_emac) {
- int i;
+ struct cpsw_common *cpsw = dev_get_drvdata(dev);
+ int i;
- for (i = 0; i < cpsw->data.slaves; i++) {
+ for (i = 0; i < cpsw->data.slaves; i++)
+ if (cpsw->slaves[i].ndev)
if (netif_running(cpsw->slaves[i].ndev))
cpsw_ndo_stop(cpsw->slaves[i].ndev);
- }
- } else {
- if (netif_running(ndev))
- cpsw_ndo_stop(ndev);
- }
/* Select sleep pin state */
pinctrl_pm_select_sleep_state(dev);
@@ -2613,25 +2606,20 @@ static int cpsw_suspend(struct device *dev)
static int cpsw_resume(struct device *dev)
{
- struct net_device *ndev = dev_get_drvdata(dev);
- struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
+ struct cpsw_common *cpsw = dev_get_drvdata(dev);
+ int i;
/* Select default pin state */
pinctrl_pm_select_default_state(dev);
/* shut up ASSERT_RTNL() warning in netif_set_real_num_tx/rx_queues */
rtnl_lock();
- if (cpsw->data.dual_emac) {
- int i;
- for (i = 0; i < cpsw->data.slaves; i++) {
+ for (i = 0; i < cpsw->data.slaves; i++)
+ if (cpsw->slaves[i].ndev)
if (netif_running(cpsw->slaves[i].ndev))
cpsw_ndo_open(cpsw->slaves[i].ndev);
- }
- } else {
- if (netif_running(ndev))
- cpsw_ndo_open(ndev);
- }
+
rtnl_unlock();
return 0;
--
2.17.1
^ permalink raw reply related
* Reminder: 27 open syzbot bugs in bluetooth subsystem
From: Eric Biggers @ 2019-06-24 5:14 UTC (permalink / raw)
To: linux-bluetooth, netdev, Marcel Holtmann, Johan Hedberg,
David S. Miller, Loic Poulain, Ben Young Tae Kim
Cc: linux-kernel, syzkaller-bugs
[This email was generated by a script. Let me know if you have any suggestions
to make it better.]
Of the currently open syzbot reports against the upstream kernel, I've manually
marked 27 of them as possibly being bugs in the bluetooth subsystem. I've
listed these reports below, sorted by an algorithm that tries to list first the
reports most likely to be still valid, important, and actionable.
Of these 27 bugs, 12 were seen in mainline in the last week.
Of these 27 bugs, 3 were bisected to commits from the following people:
Loic Poulain <loic.poulain@intel.com>
Ben Young Tae Kim <ytkim@qca.qualcomm.com>
If you believe a bug is no longer valid, please close the syzbot report by
sending a '#syz fix', '#syz dup', or '#syz invalid' command in reply to the
original thread, as explained at https://goo.gl/tpsmEJ#status
If you believe I misattributed a bug to the bluetooth subsystem, please let me
know, and if possible forward the report to the correct people or mailing list.
Here are the bugs:
--------------------------------------------------------------------------------
Title: WARNING in tty_set_termios
Last occurred: 0 days ago
Reported: 162 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=2410d22f1d8e5984217329dd0884b01d99e3e48d
Original thread: https://lkml.kernel.org/lkml/000000000000bcd434057f4eb905@google.com/T/#u
This bug has a C reproducer.
This bug was bisected to:
commit 162f812f23bab583f5d514ca0e4df67797ac9cdf
Author: Loic Poulain <loic.poulain@intel.com>
Date: Mon Sep 19 14:29:27 2016 +0000
Bluetooth: hci_uart: Add Marvell support
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+a950165cbb86bdd023a4@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000bcd434057f4eb905@google.com
--------------------------------------------------------------------------------
Title: WARNING: refcount bug in kobject_get
Last occurred: 1 day ago
Reported: 286 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=06c8522152c9325bf0f1a3dc5b33d1b95a47431f
Original thread: https://lkml.kernel.org/lkml/00000000000037743205757f33ac@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+b74b8b6e712f33454561@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000037743205757f33ac@google.com
--------------------------------------------------------------------------------
Title: WARNING in kernfs_get
Last occurred: 0 days ago
Reported: 286 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=b52dec65c1aaaec9b3893458b13a3304303de321
Original thread: https://lkml.kernel.org/lkml/000000000000f921ae05757f567c@google.com/T/#u
This bug has a C reproducer.
The original thread for this bug received 1 reply, 235 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+3dcb532381f98c86aeb1@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000f921ae05757f567c@google.com
--------------------------------------------------------------------------------
Title: general protection fault in skb_put
Last occurred: 2 days ago
Reported: 139 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=9abc0fdcdea0effb7b27984dbc1f336155cdad3f
Original thread: https://lkml.kernel.org/lkml/000000000000b9e68e0581142f19@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 4 replies; the last was 103 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+65788f9af9d54844389e@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000b9e68e0581142f19@google.com
--------------------------------------------------------------------------------
Title: BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
Last occurred: 1 day ago
Reported: 109 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=381cb436fe60dc03d7fd2a092b46d7f09542a72a
Original thread: https://lkml.kernel.org/lkml/000000000000b7fd51058370d0d9@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 1 reply, 73 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+91fd909b6e62ebe06131@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000b7fd51058370d0d9@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in hci_event_packet
Last occurred: 1 day ago
Reported: 167 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=d708485af9edc3af35f3b4d554e827c6c8bf6b0f
Original thread: https://lkml.kernel.org/lkml/000000000000696949057ee26e44@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+cec7a50c412a2c03f8f5@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000696949057ee26e44@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in kfree_skb (3)
Last occurred: 1 day ago
Reported: 47 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=db842327c655eab57b1755f661f1ab677d94e0bb
Original thread: https://lkml.kernel.org/lkml/0000000000002f9ef4058848f26d@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+dcb1305dd05699c40640@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000002f9ef4058848f26d@google.com
--------------------------------------------------------------------------------
Title: general protection fault in kernfs_add_one
Last occurred: 7 days ago
Reported: 280 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=c10f2ca5722a78c613e9ccd45af7877f5debf0ad
Original thread: https://lkml.kernel.org/lkml/000000000000bf6bd30575fec528@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+db1637662f412ac0d556@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000bf6bd30575fec528@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in rfcomm_dlc_exists
Last occurred: 4 days ago
Reported: 334 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=93ca265e594ab40b3d0e819cf24ba39e75d71fd6
Original thread: https://lkml.kernel.org/lkml/00000000000026c18a0571b9b0de@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+728bead095cef3335bb6@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000026c18a0571b9b0de@google.com
--------------------------------------------------------------------------------
Title: memory leak in bcsp_recv
Last occurred: 2 days ago
Reported: 29 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=84f71cc91e3c76e86a37858f87f0807ee8294deb
Original thread: https://lkml.kernel.org/lkml/00000000000013d4880589b9c7d3@google.com/T/#u
This bug has a C reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+98162c885993b72f19c4@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000013d4880589b9c7d3@google.com
--------------------------------------------------------------------------------
Title: memory leak in get_device_parent
Last occurred: 2 days ago
Reported: 27 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=63d2295ec374cc088d03cc83ad9c7a372a3d02e9
Original thread: https://lkml.kernel.org/lkml/0000000000009b950f0589e804b3@google.com/T/#u
This bug has a C reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+02e97e2ad931a981e568@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000009b950f0589e804b3@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in hci_cmd_timeout
Last occurred: 4 days ago
Reported: 47 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=cb23ebfc8f304f510fb717cb783fe8b496c7ffb1
Original thread: https://lkml.kernel.org/lkml/00000000000035c756058848954a@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+19a9f729f05272857487@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000035c756058848954a@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel NULL pointer dereference in hci_uart_set_flow_control
Last occurred: 94 days ago
Reported: 94 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=1b42faa2848963564a5b1b7f8c837ea7b55ffa50
Original thread: https://lkml.kernel.org/lkml/00000000000017690505849d6b3c@google.com/T/#u
This bug has a C reproducer.
This bug was bisected to:
commit 162f812f23bab583f5d514ca0e4df67797ac9cdf
Author: Loic Poulain <loic.poulain@intel.com>
Date: Mon Sep 19 14:29:27 2016 +0000
Bluetooth: hci_uart: Add Marvell support
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+79337b501d6aa974d0f6@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000017690505849d6b3c@google.com
--------------------------------------------------------------------------------
Title: KMSAN: uninit-value in hci_event_packet
Last occurred: 57 days ago
Reported: 71 days ago
Branches: Mainline (with KMSAN patches)
Dashboard link: https://syzkaller.appspot.com/bug?id=fac3d7b25f0e5f3899e4b0dcec32bb3177c95718
Original thread: https://lkml.kernel.org/lkml/0000000000005bb0ae05867271c1@google.com/T/#u
This bug has a C reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+4918ee47ac82d51de00d@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000005bb0ae05867271c1@google.com
--------------------------------------------------------------------------------
Title: general protection fault in qca_setup
Last occurred: 132 days ago
Reported: 132 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=62aaa13b8b6bba7f5bca8c0defef34b9a1623135
Original thread: https://lkml.kernel.org/lkml/0000000000002996510581a1487e@google.com/T/#u
This bug has a C reproducer.
This bug was bisected to:
commit 0ff252c1976da5d80db1377eb39b551931e61826
Author: Ben Young Tae Kim <ytkim@qca.qualcomm.com>
Date: Mon Aug 10 21:24:17 2015 +0000
Bluetooth: hciuart: Add support QCA chipset for UART
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+8c0dbf8843bb75efaa05@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000002996510581a1487e@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in bacpy
Last occurred: 53 days ago
Reported: 167 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=3acd1155d48a5acc5d76711568b04926945a6885
Original thread: https://lkml.kernel.org/lkml/0000000000008a1bce057ede3d13@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 6 replies; the last was 96 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+660883c56e2fa65d4497@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000008a1bce057ede3d13@google.com
--------------------------------------------------------------------------------
Title: WARNING: ODEBUG bug in rfcomm_dlc_free
Last occurred: 45 days ago
Reported: 327 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=97b7072a02091741ffc58f97884ab91565fd97ce
Original thread: https://lkml.kernel.org/lkml/00000000000086f39e057245c3ac@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+1f6d4ad860c650c2f215@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000086f39e057245c3ac@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Write in hci_sock_release
Last occurred: 170 days ago
Reported: 243 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=47befb59c610a69f024db20b927dea80c88fc045
Original thread: https://lkml.kernel.org/lkml/0000000000003692760578e651dd@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 3 replies; the last was 90 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+b364ed862aa07c74bc62@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000003692760578e651dd@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in rfcomm_dlc_open (2)
Last occurred: 33 days ago
Reported: 61 days ago
Branches: net and net-next
Dashboard link: https://syzkaller.appspot.com/bug?id=19321b91aa70d43289d580eb8cbf21e6aecef64f
Original thread: https://lkml.kernel.org/lkml/000000000000876c89058734fc71@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+0b0fd24d40f358830891@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000876c89058734fc71@google.com
--------------------------------------------------------------------------------
Title: INFO: trying to register non-static key in hci_uart_send_frame
Last occurred: 66 days ago
Reported: 115 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=8aa05f314c1391e788221378935286690d49f482
Original thread: https://lkml.kernel.org/lkml/0000000000001913600582f91f5b@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+a8587ba69fc78395d947@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000001913600582f91f5b@google.com
--------------------------------------------------------------------------------
Title: WARNING in kernfs_activate
Last occurred: 68 days ago
Reported: 47 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=059379fb4ac22ac01d4f2d658aaa6043ff021f42
Original thread: https://lkml.kernel.org/lkml/000000000000fd5e300588491545@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+1202f8882e4f4881d814@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000fd5e300588491545@google.com
--------------------------------------------------------------------------------
Title: INFO: trying to register non-static key in hci_uart_flush
Last occurred: 133 days ago
Reported: 132 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=9b359a901fde7f3eacc17249cbd613d35612e9aa
Original thread: https://lkml.kernel.org/lkml/0000000000006941590581a15637@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+e8cd9d8b4dfedf394390@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000006941590581a15637@google.com
--------------------------------------------------------------------------------
Title: WARNING: ODEBUG bug in hci_uart_tty_close
Last occurred: 127 days ago
Reported: 125 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=94b6786a5d26079c82301b2ec235ca4717884f4e
Original thread: https://lkml.kernel.org/lkml/0000000000005455bf058225e9c0@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+9fd324c8c2176a6022d3@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000005455bf058225e9c0@google.com
--------------------------------------------------------------------------------
Title: general protection fault in rfcomm_dlc_exists
Last occurred: 51 days ago
Reported: 47 days ago
Branches: net-next
Dashboard link: https://syzkaller.appspot.com/bug?id=1c4e5c426ab13696077aa6d0c67596e074605ffd
Original thread: https://lkml.kernel.org/lkml/0000000000009c83b005884900cf@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+362be51217ce29d215bc@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000009c83b005884900cf@google.com
--------------------------------------------------------------------------------
Title: general protection fault in rfcomm_dlc_open
Last occurred: 52 days ago
Reported: 47 days ago
Branches: net-next
Dashboard link: https://syzkaller.appspot.com/bug?id=05e856115d50ca3d56e1fbea58b612a78877be65
Unfortunately, this bug does not have a reproducer.
For some reason the syzbot dashboard doesn't contain a link to the original
thread for this bug, so my script couldn't provide a link to it in this
reminder. Try searching for the bug title.
--------------------------------------------------------------------------------
Title: WARNING in lockdep_register_key
Last occurred: 98 days ago
Reported: 113 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=5f34c586def64408fb57ee0fd898da67efda36c3
Original thread: https://lkml.kernel.org/lkml/000000000000baab660583172b5c@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+072814ec793ff1946da1@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000baab660583172b5c@google.com
--------------------------------------------------------------------------------
Title: general protection fault in idr_remove
Last occurred: 131 days ago
Reported: 131 days ago
Branches: linux-next
Dashboard link: https://syzkaller.appspot.com/bug?id=669469483cd7be33607ad681073484750f6f4c60
Original thread: https://lkml.kernel.org/lkml/00000000000023a7e70581b71894@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+3d07f0ffd652af4f49e6@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000023a7e70581b71894@google.com
^ permalink raw reply
* Reminder: 30 open syzbot bugs in "net/bpf" subsystem
From: Eric Biggers @ 2019-06-24 5:01 UTC (permalink / raw)
To: netdev, bpf, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
John Fastabend
Cc: Martin KaFai Lau, Song Liu, Yonghong Song, linux-kernel,
syzkaller-bugs
[This email was generated by a script. Let me know if you have any suggestions
to make it better.]
Of the currently open syzbot reports against the upstream kernel, I've manually
marked 30 of them as possibly being bugs in the "net/bpf" subsystem. I've
listed these reports below, sorted by an algorithm that tries to list first the
reports most likely to be still valid, important, and actionable.
Of these 30 bugs, 14 were seen in mainline in the last week.
Of these 30 bugs, 8 were bisected to commits from the following people:
John Fastabend <john.fastabend@gmail.com>
Daniel Borkmann <daniel@iogearbox.net>
Alexei Starovoitov <ast@fb.com>
If you believe a bug is no longer valid, please close the syzbot report by
sending a '#syz fix', '#syz dup', or '#syz invalid' command in reply to the
original thread, as explained at https://goo.gl/tpsmEJ#status
If you believe I misattributed a bug to the "net/bpf" subsystem, please let me
know, and if possible forward the report to the correct people or mailing list.
Here are the bugs:
--------------------------------------------------------------------------------
Title: WARNING in bpf_jit_free
Last occurred: 0 days ago
Reported: 342 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=d04f9c2ec11ab2678f7427795ff5170cb9eb2220
Original thread: https://lkml.kernel.org/lkml/000000000000e92d1805711f5552@google.com/T/#u
This bug has a C reproducer.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 5 replies; the last was 12 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+2ff1e7cb738fd3c41113@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 12 days ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/000000000000e92d1805711f5552@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_add
Last occurred: 0 days ago
Reported: 286 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=97f89d84d528e4f5150dcfbdeb97347bc8471e96
Original thread: https://lkml.kernel.org/lkml/0000000000009417ef0575802d44@google.com/T/#u
This bug has a syzkaller reproducer only.
The original thread for this bug received 2 replies; the last was 111 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+c827a78260579449ad39@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000009417ef0575802d44@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in sk_psock_unlink
Last occurred: 0 days ago
Reported: 240 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=d691981726208716cc7aec231fb915e27763d662
Original thread: https://lkml.kernel.org/lkml/000000000000fd342e05791cc86f@google.com/T/#u
This bug has a syzkaller reproducer only.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 1 reply, 31 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+3acd9f67a6a15766686e@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000fd342e05791cc86f@google.com
--------------------------------------------------------------------------------
Title: WARNING: kernel stack frame pointer has bad value (2)
Last occurred: 5 days ago
Reported: 342 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=02a32f98a4e3b5a2ed6929aabdd28dd1618b9c03
Original thread: https://lkml.kernel.org/lkml/0000000000000956640571197f98@google.com/T/#u
This bug has a C reproducer.
The original thread for this bug received 1 reply, 342 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+903cdd6bce9a6eb832a4@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000000956640571197f98@google.com
--------------------------------------------------------------------------------
Title: kernel panic: corrupted stack end in corrupted
Last occurred: 0 days ago
Reported: 3 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=1ee6edc829856a31fccb0c66cab50d2de0863f96
Original thread: https://lkml.kernel.org/lkml/00000000000097ca41058bc129cc@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000
bpf: sockhash fix omitted bucket lock in sock_close
The original thread for this bug has received 1 reply, 2 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+b764c7ca388222ddfb17@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 2 days ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/00000000000097ca41058bc129cc@google.com
--------------------------------------------------------------------------------
Title: WARNING in bpf_prog_kallsyms_find
Last occurred: 0 days ago
Reported: 47 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=40b0c218e639f1d882b86abff2549cfe11c5101e
Original thread: https://lkml.kernel.org/lkml/000000000000a8fa360588580820@google.com/T/#u
This bug has a C reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+89d1ce6e80218a6192d8@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000a8fa360588580820@google.com
--------------------------------------------------------------------------------
Title: general protection fault in rb_next (3)
Last occurred: 8 days ago
Reported: 6 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=18230564bca6dbde79a399755fefaca3a974f0c0
Original thread: https://lkml.kernel.org/lkml/0000000000003f07fe058b803013@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000
bpf: sockhash fix omitted bucket lock in sock_close
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+ab4c44191771d56c4eda@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread. For the git send-email command to use, or tips on how to reply if the
thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000003f07fe058b803013@google.com
--------------------------------------------------------------------------------
Title: general protection fault in rb_erase (2)
Last occurred: 18 days ago
Reported: 171 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=562d6c89d913184d9ed9bef5eec82105d71d2dc5
Original thread: https://lkml.kernel.org/lkml/0000000000008ab3c0057e8b747f@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000
bpf: sockhash fix omitted bucket lock in sock_close
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+e8c40862180d8949d624@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000008ab3c0057e8b747f@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in class_equal
Last occurred: 0 days ago
Reported: 29 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=d299ab18d8295ac16f481e28f727e3aa0e01a1cf
Original thread: https://lkml.kernel.org/lkml/00000000000016cb560589b9c7c4@google.com/T/#u
This bug has a syzkaller reproducer only.
The original thread for this bug has received 1 reply, 28 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+3d04999521633dceb439@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000016cb560589b9c7c4@google.com
--------------------------------------------------------------------------------
Title: memory leak in sock_hash_update_common
Last occurred: 2 days ago
Reported: 32 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=9992588b3bbe2617f62f41b1162af9fc8ea4829c
Original thread: https://lkml.kernel.org/lkml/000000000000fa662405897c0774@google.com/T/#u
This bug has a syzkaller reproducer only.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+30c7a1fc662026545124@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000fa662405897c0774@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Write in validate_chain
Last occurred: 3 days ago
Reported: 2 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=e73b1b9f0fb147bf4b79e9f6fe7a465abd9256c5
Original thread: https://lkml.kernel.org/lkml/0000000000000c4e3e058bd5008d@google.com/T/#u
This bug has a syzkaller reproducer only.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+55c548ad445cef6063ab@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread. For the git send-email command to use, or tips on how to reply if the
thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000000c4e3e058bd5008d@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in corrupted (2)
Last occurred: 17 days ago
Reported: 17 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=9360900ac995e4ff25dea7f3ac939652b1f716e1
Original thread: https://lkml.kernel.org/lkml/0000000000004945f1058aa80556@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit d40b0116c94bd8fc2b63aae35ce8e66bb53bba42
Author: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu Aug 16 19:49:08 2018 +0000
bpf, sockmap: fix leakage of smap_psock_map_entry
The original thread for this bug has received 1 reply, 17 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+9a901acbc447313bfe3e@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000004945f1058aa80556@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in usage_accumulate
Last occurred: 15 days ago
Reported: 17 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=53d11b9bbe4e2149cb3cc4cbe56068aa8202f079
Original thread: https://lkml.kernel.org/lkml/000000000000454279058aa80535@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000
bpf: sockhash fix omitted bucket lock in sock_close
The original thread for this bug has received 1 reply, 17 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+b0d730107e2ca6cb952f@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000454279058aa80535@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel paging request in cpuacct_account_field
Last occurred: 3 days ago
Reported: 2 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=8155f45b63050b3a24f5e9091005488492d48461
Original thread: https://lkml.kernel.org/lkml/00000000000008f38a058bd500b9@google.com/T/#u
This bug has a syzkaller reproducer only.
The original thread for this bug has received 1 reply, 1 day ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+a952f743523593b39174@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 1 day ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/00000000000008f38a058bd500b9@google.com
--------------------------------------------------------------------------------
Title: general protection fault in mm_update_next_owner
Last occurred: 15 days ago
Reported: 15 days ago
Branches: net
Dashboard link: https://syzkaller.appspot.com/bug?id=eaeca1c76639c47820399a4478080ebcf931c489
Original thread: https://lkml.kernel.org/lkml/000000000000a802e6058ad4bc53@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000
bpf: sockhash fix omitted bucket lock in sock_close
The original thread for this bug has received 2 replies; the last was 12 days
ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+f625baafb9a1c4bfc3f6@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 12 days ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/000000000000a802e6058ad4bc53@google.com
--------------------------------------------------------------------------------
Title: WARNING in is_bpf_text_address
Last occurred: 0 days ago
Reported: 2 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=2386340f7a641010bb1e17228d1e9319592c01ba
Original thread: https://lkml.kernel.org/lkml/00000000000000ac4f058bd50039@google.com/T/#u
This bug has a syzkaller reproducer only.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+bd3bba6ff3fcea7a6ec6@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread. For the git send-email command to use, or tips on how to reply if the
thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000000ac4f058bd50039@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Write in validate_chain
Last occurred: 2 days ago
Reported: 2 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=af95641bc8a50769fceae59ec58e8e35ea052914
Original thread: https://lkml.kernel.org/lkml/000000000000e672c6058bd7ee45@google.com/T/#u
This bug has a syzkaller reproducer only.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+8893700724999566d6a9@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread. For the git send-email command to use, or tips on how to reply if the
thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000e672c6058bd7ee45@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel paging request in __do_softirq
Last occurred: 5 days ago
Reported: 4 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=a0772f3c173c018b078174c3108eb00078c5818b
Original thread: https://lkml.kernel.org/lkml/00000000000017c9e2058baf4825@google.com/T/#u
This bug has a syzkaller reproducer only.
The original thread for this bug has received 1 reply, 4 days ago.
I believe that syzbot originally sent this report to the wrong people.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+0b224895cb9454584de1@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 4 days ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/00000000000017c9e2058baf4825@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel paging request in hrtimer_interrupt
Last occurred: 5 days ago
Reported: 4 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=fe68b600c03d48b14a769e379d1cda8704ffe9cb
Original thread: https://lkml.kernel.org/lkml/0000000000001c03bf058baf488a@google.com/T/#u
This bug has a syzkaller reproducer only.
The original thread for this bug has received 1 reply, 4 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+037e18398ba8c655a652@syzkaller.appspotmail.com
If you send any email or patch for this bug, please reply to the original
thread, which had activity only 4 days ago. For the git send-email command to
use, or tips on how to reply if the thread isn't in your mailbox, see the "Reply
instructions" at https://lkml.kernel.org/r/0000000000001c03bf058baf488a@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in bpf_prog_kallsyms_del
Last occurred: 173 days ago
Reported: 251 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=55d929463ecf8859c0c4836a4f8f004cfec28cf7
Original thread: https://lkml.kernel.org/lkml/0000000000001d985405783e8aee@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit f4d7e40a5b7157e1329c3c5b10f60d8289fc2941
Author: Alexei Starovoitov <ast@fb.com>
Date: Fri Dec 15 01:55:06 2017 +0000
bpf: introduce function calls (verification)
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+10cffda23c81a3ff1088@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000001d985405783e8aee@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in bpf_prog_kallsyms_add
Last occurred: 52 days ago
Reported: 286 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=0d9e7892096514a76e429ff8353aca183dac6e73
Original thread: https://lkml.kernel.org/lkml/000000000000ebd44005758029c2@google.com/T/#u
This bug has a syzkaller reproducer only.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+ac0311cfc9e80cd2e0e8@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000ebd44005758029c2@google.com
--------------------------------------------------------------------------------
Title: KASAN: slab-out-of-bounds Read in sock_hash_ctx_update_elem
Last occurred: 328 days ago
Reported: 328 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=4387b587226bb5f873bcf7dc8febc50c2dd3c540
Original thread: https://lkml.kernel.org/lkml/000000000000cc883b05723824b2@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+4207b2e0c72d65cc775d@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000cc883b05723824b2@google.com
--------------------------------------------------------------------------------
Title: KASAN: use-after-free Read in psock_map_pop
Last occurred: 243 days ago
Reported: 286 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=931ba7ed06ce22b5933fbc3992e6377a889d3ceb
Original thread: https://lkml.kernel.org/lkml/0000000000008cc5260575802d0d@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+5bbe234204453085d43e@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000008cc5260575802d0d@google.com
--------------------------------------------------------------------------------
Title: general protection fault in bpf_tcp_close (2)
Last occurred: 303 days ago
Reported: 347 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=50e6f582ccc13e995abdad2ecdefed35f91bebad
Original thread: https://lkml.kernel.org/lkml/00000000000054fd6b0570be9fa8@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+339037020e772651f1d8@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000054fd6b0570be9fa8@google.com
--------------------------------------------------------------------------------
Title: general protection fault in smap_list_hash_remove
Last occurred: 335 days ago
Reported: 354 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=293f48c6a63935b5872fac5eafff89a15518864e
Original thread: https://lkml.kernel.org/lkml/000000000000b0e80905702dcf6f@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+b912ba691bb508925d72@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000b0e80905702dcf6f@google.com
--------------------------------------------------------------------------------
Title: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find
Last occurred: 142 days ago
Reported: 217 days ago
Branches: bpf-next and linux-next
Dashboard link: https://syzkaller.appspot.com/bug?id=a1c27d97870876dcccbac41a965e46f672fc3855
Original thread: https://lkml.kernel.org/lkml/000000000000b99324057af4dabb@google.com/T/#u
This bug has a syzkaller reproducer only.
This bug was bisected to:
commit f4d7e40a5b7157e1329c3c5b10f60d8289fc2941
Author: Alexei Starovoitov <ast@fb.com>
Date: Fri Dec 15 01:55:06 2017 +0000
bpf: introduce function calls (verification)
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+66d6b1d3055f1d9ee4f3@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000b99324057af4dabb@google.com
--------------------------------------------------------------------------------
Title: WARNING in bpf_prog_kallsyms_add
Last occurred: 171 days ago
Reported: 170 days ago
Branches: Mainline
Dashboard link: https://syzkaller.appspot.com/bug?id=b658eb696c8279d9951a4ceea79efba8a1d12467
Original thread: https://lkml.kernel.org/lkml/000000000000f302fc057ea3b499@google.com/T/#u
This bug has a syzkaller reproducer only.
syzbot has bisected this bug, but I think the bisection result is incorrect.
The original thread for this bug received 2 replies; the last was 89 days ago.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+987e48d84abddbe2506d@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/000000000000f302fc057ea3b499@google.com
--------------------------------------------------------------------------------
Title: WARNING: suspicious RCU usage in trace_call_bpf
Last occurred: 276 days ago
Reported: 293 days ago
Branches: Mainline and others
Dashboard link: https://syzkaller.appspot.com/bug?id=b4ec822cd97ffa2800cd27429997e0c8ea82331d
Original thread: https://lkml.kernel.org/lkml/00000000000072d3ab0574f40f80@google.com/T/#u
This bug has a C reproducer.
No one replied to the original thread for this bug.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+1c843dc17610ca4c764f@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000072d3ab0574f40f80@google.com
--------------------------------------------------------------------------------
Title: WARNING in bpf_base_func_proto
Last occurred: 25 days ago
Reported: 23 days ago
Branches: bpf
Dashboard link: https://syzkaller.appspot.com/bug?id=5157126acdd38b1aedd23aeea5a3cfc26e16ce79
Original thread: https://lkml.kernel.org/lkml/0000000000002ea227058a2b28a4@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+5b595d1c2cd4d7d0f521@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/0000000000002ea227058a2b28a4@google.com
--------------------------------------------------------------------------------
Title: INFO: rcu detected stall in sys_bpf
Last occurred: 56 days ago
Reported: 88 days ago
Branches: bpf and linux-next
Dashboard link: https://syzkaller.appspot.com/bug?id=8a99735caa3c5e2b342382d6731db9da1a18aefd
Original thread: https://lkml.kernel.org/lkml/00000000000012a28e058517a481@google.com/T/#u
Unfortunately, this bug does not have a reproducer.
No one has replied to the original thread for this bug yet.
If you fix this bug, please add the following tag to the commit:
Reported-by: syzbot+c70685d9eac9589eaffc@syzkaller.appspotmail.com
If you send any email or patch for this bug, please consider replying to the
original thread. For the git send-email command to use, or tips on how to reply
if the thread isn't in your mailbox, see the "Reply instructions" at
https://lkml.kernel.org/r/00000000000012a28e058517a481@google.com
^ permalink raw reply
* Re: KASAN: user-memory-access Read in ip6_hold_safe (3)
From: Xin Long @ 2019-06-24 4:38 UTC (permalink / raw)
To: Dmitry Vyukov
Cc: David Ahern, syzbot, David Miller, Alexey Kuznetsov, LKML, netdev,
syzkaller-bugs, Hideaki YOSHIFUJI
In-Reply-To: <CACT4Y+ZqM84Ny22p7=J6vVXG7XOkqVN_jjkb87DNetNCFQRFBQ@mail.gmail.com>
On Mon, Jun 3, 2019 at 2:57 PM Dmitry Vyukov <dvyukov@google.com> wrote:
>
> On Sat, Jun 1, 2019 at 7:15 PM David Ahern <dsahern@gmail.com> wrote:
> >
> > On 6/1/19 12:05 AM, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following crash on:
> > >
> > > HEAD commit: dfb569f2 net: ll_temac: Fix compile error
> > > git tree: net-next
> > syzbot team:
> >
> > Is there any way to know the history of syzbot runs to determine that
> > crash X did not happen at commit Y but does happen at commit Z? That
> > narrows the window when trying to find where a regression occurs.
>
> Hi David,
>
> All info is available on the dashboard:
>
> > dashboard link: https://syzkaller.appspot.com/bug?extid=a5b6e01ec8116d046842
>
> We don't keep any private info on top of that.
>
> This crash happened 129 times in the past 9 days. This suggests this
> is not a previous memory corruption, these usually happen at most few
> times.
> The first one was:
>
> 2019/05/24 15:33 net-next dfb569f2
>
> Then it was joined by bpf-next:
>
> ci-upstream-bpf-next-kasan-gce 2019/06/01 15:51 bpf-next 0462eaac
>
> Since it happens a dozen of times per day, most likely it was
> introduced into net-next around dfb569f2 (syzbot should do new builds
> every ~12h, minus broken trees).
I think all these pcpu memory corruptions can be marked as Fixed-by:
commit c3bcde026684c62d7a2b6f626dc7cf763833875c
Author: Xin Long <lucien.xin@gmail.com>
Date: Mon Jun 17 21:34:15 2019 +0800
tipc: pass tunnel dev as NULL to udp_tunnel(6)_xmit_skb
^ permalink raw reply
* [PATCH net] net/tls: fix page double free on TX cleanup
From: Jakub Kicinski @ 2019-06-24 4:26 UTC (permalink / raw)
To: davem
Cc: netdev, oss-drivers, john.fastabend, vakul.garg, borisp,
alexei.starovoitov, Dirk van der Merwe, Jakub Kicinski
From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
With commit 94850257cf0f ("tls: Fix tls_device handling of partial records")
a new path was introduced to cleanup partial records during sk_proto_close.
This path does not handle the SW KTLS tx_list cleanup.
This is unnecessary though since the free_resources calls for both
SW and offload paths will cleanup a partial record.
The visible effect is the following warning, but this bug also causes
a page double free.
WARNING: CPU: 7 PID: 4000 at net/core/stream.c:206 sk_stream_kill_queues+0x103/0x110
RIP: 0010:sk_stream_kill_queues+0x103/0x110
RSP: 0018:ffffb6df87e07bd0 EFLAGS: 00010206
RAX: 0000000000000000 RBX: ffff8c21db4971c0 RCX: 0000000000000007
RDX: ffffffffffffffa0 RSI: 000000000000001d RDI: ffff8c21db497270
RBP: ffff8c21db497270 R08: ffff8c29f4748600 R09: 000000010020001a
R10: ffffb6df87e07aa0 R11: ffffffff9a445600 R12: 0000000000000007
R13: 0000000000000000 R14: ffff8c21f03f2900 R15: ffff8c21f03b8df0
Call Trace:
inet_csk_destroy_sock+0x55/0x100
tcp_close+0x25d/0x400
? tcp_check_oom+0x120/0x120
tls_sk_proto_close+0x127/0x1c0
inet_release+0x3c/0x60
__sock_release+0x3d/0xb0
sock_close+0x11/0x20
__fput+0xd8/0x210
task_work_run+0x84/0xa0
do_exit+0x2dc/0xb90
? release_sock+0x43/0x90
do_group_exit+0x3a/0xa0
get_signal+0x295/0x720
do_signal+0x36/0x610
? SYSC_recvfrom+0x11d/0x130
exit_to_usermode_loop+0x69/0xb0
do_syscall_64+0x173/0x180
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x7fe9b9abc10d
RSP: 002b:00007fe9b19a1d48 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 0000000000000006 RCX: 00007fe9b9abc10d
RDX: 0000000000000002 RSI: 0000000000000080 RDI: 00007fe948003430
RBP: 00007fe948003410 R08: 00007fe948003430 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00005603739d9080
R13: 00007fe9b9ab9f90 R14: 00007fe948003430 R15: 0000000000000000
Fixes: 94850257cf0f ("tls: Fix tls_device handling of partial records")
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
include/net/tls.h | 15 ---------------
net/tls/tls_main.c | 3 ++-
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/include/net/tls.h b/include/net/tls.h
index 4a55ce6a303f..53d96bca220d 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -373,21 +373,6 @@ static inline bool tls_is_partially_sent_record(struct tls_context *ctx)
return !!ctx->partially_sent_record;
}
-static inline int tls_complete_pending_work(struct sock *sk,
- struct tls_context *ctx,
- int flags, long *timeo)
-{
- int rc = 0;
-
- if (unlikely(sk->sk_write_pending))
- rc = wait_on_pending_writer(sk, timeo);
-
- if (!rc && tls_is_partially_sent_record(ctx))
- rc = tls_push_partial_record(sk, ctx, flags);
-
- return rc;
-}
-
static inline bool tls_is_pending_open_record(struct tls_context *tls_ctx)
{
return tls_ctx->pending_open_record_frags;
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index fc81ae18cc44..e2b69e805d46 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -279,7 +279,8 @@ static void tls_sk_proto_close(struct sock *sk, long timeout)
goto skip_tx_cleanup;
}
- if (!tls_complete_pending_work(sk, ctx, 0, &timeo))
+ if (unlikely(sk->sk_write_pending) &&
+ !wait_on_pending_writer(sk, &timeo))
tls_handle_open_record(sk, 0);
/* We need these for tls_sw_fallback handling of other packets */
--
2.21.0
^ permalink raw reply related
* [PATCH v2] flow_dissector: Fix vlan header offset in __skb_flow_dissect
From: YueHaibing @ 2019-06-24 3:49 UTC (permalink / raw)
To: davem, sdf, jianbol, jiri, mirq-linux, willemb, sdf, jiri
Cc: linux-kernel, netdev, YueHaibing
In-Reply-To: <20190622.161955.2030310177158651781.davem@davemloft.net>
We build vlan on top of bonding interface, which vlan offload
is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is
BOND_XMIT_POLICY_ENCAP34.
__skb_flow_dissect() fails to get information from protocol headers
encapsulated within vlan, because 'nhoff' is points to IP header,
so bond hashing is based on layer 2 info, which fails to distribute
packets across slaves.
Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: remove redundant spaces
---
net/core/flow_dissector.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 01ad60b..ff85934 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -998,6 +998,9 @@ bool __skb_flow_dissect(const struct net *net,
skb && skb_vlan_tag_present(skb)) {
proto = skb->protocol;
} else {
+ if (dissector_vlan == FLOW_DISSECTOR_KEY_MAX)
+ nhoff -= sizeof(*vlan);
+
vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan),
data, hlen, &_vlan);
if (!vlan) {
--
2.7.4
^ permalink raw reply related
* Re: linux-next: build failure after merge of the net-next tree
From: Palmer Dabbelt @ 2019-06-24 3:59 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: davem, netdev, linux-next, linux-kernel, yash.shah
In-Reply-To: <20190624131245.359e59a4@canb.auug.org.au>
On Sun, 23 Jun 2019 20:12:45 PDT (-0700), Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 20 Jun 2019 19:13:48 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> After merging the net-next tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>>
>> drivers/net/ethernet/cadence/macb_main.c:48:16: error: field 'hw' has incomplete type
>> struct clk_hw hw;
>> ^~
>> drivers/net/ethernet/cadence/macb_main.c:4003:21: error: variable 'fu540_c000_ops' has initializer but incomplete type
>> static const struct clk_ops fu540_c000_ops = {
>> ^~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:3: error: 'const struct clk_ops' has no member named 'recalc_rate'
>> .recalc_rate = fu540_macb_tx_recalc_rate,
>> ^~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:17: warning: excess elements in struct initializer
>> .recalc_rate = fu540_macb_tx_recalc_rate,
>> ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:17: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c:4005:3: error: 'const struct clk_ops' has no member named 'round_rate'
>> .round_rate = fu540_macb_tx_round_rate,
>> ^~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4005:16: warning: excess elements in struct initializer
>> .round_rate = fu540_macb_tx_round_rate,
>> ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4005:16: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c:4006:3: error: 'const struct clk_ops' has no member named 'set_rate'
>> .set_rate = fu540_macb_tx_set_rate,
>> ^~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4006:14: warning: excess elements in struct initializer
>> .set_rate = fu540_macb_tx_set_rate,
>> ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4006:14: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c: In function 'fu540_c000_clk_init':
>> drivers/net/ethernet/cadence/macb_main.c:4013:23: error: storage size of 'init' isn't known
>> struct clk_init_data init;
>> ^~~~
>> drivers/net/ethernet/cadence/macb_main.c:4032:12: error: implicit declaration of function 'clk_register'; did you mean 'sock_register'? [-Werror=implicit-function-declaration]
>> *tx_clk = clk_register(NULL, &mgmt->hw);
>> ^~~~~~~~~~~~
>> sock_register
>> drivers/net/ethernet/cadence/macb_main.c:4013:23: warning: unused variable 'init' [-Wunused-variable]
>> struct clk_init_data init;
>> ^~~~
>> drivers/net/ethernet/cadence/macb_main.c: In function 'macb_probe':
>> drivers/net/ethernet/cadence/macb_main.c:4366:2: error: implicit declaration of function 'clk_unregister'; did you mean 'sock_unregister'? [-Werror=implicit-function-declaration]
>> clk_unregister(tx_clk);
>> ^~~~~~~~~~~~~~
>> sock_unregister
>> drivers/net/ethernet/cadence/macb_main.c: At top level:
>> drivers/net/ethernet/cadence/macb_main.c:4003:29: error: storage size of 'fu540_c000_ops' isn't known
>> static const struct clk_ops fu540_c000_ops = {
>> ^~~~~~~~~~~~~~
>>
>> Caused by commit
>>
>> c218ad559020 ("macb: Add support for SiFive FU540-C000")
>>
>> CONFIG_COMMON_CLK is not set for this build.
>>
>> I have reverted that commit for today.
>
> I am still reverting that commit. Has this problem been fixed in some
> subtle way?
I don't think so. I'm assuming something like this is necessary
diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig
index 1766697c9c5a..d13db9e9c818 100644
--- a/drivers/net/ethernet/cadence/Kconfig
+++ b/drivers/net/ethernet/cadence/Kconfig
@@ -23,6 +23,7 @@ config MACB
tristate "Cadence MACB/GEM support"
depends on HAS_DMA
select PHYLIB
+ depends on COMMON_CLK
---help---
The Cadence MACB ethernet interface is found on many Atmel AT32 and
AT91 parts. This driver also supports the Cadence GEM (Gigabit
@@ -42,7 +43,7 @@ config MACB_USE_HWSTAMP
config MACB_PCI
tristate "Cadence PCI MACB/GEM support"
- depends on MACB && PCI && COMMON_CLK
+ depends on MACB && PCI
---help---
This is PCI wrapper for MACB driver.
at a minimum, though it may be saner to #ifdef support for the SiFive clock
driver as that's only useful on some systems. Assuming I can reproduce the
build failure (which shouldn't be too hard), I'll send out a patch that adds a
Kconfig for the FU540 clock driver to avoid adding a COMMON_CLK dependency for
all MACB systems.
^ permalink raw reply related
* Re: [PATCH net-next 1/7] net: aquantia: replace internal driver version code with uts
From: Jakub Kicinski @ 2019-06-24 3:49 UTC (permalink / raw)
To: Andrew Lunn
Cc: Igor Russkikh, David S . Miller, netdev@vger.kernel.org,
Jiri Pirko
In-Reply-To: <20190622150514.GB8497@lunn.ch>
On Sat, 22 Jun 2019 17:05:14 +0200, Andrew Lunn wrote:
> On Sat, Jun 22, 2019 at 01:45:12PM +0000, Igor Russkikh wrote:
> > As it was discussed some time previously, driver is better to
> > report kernel version string, as it in a best way identifies
> > the codebase.
> >
> > Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
>
> Nice.
Indeed!
> Devlink has just gained something similar to ethtool -i. Maybe we
> should get the devlink core to also report the kernel version?
I don't think we have the driver version at all there, my usual
inclination being to not duplicate information across APIs. Do we
have non-hypothetical instances of users reporting ethtool -i without
uname output? Admittedly I may work with above-average Linux-trained
engineers :S Would it be okay to just get devlink user space to use
uname() to get the info?
^ permalink raw reply
* Re: [PATCH v2 0/3] fix bugs when enable route_localnet
From: David Ahern @ 2019-06-24 3:47 UTC (permalink / raw)
To: David Miller, liuzhiqiang26
Cc: luoshijie1, tgraf, netdev, wangxiaogang3, mingfangsen, zhoukang7
In-Reply-To: <20190622.084611.1808368522428755652.davem@davemloft.net>
On 6/22/19 6:46 AM, David Miller wrote:
> From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> Date: Sat, 22 Jun 2019 16:41:49 +0800
>
>> Friendly ping ...
>
> I'm not applying this patch series without someone reviewing it.
>
I have stared at it a few times since the patches were sent and can not
find anything obviously wrong about it. The fallout seems limited to
users of route_localnet which I have to believe is small (I only know of
2 other users of 127/8 for non-loopback and those were almost 10 years ago).
Putting in net-next is the safest.
^ permalink raw reply
* [PATCH V3 03/10] net: dsa: microchip: Inline ksz_spi.h
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
The functions in the header file are static, and the header file is
included from single C file, just inline the code into the C file.
The bonus is that it's easier to spot further content to clean up.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477_spi.c | 43 +++++++++++++++++-
drivers/net/dsa/microchip/ksz_spi.h | 59 -------------------------
2 files changed, 42 insertions(+), 60 deletions(-)
delete mode 100644 drivers/net/dsa/microchip/ksz_spi.h
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c
index 86d12d48a2a9..a34e66eccbcd 100644
--- a/drivers/net/dsa/microchip/ksz9477_spi.c
+++ b/drivers/net/dsa/microchip/ksz9477_spi.c
@@ -13,7 +13,6 @@
#include <linux/spi/spi.h>
#include "ksz_priv.h"
-#include "ksz_spi.h"
/* SPI frame opcodes */
#define KS_SPIOP_RD 3
@@ -73,6 +72,48 @@ static int ksz_spi_write(struct ksz_device *dev, u32 reg, void *data,
return ksz9477_spi_write_reg(spi, reg, dev->txbuf, len);
}
+static int ksz_spi_read8(struct ksz_device *dev, u32 reg, u8 *val)
+{
+ return ksz_spi_read(dev, reg, val, 1);
+}
+
+static int ksz_spi_read16(struct ksz_device *dev, u32 reg, u16 *val)
+{
+ int ret = ksz_spi_read(dev, reg, (u8 *)val, 2);
+
+ if (!ret)
+ *val = be16_to_cpu(*val);
+
+ return ret;
+}
+
+static int ksz_spi_read32(struct ksz_device *dev, u32 reg, u32 *val)
+{
+ int ret = ksz_spi_read(dev, reg, (u8 *)val, 4);
+
+ if (!ret)
+ *val = be32_to_cpu(*val);
+
+ return ret;
+}
+
+static int ksz_spi_write8(struct ksz_device *dev, u32 reg, u8 value)
+{
+ return ksz_spi_write(dev, reg, &value, 1);
+}
+
+static int ksz_spi_write16(struct ksz_device *dev, u32 reg, u16 value)
+{
+ value = cpu_to_be16(value);
+ return ksz_spi_write(dev, reg, &value, 2);
+}
+
+static int ksz_spi_write32(struct ksz_device *dev, u32 reg, u32 value)
+{
+ value = cpu_to_be32(value);
+ return ksz_spi_write(dev, reg, &value, 4);
+}
+
static const struct ksz_io_ops ksz9477_spi_ops = {
.read8 = ksz_spi_read8,
.read16 = ksz_spi_read16,
diff --git a/drivers/net/dsa/microchip/ksz_spi.h b/drivers/net/dsa/microchip/ksz_spi.h
deleted file mode 100644
index 976bace31f37..000000000000
--- a/drivers/net/dsa/microchip/ksz_spi.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0
- * Microchip KSZ series SPI access common header
- *
- * Copyright (C) 2017-2018 Microchip Technology Inc.
- * Tristram Ha <Tristram.Ha@microchip.com>
- */
-
-#ifndef __KSZ_SPI_H
-#define __KSZ_SPI_H
-
-/* Chip dependent SPI access */
-static int ksz_spi_read(struct ksz_device *dev, u32 reg, u8 *data,
- unsigned int len);
-static int ksz_spi_write(struct ksz_device *dev, u32 reg, void *data,
- unsigned int len);
-
-static int ksz_spi_read8(struct ksz_device *dev, u32 reg, u8 *val)
-{
- return ksz_spi_read(dev, reg, val, 1);
-}
-
-static int ksz_spi_read16(struct ksz_device *dev, u32 reg, u16 *val)
-{
- int ret = ksz_spi_read(dev, reg, (u8 *)val, 2);
-
- if (!ret)
- *val = be16_to_cpu(*val);
-
- return ret;
-}
-
-static int ksz_spi_read32(struct ksz_device *dev, u32 reg, u32 *val)
-{
- int ret = ksz_spi_read(dev, reg, (u8 *)val, 4);
-
- if (!ret)
- *val = be32_to_cpu(*val);
-
- return ret;
-}
-
-static int ksz_spi_write8(struct ksz_device *dev, u32 reg, u8 value)
-{
- return ksz_spi_write(dev, reg, &value, 1);
-}
-
-static int ksz_spi_write16(struct ksz_device *dev, u32 reg, u16 value)
-{
- value = cpu_to_be16(value);
- return ksz_spi_write(dev, reg, &value, 2);
-}
-
-static int ksz_spi_write32(struct ksz_device *dev, u32 reg, u32 value)
-{
- value = cpu_to_be32(value);
- return ksz_spi_write(dev, reg, &value, 4);
-}
-
-#endif
--
2.20.1
^ permalink raw reply related
* [PATCH V3 04/10] net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
These functions are only used by the KSZ9477 code, move them from
the header into that code. Note that these functions will be soon
replaced by regmap equivalents.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: New patch
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477.c | 29 ++++++++++++++++++++++++++
drivers/net/dsa/microchip/ksz_common.h | 29 --------------------------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 508380f80875..e8b96566abd9 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -65,6 +65,35 @@ static const struct {
{ 0x83, "tx_discards" },
};
+static void ksz_cfg(struct ksz_device *dev, u32 addr, u8 bits, bool set)
+{
+ u8 data;
+
+ ksz_read8(dev, addr, &data);
+ if (set)
+ data |= bits;
+ else
+ data &= ~bits;
+ ksz_write8(dev, addr, data);
+}
+
+static void ksz_port_cfg(struct ksz_device *dev, int port, int offset, u8 bits,
+ bool set)
+{
+ u32 addr;
+ u8 data;
+
+ addr = dev->dev_ops->get_port_addr(port, offset);
+ ksz_read8(dev, addr, &data);
+
+ if (set)
+ data |= bits;
+ else
+ data &= ~bits;
+
+ ksz_write8(dev, addr, data);
+}
+
static void ksz9477_cfg32(struct ksz_device *dev, u32 addr, u32 bits, bool set)
{
u32 data;
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index c15b49528bad..fe576a00facf 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -141,35 +141,6 @@ static inline void ksz_pwrite32(struct ksz_device *dev, int port, int offset,
ksz_write32(dev, dev->dev_ops->get_port_addr(port, offset), data);
}
-static void ksz_cfg(struct ksz_device *dev, u32 addr, u8 bits, bool set)
-{
- u8 data;
-
- ksz_read8(dev, addr, &data);
- if (set)
- data |= bits;
- else
- data &= ~bits;
- ksz_write8(dev, addr, data);
-}
-
-static void ksz_port_cfg(struct ksz_device *dev, int port, int offset, u8 bits,
- bool set)
-{
- u32 addr;
- u8 data;
-
- addr = dev->dev_ops->get_port_addr(port, offset);
- ksz_read8(dev, addr, &data);
-
- if (set)
- data |= bits;
- else
- data &= ~bits;
-
- ksz_write8(dev, addr, data);
-}
-
struct ksz_poll_ctx {
struct ksz_device *dev;
int port;
--
2.20.1
^ permalink raw reply related
* [PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
The indirect function call to dev->dev_ops->get_port_addr() is expensive
especially if called for every single register access, and only returns
the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly
instead.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: New patch
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index e8b96566abd9..7d209fd9f26f 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -83,7 +83,7 @@ static void ksz_port_cfg(struct ksz_device *dev, int port, int offset, u8 bits,
u32 addr;
u8 data;
- addr = dev->dev_ops->get_port_addr(port, offset);
+ addr = PORT_CTRL_ADDR(port, offset);
ksz_read8(dev, addr, &data);
if (set)
--
2.20.1
^ permalink raw reply related
* [PATCH V3 02/10] net: dsa: microchip: Remove ksz_{get,set}()
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477_spi.c | 2 --
drivers/net/dsa/microchip/ksz_common.h | 24 ------------------------
drivers/net/dsa/microchip/ksz_priv.h | 2 --
drivers/net/dsa/microchip/ksz_spi.h | 10 ----------
4 files changed, 38 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c
index e7118319c192..86d12d48a2a9 100644
--- a/drivers/net/dsa/microchip/ksz9477_spi.c
+++ b/drivers/net/dsa/microchip/ksz9477_spi.c
@@ -80,8 +80,6 @@ static const struct ksz_io_ops ksz9477_spi_ops = {
.write8 = ksz_spi_write8,
.write16 = ksz_spi_write16,
.write32 = ksz_spi_write32,
- .get = ksz_spi_get,
- .set = ksz_spi_set,
};
static int ksz9477_spi_probe(struct spi_device *spi)
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index 1781539c3a81..c15b49528bad 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -105,30 +105,6 @@ static inline int ksz_write32(struct ksz_device *dev, u32 reg, u32 value)
return ret;
}
-static inline int ksz_get(struct ksz_device *dev, u32 reg, void *data,
- size_t len)
-{
- int ret;
-
- mutex_lock(&dev->reg_mutex);
- ret = dev->ops->get(dev, reg, data, len);
- mutex_unlock(&dev->reg_mutex);
-
- return ret;
-}
-
-static inline int ksz_set(struct ksz_device *dev, u32 reg, void *data,
- size_t len)
-{
- int ret;
-
- mutex_lock(&dev->reg_mutex);
- ret = dev->ops->set(dev, reg, data, len);
- mutex_unlock(&dev->reg_mutex);
-
- return ret;
-}
-
static inline void ksz_pread8(struct ksz_device *dev, int port, int offset,
u8 *data)
{
diff --git a/drivers/net/dsa/microchip/ksz_priv.h b/drivers/net/dsa/microchip/ksz_priv.h
index 5ef6153bd2cc..d3ddf98156bb 100644
--- a/drivers/net/dsa/microchip/ksz_priv.h
+++ b/drivers/net/dsa/microchip/ksz_priv.h
@@ -109,8 +109,6 @@ struct ksz_io_ops {
int (*write8)(struct ksz_device *dev, u32 reg, u8 value);
int (*write16)(struct ksz_device *dev, u32 reg, u16 value);
int (*write32)(struct ksz_device *dev, u32 reg, u32 value);
- int (*get)(struct ksz_device *dev, u32 reg, void *data, size_t len);
- int (*set)(struct ksz_device *dev, u32 reg, void *data, size_t len);
};
struct alu_struct {
diff --git a/drivers/net/dsa/microchip/ksz_spi.h b/drivers/net/dsa/microchip/ksz_spi.h
index 427811bd60b3..976bace31f37 100644
--- a/drivers/net/dsa/microchip/ksz_spi.h
+++ b/drivers/net/dsa/microchip/ksz_spi.h
@@ -56,14 +56,4 @@ static int ksz_spi_write32(struct ksz_device *dev, u32 reg, u32 value)
return ksz_spi_write(dev, reg, &value, 4);
}
-static int ksz_spi_get(struct ksz_device *dev, u32 reg, void *data, size_t len)
-{
- return ksz_spi_read(dev, reg, data, len);
-}
-
-static int ksz_spi_set(struct ksz_device *dev, u32 reg, void *data, size_t len)
-{
- return ksz_spi_write(dev, reg, data, len);
-}
-
#endif
--
2.20.1
^ permalink raw reply related
* [PATCH V3 00/10] net: dsa: microchip: Convert to regmap
From: Marek Vasut @ 2019-06-23 22:34 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
This patchset converts KSZ9477 switch driver to regmap.
This was tested with extra patches on KSZ8795. This was also tested
on KSZ9477 on Microchip KSZ9477EVB board, which I now have.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Marek Vasut (10):
net: dsa: microchip: Remove ksz_{read,write}24()
net: dsa: microchip: Remove ksz_{get,set}()
net: dsa: microchip: Inline ksz_spi.h
net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c
net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function
call
net: dsa: microchip: Factor out register access opcode generation
net: dsa: microchip: Initial SPI regmap support
net: dsa: microchip: Dispose of ksz_io_ops
net: dsa: microchip: Factor out regmap config generation into common
header
net: dsa: microchip: Replace ad-hoc bit manipulation with regmap
drivers/net/dsa/microchip/Kconfig | 1 +
drivers/net/dsa/microchip/ksz9477.c | 35 +++---
drivers/net/dsa/microchip/ksz9477_spi.c | 114 +++--------------
drivers/net/dsa/microchip/ksz_common.c | 6 +-
drivers/net/dsa/microchip/ksz_common.h | 157 +++++++-----------------
drivers/net/dsa/microchip/ksz_priv.h | 23 +---
drivers/net/dsa/microchip/ksz_spi.h | 69 -----------
7 files changed, 84 insertions(+), 321 deletions(-)
delete mode 100644 drivers/net/dsa/microchip/ksz_spi.h
--
2.20.1
^ permalink raw reply
* [PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
Add basic SPI regmap support into the driver.
Previous patches unconver that ksz_spi_write() is always ever called
with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN)
check and we can also drop the allocation of the txbuf which is part
of the driver data and wastes 256 bytes for no reason. Regmap covers
the whole thing now.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: - Squash with "net: dsa: microchip: Remove dev->txbuf"
- Use separate regmaps for 8/16/32bit registers
- Increase the regmap size to 0xd00 to cover the entire register area
V3: - Rebase on next/master
- Test on KSZ9477EVB
- Increase regmap max register, to cover all switch registers
- Correct regmap reg_bits value to match the hardware
- Use cpu_to_be32() instead of cpu_to_le16() in register masks, since
the KSZ9477 has some 32bit registers.
---
drivers/net/dsa/microchip/Kconfig | 1 +
drivers/net/dsa/microchip/ksz9477_spi.c | 114 +++++++++++-------------
drivers/net/dsa/microchip/ksz_priv.h | 3 +-
3 files changed, 52 insertions(+), 66 deletions(-)
diff --git a/drivers/net/dsa/microchip/Kconfig b/drivers/net/dsa/microchip/Kconfig
index 2c3a6751bdaf..56790d544eb2 100644
--- a/drivers/net/dsa/microchip/Kconfig
+++ b/drivers/net/dsa/microchip/Kconfig
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
config NET_DSA_MICROCHIP_KSZ_COMMON
+ select REGMAP_SPI
tristate
menuconfig NET_DSA_MICROCHIP_KSZ9477
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c
index 49aeb92d36fc..77e3cb100eae 100644
--- a/drivers/net/dsa/microchip/ksz9477_spi.c
+++ b/drivers/net/dsa/microchip/ksz9477_spi.c
@@ -10,78 +10,54 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include "ksz_priv.h"
-/* SPI frame opcodes */
-#define KS_SPIOP_RD 3
-#define KS_SPIOP_WR 2
-
#define SPI_ADDR_SHIFT 24
-#define SPI_ADDR_MASK (BIT(SPI_ADDR_SHIFT) - 1)
+#define SPI_ADDR_ALIGN 3
#define SPI_TURNAROUND_SHIFT 5
-/* Enough to read all switch port registers. */
-#define SPI_TX_BUF_LEN 0x100
-
-static u32 ksz9477_spi_cmd(u32 reg, bool read)
-{
- u32 txbuf;
-
- txbuf = reg & SPI_ADDR_MASK;
- txbuf |= (read ? KS_SPIOP_RD : KS_SPIOP_WR) << SPI_ADDR_SHIFT;
- txbuf <<= SPI_TURNAROUND_SHIFT;
- txbuf = cpu_to_be32(txbuf);
-
- return txbuf;
-}
-
-static int ksz9477_spi_read_reg(struct spi_device *spi, u32 reg, u8 *val,
- unsigned int len)
-{
- u32 txbuf = ksz9477_spi_cmd(reg, true);
-
- return spi_write_then_read(spi, &txbuf, 4, val, len);
-}
-
-static int ksz9477_spi_write_reg(struct spi_device *spi, u32 reg, u8 *val,
- unsigned int len)
-{
- u32 *txbuf = (u32 *)val;
-
- *txbuf = ksz9477_spi_cmd(reg, false);
-
- return spi_write(spi, txbuf, 4 + len);
-}
-
-static int ksz_spi_read(struct ksz_device *dev, u32 reg, u8 *data,
- unsigned int len)
-{
- struct spi_device *spi = dev->priv;
-
- return ksz9477_spi_read_reg(spi, reg, data, len);
-}
-
-static int ksz_spi_write(struct ksz_device *dev, u32 reg, void *data,
- unsigned int len)
-{
- struct spi_device *spi = dev->priv;
+/* SPI frame opcodes */
+#define KS_SPIOP_RD 3
+#define KS_SPIOP_WR 2
- if (len > SPI_TX_BUF_LEN)
- len = SPI_TX_BUF_LEN;
- memcpy(&dev->txbuf[4], data, len);
- return ksz9477_spi_write_reg(spi, reg, dev->txbuf, len);
-}
+#define KS_SPIOP_FLAG_MASK(opcode) \
+ cpu_to_be32((opcode) << (SPI_ADDR_SHIFT + SPI_TURNAROUND_SHIFT))
+
+#define KSZ_REGMAP_COMMON(width) \
+ { \
+ .val_bits = (width), \
+ .reg_stride = (width) / 8, \
+ .reg_bits = SPI_ADDR_SHIFT + SPI_ADDR_ALIGN, \
+ .pad_bits = SPI_TURNAROUND_SHIFT, \
+ .max_register = BIT(SPI_ADDR_SHIFT) - 1, \
+ .cache_type = REGCACHE_NONE, \
+ .read_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_RD), \
+ .write_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_WR), \
+ .reg_format_endian = REGMAP_ENDIAN_BIG, \
+ .val_format_endian = REGMAP_ENDIAN_BIG \
+ }
+
+static const struct regmap_config ksz9477_regmap_config[] = {
+ KSZ_REGMAP_COMMON(8),
+ KSZ_REGMAP_COMMON(16),
+ KSZ_REGMAP_COMMON(32),
+};
static int ksz_spi_read8(struct ksz_device *dev, u32 reg, u8 *val)
{
- return ksz_spi_read(dev, reg, val, 1);
+ unsigned int value;
+ int ret = regmap_read(dev->regmap, reg, &value);
+
+ *val = value;
+ return ret;
}
static int ksz_spi_read16(struct ksz_device *dev, u32 reg, u16 *val)
{
- int ret = ksz_spi_read(dev, reg, (u8 *)val, 2);
+ int ret = regmap_bulk_read(dev->regmap, reg, val, 2);
if (!ret)
*val = be16_to_cpu(*val);
@@ -91,7 +67,7 @@ static int ksz_spi_read16(struct ksz_device *dev, u32 reg, u16 *val)
static int ksz_spi_read32(struct ksz_device *dev, u32 reg, u32 *val)
{
- int ret = ksz_spi_read(dev, reg, (u8 *)val, 4);
+ int ret = regmap_bulk_read(dev->regmap, reg, val, 4);
if (!ret)
*val = be32_to_cpu(*val);
@@ -101,19 +77,19 @@ static int ksz_spi_read32(struct ksz_device *dev, u32 reg, u32 *val)
static int ksz_spi_write8(struct ksz_device *dev, u32 reg, u8 value)
{
- return ksz_spi_write(dev, reg, &value, 1);
+ return regmap_write(dev->regmap, reg, value);
}
static int ksz_spi_write16(struct ksz_device *dev, u32 reg, u16 value)
{
value = cpu_to_be16(value);
- return ksz_spi_write(dev, reg, &value, 2);
+ return regmap_bulk_write(dev->regmap, reg, &value, 2);
}
static int ksz_spi_write32(struct ksz_device *dev, u32 reg, u32 value)
{
value = cpu_to_be32(value);
- return ksz_spi_write(dev, reg, &value, 4);
+ return regmap_bulk_write(dev->regmap, reg, &value, 4);
}
static const struct ksz_io_ops ksz9477_spi_ops = {
@@ -128,17 +104,27 @@ static const struct ksz_io_ops ksz9477_spi_ops = {
static int ksz9477_spi_probe(struct spi_device *spi)
{
struct ksz_device *dev;
- int ret;
+ int i, ret;
dev = ksz_switch_alloc(&spi->dev, &ksz9477_spi_ops, spi);
if (!dev)
return -ENOMEM;
+ for (i = 0; i < ARRAY_SIZE(ksz9477_regmap_config); i++) {
+ dev->regmap[i] = devm_regmap_init_spi(spi,
+ &ksz9477_regmap_config[i]);
+ if (IS_ERR(dev->regmap[i])) {
+ ret = PTR_ERR(dev->regmap[i]);
+ dev_err(&spi->dev,
+ "Failed to initialize regmap%i: %d\n",
+ ksz9477_regmap_config[i].val_bits, ret);
+ return ret;
+ }
+ }
+
if (spi->dev.platform_data)
dev->pdata = spi->dev.platform_data;
- dev->txbuf = devm_kzalloc(dev->dev, 4 + SPI_TX_BUF_LEN, GFP_KERNEL);
-
ret = ksz9477_switch_register(dev);
/* Main DSA driver may not be started yet. */
diff --git a/drivers/net/dsa/microchip/ksz_priv.h b/drivers/net/dsa/microchip/ksz_priv.h
index d3ddf98156bb..5ccc633fc766 100644
--- a/drivers/net/dsa/microchip/ksz_priv.h
+++ b/drivers/net/dsa/microchip/ksz_priv.h
@@ -57,6 +57,7 @@ struct ksz_device {
const struct ksz_dev_ops *dev_ops;
struct device *dev;
+ struct regmap *regmap[3];
void *priv;
@@ -82,8 +83,6 @@ struct ksz_device {
struct vlan_table *vlan_cache;
- u8 *txbuf;
-
struct ksz_port *ports;
struct timer_list mib_read_timer;
struct work_struct mib_read;
--
2.20.1
^ permalink raw reply related
* [PATCH V3 09/10] net: dsa: microchip: Factor out regmap config generation into common header
From: Marek Vasut @ 2019-06-23 22:35 UTC (permalink / raw)
To: netdev; +Cc: Marek Vasut, Andrew Lunn, Florian Fainelli, Tristram Ha,
Woojung Huh
In-Reply-To: <20190623223508.2713-1-marex@denx.de>
The regmap config tables are rather similar for various generations of
the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating
those tables without duplication. Note that $regalign parameter is not
used right now, but will be used in KSZ87xx series switches.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
---
V2: New patch
V3: - Rebase on next/master
- Test on KSZ9477EVB
- Increase regmap max register, to cover all switch registers
- Make register swabbing configurable, to allow handling switches
with only 16bit registers as well as switches with some 32bit ones
---
drivers/net/dsa/microchip/ksz9477_spi.c | 29 +++-------------------
drivers/net/dsa/microchip/ksz_common.h | 32 +++++++++++++++++++++++++
2 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c
index 8c8bf3237013..5a9e27b337a8 100644
--- a/drivers/net/dsa/microchip/ksz9477_spi.c
+++ b/drivers/net/dsa/microchip/ksz9477_spi.c
@@ -14,37 +14,14 @@
#include <linux/spi/spi.h>
#include "ksz_priv.h"
+#include "ksz_common.h"
#define SPI_ADDR_SHIFT 24
#define SPI_ADDR_ALIGN 3
#define SPI_TURNAROUND_SHIFT 5
-/* SPI frame opcodes */
-#define KS_SPIOP_RD 3
-#define KS_SPIOP_WR 2
-
-#define KS_SPIOP_FLAG_MASK(opcode) \
- cpu_to_be32((opcode) << (SPI_ADDR_SHIFT + SPI_TURNAROUND_SHIFT))
-
-#define KSZ_REGMAP_COMMON(width) \
- { \
- .val_bits = (width), \
- .reg_stride = (width) / 8, \
- .reg_bits = SPI_ADDR_SHIFT + SPI_ADDR_ALIGN, \
- .pad_bits = SPI_TURNAROUND_SHIFT, \
- .max_register = BIT(SPI_ADDR_SHIFT) - 1, \
- .cache_type = REGCACHE_NONE, \
- .read_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_RD), \
- .write_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_WR), \
- .reg_format_endian = REGMAP_ENDIAN_BIG, \
- .val_format_endian = REGMAP_ENDIAN_BIG \
- }
-
-static const struct regmap_config ksz9477_regmap_config[] = {
- KSZ_REGMAP_COMMON(8),
- KSZ_REGMAP_COMMON(16),
- KSZ_REGMAP_COMMON(32),
-};
+KSZ_REGMAP_TABLE(ksz9477, 32, SPI_ADDR_SHIFT,
+ SPI_TURNAROUND_SHIFT, SPI_ADDR_ALIGN);
static int ksz9477_spi_probe(struct spi_device *spi)
{
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index c3871ed9b097..78b5ab7db403 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -133,4 +133,36 @@ static inline u32 ksz_pread32_poll(struct ksz_poll_ctx *ctx)
return data;
}
+/* Regmap tables generation */
+#define KSZ_SPI_OP_RD 3
+#define KSZ_SPI_OP_WR 2
+
+#define KSZ_SPI_OP_FLAG_MASK(opcode, swp, regbits, regpad) \
+ cpu_to_be##swp((opcode) << ((regbits) + (regpad)))
+
+#define KSZ_REGMAP_ENTRY(width, swp, regbits, regpad, regalign) \
+ { \
+ .val_bits = (width), \
+ .reg_stride = (width) / 8, \
+ .reg_bits = (regbits) + (regalign), \
+ .pad_bits = (regpad), \
+ .max_register = BIT(regbits) - 1, \
+ .cache_type = REGCACHE_NONE, \
+ .read_flag_mask = \
+ KSZ_SPI_OP_FLAG_MASK(KSZ_SPI_OP_RD, swp, \
+ regbits, regpad), \
+ .write_flag_mask = \
+ KSZ_SPI_OP_FLAG_MASK(KSZ_SPI_OP_WR, swp, \
+ regbits, regpad), \
+ .reg_format_endian = REGMAP_ENDIAN_BIG, \
+ .val_format_endian = REGMAP_ENDIAN_BIG \
+ }
+
+#define KSZ_REGMAP_TABLE(ksz, swp, regbits, regpad, regalign) \
+ static const struct regmap_config ksz##_regmap_config[] = { \
+ KSZ_REGMAP_ENTRY(8, swp, (regbits), (regpad), (regalign)), \
+ KSZ_REGMAP_ENTRY(16, swp, (regbits), (regpad), (regalign)), \
+ KSZ_REGMAP_ENTRY(32, swp, (regbits), (regpad), (regalign)), \
+ }
+
#endif
--
2.20.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox