Skip to contentSkip to conversation

Fix DMA channel misreporting for the Renesas Ethernet drivers

PATCH In review Sergei Shtylyov 2 participants 7 messages Jul 17, 2016 – Jul 19, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Fix DMA channel misreporting for the Renesas Ethernet drivers

Hello.

Here's a set of 2 patches against DaveM's 'net.git' repo fixing up the DMA
channel reporting by 'ifconfig'...

[1/2] ravb: fix DMA channel misreporting
[2/2] sh_eth: fix DMA channel misreporting

MBR, Sergei

#1 lore raw

PATCH 1/2 ravb: fix DMA channel misreporting

Currently 'ifconfig' for the Ethernet devices handled by this driver shows "DMA chan: ff" while the driver doesn't use any DMA channels. Not assigning a value to 'net_device::dma' causes 'ifconfig' to correctly not report a DMA channel.

---
 drivers/net/ethernet/renesas/ravb_main.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/renesas/ravb_main.c +0 -1
Index: net/drivers/net/ethernet/renesas/ravb_main.c
===================================================================
@@ -1909,7 +1909,6 @@ static int ravb_probe(struct platform_de
 
 	/* The Ether-specific entries in the device structure. */
 	ndev->base_addr = res->start;
-	ndev->dma = -1;
 
 	chip_id = (enum ravb_chip_id)of_device_get_match_data(&pdev->dev);
 
#2 lore raw

PATCH 2/2 sh_eth: fix DMA channel misreporting

In reply to Sergei Shtylyov

Currently 'ifconfig' for the Ethernet devices handled by this driver shows "DMA chan: ff" while the driver doesn't use any DMA channels. Not assigning a value to 'net_device::dma' causes 'ifconfig' to correctly not report a DMA channel.

---
 drivers/net/ethernet/renesas/sh_eth.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/renesas/sh_eth.c +0 -1
Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
@@ -2996,7 +2996,6 @@ static int sh_eth_drv_probe(struct platf
 	if (devno < 0)
 		devno = 0;
 
-	ndev->dma = -1;
 	ret = platform_get_irq(pdev, 0);
 	if (ret < 0)
 		goto out_release;
maintainer
#3 lore raw
In reply to Sergei Shtylyov

From: Sergei Shtylyov <[email protected]>
Date: Sun, 17 Jul 2016 16:06:24 +0300

Quoted 2 lines

Here's a set of 2 patches against DaveM's 'net.git' repo fixing
up the DMA channel reporting by 'ifconfig'...

Is some fixing some ifconfig output that is effectively meaningless appropriate for 'net'? Sounds like 'net-next' material to me.

#4 lore raw

Hello.

Quoted 5 lines · David Miller
Quoted 2 lines

Here's a set of 2 patches against DaveM's 'net.git' repo fixing
up the DMA channel reporting by 'ifconfig'...

Is some fixing some ifconfig output that is effectively meaningless appropriate for 'net'?

I just don't know any more users of SIOCGIFMAP ioctl... ip? It seems to also be used in net/core/rtnetlink.c...

Quoted 1 line

Sounds like 'net-next' material to me.

Up to you, of course.

MBR, Sergei

maintainer
#5 lore raw

From: Sergei Shtylyov <[email protected]>
Date: Mon, 18 Jul 2016 17:13:02 +0300

Quoted 4 lines

Hello.

On 07/18/2016 09:24 AM, David Miller wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Here's a set of 2 patches against DaveM's 'net.git' repo fixing
up the DMA channel reporting by 'ifconfig'...

Is some fixing some ifconfig output that is effectively meaningless appropriate for 'net'?

I just don't know any more users of SIOCGIFMAP ioctl... ip? It seems to also be used in net/core/rtnetlink.c...

Who cares who uses it. The important thing to ask is what in the world could they do with the value?

DMA masks have no meaning or usage since ISA times.