aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/xilinx_axienet.h
diff options
context:
space:
mode:
authorRobert Hancock <hancock@sedsystems.ca>2019-06-06 16:28:07 -0600
committerDavid S. Miller <davem@davemloft.net>2019-06-06 16:24:29 -0700
commit88a972d74ea9172a156cdffb6bb30fbb4b1e27c6 (patch)
treeeab4d24bd02ec011337ee153d0bc4092347b42fd /drivers/net/ethernet/xilinx/xilinx_axienet.h
parentnet: axienet: Use standard IO accessors (diff)
downloadlinux-dev-88a972d74ea9172a156cdffb6bb30fbb4b1e27c6.tar.xz
linux-dev-88a972d74ea9172a156cdffb6bb30fbb4b1e27c6.zip
net: axienet: fix MDIO bus naming
The MDIO bus for this driver was being named using the result of of_address_to_resource on a node which may not have any resource on it, but the return value of that call was not checked so it was using some random value in the bus name. Change to name the MDIO bus based on the resource start of the actual Ethernet register block. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet.h')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
index d82e3b63d442..f9078bd7f86f 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
@@ -380,6 +380,7 @@ struct axidma_bd {
* @dev: Pointer to device structure
* @phy_node: Pointer to device node structure
* @mii_bus: Pointer to MII bus structure
+ * @regs_start: Resource start for axienet device addresses
* @regs: Base address for the axienet_local device address space
* @dma_regs: Base address for the axidma device address space
* @dma_err_tasklet: Tasklet structure to process Axi DMA errors
@@ -421,6 +422,7 @@ struct axienet_local {
struct mii_bus *mii_bus; /* MII bus reference */
/* IO registers, dma functions and IRQs */
+ resource_size_t regs_start;
void __iomem *regs;
void __iomem *dma_regs;