diff options
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/hwif.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c index 14770fc8865e..1f50e83cafb2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/hwif.c +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c | |||
| @@ -252,13 +252,8 @@ int stmmac_hwif_init(struct stmmac_priv *priv) | |||
| 252 | return ret; | 252 | return ret; |
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | /* Run quirks, if needed */ | 255 | /* Save quirks, if needed for posterior use */ |
| 256 | if (entry->quirks) { | 256 | priv->hwif_quirks = entry->quirks; |
| 257 | ret = entry->quirks(priv); | ||
| 258 | if (ret) | ||
| 259 | return ret; | ||
| 260 | } | ||
| 261 | |||
| 262 | return 0; | 257 | return 0; |
| 263 | } | 258 | } |
| 264 | 259 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 025efbf6145c..76649adf8fb0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h | |||
| @@ -129,6 +129,7 @@ struct stmmac_priv { | |||
| 129 | struct net_device *dev; | 129 | struct net_device *dev; |
| 130 | struct device *device; | 130 | struct device *device; |
| 131 | struct mac_device_info *hw; | 131 | struct mac_device_info *hw; |
| 132 | int (*hwif_quirks)(struct stmmac_priv *priv); | ||
| 132 | struct mutex lock; | 133 | struct mutex lock; |
| 133 | 134 | ||
| 134 | /* RX Queue */ | 135 | /* RX Queue */ |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 5e6d4fe2f4ef..e79b0d7b388a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
| @@ -4135,6 +4135,13 @@ static int stmmac_hw_init(struct stmmac_priv *priv) | |||
| 4135 | if (priv->dma_cap.tsoen) | 4135 | if (priv->dma_cap.tsoen) |
| 4136 | dev_info(priv->device, "TSO supported\n"); | 4136 | dev_info(priv->device, "TSO supported\n"); |
| 4137 | 4137 | ||
| 4138 | /* Run HW quirks, if any */ | ||
| 4139 | if (priv->hwif_quirks) { | ||
| 4140 | ret = priv->hwif_quirks(priv); | ||
| 4141 | if (ret) | ||
| 4142 | return ret; | ||
| 4143 | } | ||
| 4144 | |||
| 4138 | return 0; | 4145 | return 0; |
| 4139 | } | 4146 | } |
| 4140 | 4147 | ||
