@@ -253,6 +253,7 @@ struct xgbe_hw_stats {
u32 rx_mof_overruns;
u32 rx_dma_overruns;
};
+
#define XGBE10_NUM_STAT_ENTRIES (sizeof(struct xgbe_hw_stats)/sizeof(u32))
struct gbe_ss_regs {
@@ -264,12 +265,12 @@ struct gbe_ss_regs {
u32 rx_en;
u32 tx_en;
u32 misc_en;
- u32 mem_allign1[8];
+ u32 mem_align1[8];
u32 rx_thresh_stat;
u32 rx_stat;
u32 tx_stat;
u32 misc_stat;
- u32 mem_allign2[8];
+ u32 mem_align2[8];
u32 rx_imax;
u32 tx_imax;
};
@@ -398,6 +399,7 @@ struct gbe_hw_stats {
u32 rx_mof_overruns;
u32 rx_dma_overruns;
};
+
#define GBE13_NUM_HW_STAT_ENTRIES (sizeof(struct gbe_hw_stats)/sizeof(u32))
#define GBE13_NUM_HW_STATS_MOD 2
#define XGBE10_NUM_HW_STATS_MOD 3
@@ -1188,7 +1190,6 @@ static void gbe_slave_stop(struct gbe_intf *intf)
cpsw_ale_del_mcast(gbe_dev->ale, intf->ndev->broadcast,
1 << slave->port_num, 0, 0);
-
if (!slave->phy)
return;
@@ -1253,12 +1254,11 @@ static int gbe_slave_open(struct gbe_intf *gbe_intf)
dev_err(priv->dev, "phy not found on slave %d\n",
slave->slave_num);
return -ENODEV;
- } else {
- dev_dbg(priv->dev, "phy found: id is: 0x%s\n",
- dev_name(&slave->phy->dev));
- phy_start(slave->phy);
- phy_read_status(slave->phy);
}
+ dev_dbg(priv->dev, "phy found: id is: 0x%s\n",
+ dev_name(&slave->phy->dev));
+ phy_start(slave->phy);
+ phy_read_status(slave->phy);
}
return 0;
}
@@ -1501,7 +1501,6 @@ static int gbe_open(void *intf_priv, struct net_device *ndev)
else
gbe_intf->tx_pipe.dma_psflags = port_num;
-
dev_dbg(gbe_dev->dev, "opened TX channel %s: %p with psflags %d\n",
gbe_intf->tx_pipe.dma_chan_name,
gbe_intf->tx_pipe.dma_channel,
@@ -1557,7 +1556,7 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave,
u32 port_reg_ofs, emac_reg_ofs;
if (of_property_read_u32(node, "slave-port", &slave->slave_num)) {
- dev_err(gbe_dev->dev, "missing slave-port paramater\n");
+ dev_err(gbe_dev->dev, "missing slave-port parameter\n");
return -EINVAL;
}
@@ -1906,10 +1905,8 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
}
gbe_dev = devm_kzalloc(dev, sizeof(struct gbe_priv), GFP_KERNEL);
- if (!gbe_dev) {
- dev_err(dev, "gbe_dev memory allocation failed\n");
+ if (!gbe_dev)
return -ENOMEM;
- }
gbe_dev->dev = dev;
gbe_dev->netcp_device = netcp_device;
@@ -2053,10 +2050,9 @@ static int gbe_attach(void *inst_priv, struct net_device *ndev,
}
gbe_intf = devm_kzalloc(gbe_dev->dev, sizeof(*gbe_intf), GFP_KERNEL);
- if (!gbe_intf) {
- dev_err(gbe_dev->dev, "gbe interface memory allocation failed\n");
+ if (!gbe_intf)
return -ENOMEM;
- }
+
gbe_intf->ndev = ndev;
gbe_intf->dev = gbe_dev->dev;
gbe_intf->gbe_dev = gbe_dev;
@@ -2065,7 +2061,6 @@ static int gbe_attach(void *inst_priv, struct net_device *ndev,
sizeof(*gbe_intf->slave),
GFP_KERNEL);
if (!gbe_intf->slave) {
- dev_err(gbe_dev->dev, "gbe interface slave memory allocation failed\n");
ret = -ENOMEM;
goto fail;
}