* [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single
@ 2024-10-27 9:41 Johan Jonker
2024-10-27 9:42 ` [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support Johan Jonker
2024-10-28 13:03 ` [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Andrew Lunn
0 siblings, 2 replies; 9+ messages in thread
From: Johan Jonker @ 2024-10-27 9:41 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: david.wu, andy.yan, netdev, linux-kernel, linux-rockchip
The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
which has dma_mask, ndev->dev.parent is just pdev->dev.
Or it would cause the following issue:
[ 39.933526] ------------[ cut here ]------------
[ 39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Original:
https://github.com/andyshrk/linux/commit/a98b368ca6ae79d227415c34e4ca39934af08a6f
Changed:
Use dev variable
---
drivers/net/ethernet/arc/emac_main.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 31ee477dd131..8283aeee35fb 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -111,6 +111,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
struct net_device_stats *stats = &ndev->stats;
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < TX_BD_NUM; i++) {
@@ -140,7 +141,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
stats->tx_bytes += skb->len;
}
- dma_unmap_single(&ndev->dev, dma_unmap_addr(tx_buff, addr),
+ dma_unmap_single(dev, dma_unmap_addr(tx_buff, addr),
dma_unmap_len(tx_buff, len), DMA_TO_DEVICE);
/* return the sk_buff to system */
@@ -174,6 +175,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
static int arc_emac_rx(struct net_device *ndev, int budget)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int work_done;
for (work_done = 0; work_done < budget; work_done++) {
@@ -223,9 +225,9 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
continue;
}
- addr = dma_map_single(&ndev->dev, (void *)skb->data,
+ addr = dma_map_single(dev, (void *)skb->data,
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
- if (dma_mapping_error(&ndev->dev, addr)) {
+ if (dma_mapping_error(dev, addr)) {
if (net_ratelimit())
netdev_err(ndev, "cannot map dma buffer\n");
dev_kfree_skb(skb);
@@ -237,7 +239,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
}
/* unmap previosly mapped skb */
- dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr),
+ dma_unmap_single(dev, dma_unmap_addr(rx_buff, addr),
dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE);
pktlen = info & LEN_MASK;
@@ -423,6 +425,7 @@ static int arc_emac_open(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
struct phy_device *phy_dev = ndev->phydev;
+ struct device *dev = ndev->dev.parent;
int i;
phy_dev->autoneg = AUTONEG_ENABLE;
@@ -445,9 +448,9 @@ static int arc_emac_open(struct net_device *ndev)
if (unlikely(!rx_buff->skb))
return -ENOMEM;
- addr = dma_map_single(&ndev->dev, (void *)rx_buff->skb->data,
+ addr = dma_map_single(dev, (void *)rx_buff->skb->data,
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
- if (dma_mapping_error(&ndev->dev, addr)) {
+ if (dma_mapping_error(dev, addr)) {
netdev_err(ndev, "cannot dma map\n");
dev_kfree_skb(rx_buff->skb);
return -ENOMEM;
@@ -548,6 +551,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
static void arc_free_tx_queue(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < TX_BD_NUM; i++) {
@@ -555,7 +559,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
struct buffer_state *tx_buff = &priv->tx_buff[i];
if (tx_buff->skb) {
- dma_unmap_single(&ndev->dev,
+ dma_unmap_single(dev,
dma_unmap_addr(tx_buff, addr),
dma_unmap_len(tx_buff, len),
DMA_TO_DEVICE);
@@ -579,6 +583,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
static void arc_free_rx_queue(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < RX_BD_NUM; i++) {
@@ -586,7 +591,7 @@ static void arc_free_rx_queue(struct net_device *ndev)
struct buffer_state *rx_buff = &priv->rx_buff[i];
if (rx_buff->skb) {
- dma_unmap_single(&ndev->dev,
+ dma_unmap_single(dev,
dma_unmap_addr(rx_buff, addr),
dma_unmap_len(rx_buff, len),
DMA_FROM_DEVICE);
@@ -679,6 +684,7 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
unsigned int len, *txbd_curr = &priv->txbd_curr;
struct net_device_stats *stats = &ndev->stats;
__le32 *info = &priv->txbd[*txbd_curr].info;
+ struct device *dev = ndev->dev.parent;
dma_addr_t addr;
if (skb_padto(skb, ETH_ZLEN))
@@ -692,10 +698,9 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
return NETDEV_TX_BUSY;
}
- addr = dma_map_single(&ndev->dev, (void *)skb->data, len,
- DMA_TO_DEVICE);
+ addr = dma_map_single(dev, (void *)skb->data, len, DMA_TO_DEVICE);
- if (unlikely(dma_mapping_error(&ndev->dev, addr))) {
+ if (unlikely(dma_mapping_error(dev, addr))) {
stats->tx_dropped++;
stats->tx_errors++;
dev_kfree_skb_any(skb);
--
2.39.2
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support
2024-10-27 9:41 [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Johan Jonker
@ 2024-10-27 9:42 ` Johan Jonker
2024-10-27 9:58 ` Andy Yan
2024-10-28 13:03 ` [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Andrew Lunn
1 sibling, 1 reply; 9+ messages in thread
From: Johan Jonker @ 2024-10-27 9:42 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: david.wu, andy.yan, netdev, linux-kernel, linux-rockchip
The binding emac_rockchip.txt is converted to YAML.
Changed against the original binding is an added MDIO subnode.
Fix emac_mdio.c so that it can handle both old and new
device trees.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
drivers/net/ethernet/arc/emac_mdio.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/arc/emac_mdio.c b/drivers/net/ethernet/arc/emac_mdio.c
index 87f40c2ba904..078b1a72c161 100644
--- a/drivers/net/ethernet/arc/emac_mdio.c
+++ b/drivers/net/ethernet/arc/emac_mdio.c
@@ -133,6 +133,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
struct arc_emac_mdio_bus_data *data = &priv->bus_data;
struct device_node *np = priv->dev->of_node;
const char *name = "Synopsys MII Bus";
+ struct device_node *mdio_node;
struct mii_bus *bus;
int error;
@@ -164,7 +165,13 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
snprintf(bus->id, MII_BUS_ID_SIZE, "%s", bus->name);
- error = of_mdiobus_register(bus, priv->dev->of_node);
+ /* Backwards compatibility for EMAC nodes without MDIO subnode. */
+ mdio_node = of_get_child_by_name(np, "mdio");
+ if (!mdio_node)
+ mdio_node = of_node_get(np);
+
+ error = of_mdiobus_register(bus, mdio_node);
+ of_node_put(mdio_node);
if (error) {
mdiobus_free(bus);
return dev_err_probe(priv->dev, error,
--
2.39.2
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re:[PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support
2024-10-27 9:42 ` [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support Johan Jonker
@ 2024-10-27 9:58 ` Andy Yan
2024-10-28 12:59 ` [PATCH " Andrew Lunn
0 siblings, 1 reply; 9+ messages in thread
From: Andy Yan @ 2024-10-27 9:58 UTC (permalink / raw)
To: Johan Jonker
Cc: davem, edumazet, kuba, pabeni, david.wu, andy.yan, netdev,
linux-kernel, linux-rockchip
Hello Johan,
Thanks for your patch. Maybe we need a Fixes tag here?
And for the patch itself:
Tested-by: Andy Yan <andyshrk@163.com>
At 2024-10-27 17:42:45, "Johan Jonker" <jbx6244@gmail.com> wrote:
>The binding emac_rockchip.txt is converted to YAML.
>Changed against the original binding is an added MDIO subnode.
>Fix emac_mdio.c so that it can handle both old and new
>device trees.
>
>Signed-off-by: Johan Jonker <jbx6244@gmail.com>
>---
> drivers/net/ethernet/arc/emac_mdio.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/arc/emac_mdio.c b/drivers/net/ethernet/arc/emac_mdio.c
>index 87f40c2ba904..078b1a72c161 100644
>--- a/drivers/net/ethernet/arc/emac_mdio.c
>+++ b/drivers/net/ethernet/arc/emac_mdio.c
>@@ -133,6 +133,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
> struct arc_emac_mdio_bus_data *data = &priv->bus_data;
> struct device_node *np = priv->dev->of_node;
> const char *name = "Synopsys MII Bus";
>+ struct device_node *mdio_node;
> struct mii_bus *bus;
> int error;
>
>@@ -164,7 +165,13 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
>
> snprintf(bus->id, MII_BUS_ID_SIZE, "%s", bus->name);
>
>- error = of_mdiobus_register(bus, priv->dev->of_node);
>+ /* Backwards compatibility for EMAC nodes without MDIO subnode. */
>+ mdio_node = of_get_child_by_name(np, "mdio");
>+ if (!mdio_node)
>+ mdio_node = of_node_get(np);
>+
>+ error = of_mdiobus_register(bus, mdio_node);
>+ of_node_put(mdio_node);
> if (error) {
> mdiobus_free(bus);
> return dev_err_probe(priv->dev, error,
>--
>2.39.2
>
>
>_______________________________________________
>Linux-rockchip mailing list
>Linux-rockchip@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-rockchip
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support
2024-10-27 9:58 ` Andy Yan
@ 2024-10-28 12:59 ` Andrew Lunn
2024-10-29 8:22 ` Andy Yan
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2024-10-28 12:59 UTC (permalink / raw)
To: Andy Yan
Cc: Johan Jonker, davem, edumazet, kuba, pabeni, david.wu, andy.yan,
netdev, linux-kernel, linux-rockchip
> Hello Johan,
> Thanks for your patch. Maybe we need a Fixes tag here?
What is actually broken?
Andrew
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single
2024-10-27 9:41 [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Johan Jonker
2024-10-27 9:42 ` [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support Johan Jonker
@ 2024-10-28 13:03 ` Andrew Lunn
2024-10-29 14:53 ` Johan Jonker
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2024-10-28 13:03 UTC (permalink / raw)
To: Johan Jonker
Cc: davem, edumazet, kuba, pabeni, david.wu, andy.yan, netdev,
linux-kernel, linux-rockchip
On Sun, Oct 27, 2024 at 10:41:48AM +0100, Johan Jonker wrote:
> The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
> which has dma_mask, ndev->dev.parent is just pdev->dev.
> Or it would cause the following issue:
>
> [ 39.933526] ------------[ cut here ]------------
> [ 39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8
>
> Signed-off-by: David Wu <david.wu@rock-chips.com>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
A few process issues:
For a patch set please add a patch 0/X which explains the big picture
of what the patchset does. For a single patch, you don't need one.
Please read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
It is not clear which tree you intend these patches to be applied
to. This one looks like it should be to net, but needs a Fixes:
tag. The MDIO patch might be for net-next?
Andrew
---
pw-bot: cr
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re:Re: [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support
2024-10-28 12:59 ` [PATCH " Andrew Lunn
@ 2024-10-29 8:22 ` Andy Yan
2024-10-29 12:46 ` Andrew Lunn
0 siblings, 1 reply; 9+ messages in thread
From: Andy Yan @ 2024-10-29 8:22 UTC (permalink / raw)
To: Andrew Lunn
Cc: Johan Jonker, davem, edumazet, kuba, pabeni, david.wu, andy.yan,
netdev, linux-kernel, linux-rockchip
Hi Andrew,
At 2024-10-28 20:59:18, "Andrew Lunn" <andrew@lunn.ch> wrote:
>> Hello Johan,
>> Thanks for your patch. Maybe we need a Fixes tag here?
>
>What is actually broken?
The emac failed to probe after bellow patch merged.
[ 2.324583] loop: module loaded
[ 2.328435] SPI driver spidev has no spi_device_id for rockchip,spidev
[ 2.338688] tun: Universal TUN/TAP device driver, 1.6
[ 2.345397] rockchip_emac 10200000.ethernet: no regulator found
[ 2.351892] rockchip_emac 10200000.ethernet: ARC EMAC detected with id: 0x7fd02
[ 2.359331] rockchip_emac 10200000.ethernet: IRQ is 43
[ 2.364719] rockchip_emac 10200000.ethernet: MAC address is now e6:58:d6:ec:d9:7c
[ 2.396993] mdio_bus Synopsys MII Bus: mdio has invalid PHY address
[ 2.403306] mdio_bus Synopsys MII Bus: scan phy mdio at address 0
[ 2.508656] rockchip_emac 10200000.ethernet: of_phy_connect() failed
[ 2.516334] rockchip_emac 10200000.ethernet: failed to probe arc emac (-19)
commit 1dabb74971b38d966ecef566bafddc4a34f4db9d
Author: Johan Jonker <jbx6244@gmail.com>
Date: Fri Jun 3 18:35:39 2022 +0200
ARM: dts: rockchip: restyle emac nodes
The emac_rockchip.txt file is converted to YAML.
Phy nodes are now a subnode of mdio, so restyle
the emac nodes of rk3036/rk3066/rk3188.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20220603163539.537-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>
> Andrew
>
>_______________________________________________
>Linux-rockchip mailing list
>Linux-rockchip@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-rockchip
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support
2024-10-29 8:22 ` Andy Yan
@ 2024-10-29 12:46 ` Andrew Lunn
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2024-10-29 12:46 UTC (permalink / raw)
To: Andy Yan
Cc: Johan Jonker, davem, edumazet, kuba, pabeni, david.wu, andy.yan,
netdev, linux-kernel, linux-rockchip
On Tue, Oct 29, 2024 at 04:22:16PM +0800, Andy Yan wrote:
>
> Hi Andrew,
>
> At 2024-10-28 20:59:18, "Andrew Lunn" <andrew@lunn.ch> wrote:
> >> Hello Johan,
> >> Thanks for your patch. Maybe we need a Fixes tag here?
> >
> >What is actually broken?
>
> The emac failed to probe after bellow patch merged.
>
> [ 2.324583] loop: module loaded
> [ 2.328435] SPI driver spidev has no spi_device_id for rockchip,spidev
> [ 2.338688] tun: Universal TUN/TAP device driver, 1.6
> [ 2.345397] rockchip_emac 10200000.ethernet: no regulator found
> [ 2.351892] rockchip_emac 10200000.ethernet: ARC EMAC detected with id: 0x7fd02
> [ 2.359331] rockchip_emac 10200000.ethernet: IRQ is 43
> [ 2.364719] rockchip_emac 10200000.ethernet: MAC address is now e6:58:d6:ec:d9:7c
> [ 2.396993] mdio_bus Synopsys MII Bus: mdio has invalid PHY address
> [ 2.403306] mdio_bus Synopsys MII Bus: scan phy mdio at address 0
> [ 2.508656] rockchip_emac 10200000.ethernet: of_phy_connect() failed
> [ 2.516334] rockchip_emac 10200000.ethernet: failed to probe arc emac (-19)
So it is failing to find the PHY, and given the 'mdio has invalid PHY
address' it is probably looking in the wrong node.
The commit message should explain this.
Andrew
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single
2024-10-28 13:03 ` [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Andrew Lunn
@ 2024-10-29 14:53 ` Johan Jonker
2024-10-30 0:19 ` Andy Yan
0 siblings, 1 reply; 9+ messages in thread
From: Johan Jonker @ 2024-10-29 14:53 UTC (permalink / raw)
To: Andrew Lunn, andy.yan
Cc: davem, edumazet, kuba, pabeni, david.wu, netdev, linux-kernel,
linux-rockchip
On 10/28/24 14:03, Andrew Lunn wrote:
> On Sun, Oct 27, 2024 at 10:41:48AM +0100, Johan Jonker wrote:
>> The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
>> which has dma_mask, ndev->dev.parent is just pdev->dev.
>> Or it would cause the following issue:
>>
>> [ 39.933526] ------------[ cut here ]------------
>> [ 39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8
>>
>> Signed-off-by: David Wu <david.wu@rock-chips.com>
>> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
>
> A few process issues:
>
> For a patch set please add a patch 0/X which explains the big picture
> of what the patchset does. For a single patch, you don't need one.
>
> Please read:
>
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>
> It is not clear which tree you intend these patches to be applied
> to. This one looks like it should be to net, but needs a Fixes:
> tag. The MDIO patch might be for net-next?
Hi Andrew, Andy,
My desktop setup has a problem compiling older kernels for rk3066 MK808 to verify.
Are you able to bisect/compile for rk3036 before this one:
====
commit bc0e610a6eb0d46e4123fafdbe5e6141d9fff3be (HEAD -> test1)
Author: Jianglei Nie <niejianglei2021@163.com>
Date: Wed Mar 9 20:18:24 2022 +0800
net: arc_emac: Fix use after free in arc_mdio_probe()
====
This is the oldest EMAC related checkout I can compile.
At that patch it still gives this warnings in the kernel log.
[ 16.678988] ------------[ cut here ]------------
[ 16.684189] WARNING: CPU: 0 PID: 809 at kernel/dma/mapping.c:151 dma_map_page_attrs+0x2b4/0x358
The driver was maintained on auto pilot recent years without a check by Rockchip users somehow.
Currently I don't know where and when this was introduced.
Please advise how to move forward. Should we just mark it net-next?
Johan
>
> Andrew
>
> ---
> pw-bot: cr
>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re:Re: [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single
2024-10-29 14:53 ` Johan Jonker
@ 2024-10-30 0:19 ` Andy Yan
0 siblings, 0 replies; 9+ messages in thread
From: Andy Yan @ 2024-10-30 0:19 UTC (permalink / raw)
To: Johan Jonker
Cc: Andrew Lunn, andy.yan, davem, edumazet, kuba, pabeni, david.wu,
netdev, linux-kernel, linux-rockchip
Hi Johan,
At 2024-10-29 22:53:26, "Johan Jonker" <jbx6244@gmail.com> wrote:
>
>
>On 10/28/24 14:03, Andrew Lunn wrote:
>> On Sun, Oct 27, 2024 at 10:41:48AM +0100, Johan Jonker wrote:
>>> The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
>>> which has dma_mask, ndev->dev.parent is just pdev->dev.
>>> Or it would cause the following issue:
>>>
>>> [ 39.933526] ------------[ cut here ]------------
>>> [ 39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8
>>>
>>> Signed-off-by: David Wu <david.wu@rock-chips.com>
>>> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
>>
>> A few process issues:
>>
>> For a patch set please add a patch 0/X which explains the big picture
>> of what the patchset does. For a single patch, you don't need one.
>>
>> Please read:
>>
>> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>>
>
>> It is not clear which tree you intend these patches to be applied
>> to. This one looks like it should be to net, but needs a Fixes:
>> tag. The MDIO patch might be for net-next?
>
>Hi Andrew, Andy,
>
>My desktop setup has a problem compiling older kernels for rk3066 MK808 to verify.
>
>Are you able to bisect/compile for rk3036 before this one:
I will try to do it in the following days.
>
>====
>commit bc0e610a6eb0d46e4123fafdbe5e6141d9fff3be (HEAD -> test1)
>Author: Jianglei Nie <niejianglei2021@163.com>
>Date: Wed Mar 9 20:18:24 2022 +0800
>
> net: arc_emac: Fix use after free in arc_mdio_probe()
>
>====
>This is the oldest EMAC related checkout I can compile.
>At that patch it still gives this warnings in the kernel log.
>
>[ 16.678988] ------------[ cut here ]------------
>[ 16.684189] WARNING: CPU: 0 PID: 809 at kernel/dma/mapping.c:151 dma_map_page_attrs+0x2b4/0x358
>
>The driver was maintained on auto pilot recent years without a check by Rockchip users somehow.
>Currently I don't know where and when this was introduced.
>Please advise how to move forward. Should we just mark it net-next?
>
>Johan
>
>>
>> Andrew
>>
>> ---
>> pw-bot: cr
>>
>>
>
>_______________________________________________
>Linux-rockchip mailing list
>Linux-rockchip@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-rockchip
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-10-30 0:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27 9:41 [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Johan Jonker
2024-10-27 9:42 ` [PATCH v1 2/2] net: arc: rockchip: fix emac mdio node support Johan Jonker
2024-10-27 9:58 ` Andy Yan
2024-10-28 12:59 ` [PATCH " Andrew Lunn
2024-10-29 8:22 ` Andy Yan
2024-10-29 12:46 ` Andrew Lunn
2024-10-28 13:03 ` [PATCH v1 1/2] ethernet: arc: fix the device for dma_map_single/dma_unmap_single Andrew Lunn
2024-10-29 14:53 ` Johan Jonker
2024-10-30 0:19 ` Andy Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox