.. | .. |
---|
288 | 288 | val &= ~NSS_COMMON_GMAC_CTL_PHY_IFACE_SEL; |
---|
289 | 289 | break; |
---|
290 | 290 | default: |
---|
291 | | - goto err_unsupported_phy; |
---|
| 291 | + dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n", |
---|
| 292 | + phy_modes(gmac->phy_mode)); |
---|
| 293 | + err = -EINVAL; |
---|
| 294 | + goto err_remove_config_dt; |
---|
292 | 295 | } |
---|
293 | 296 | regmap_write(gmac->nss_common, NSS_COMMON_GMAC_CTL(gmac->id), val); |
---|
294 | 297 | |
---|
.. | .. |
---|
305 | 308 | NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id); |
---|
306 | 309 | break; |
---|
307 | 310 | default: |
---|
308 | | - goto err_unsupported_phy; |
---|
| 311 | + dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n", |
---|
| 312 | + phy_modes(gmac->phy_mode)); |
---|
| 313 | + err = -EINVAL; |
---|
| 314 | + goto err_remove_config_dt; |
---|
309 | 315 | } |
---|
310 | 316 | regmap_write(gmac->nss_common, NSS_COMMON_CLK_SRC_CTRL, val); |
---|
311 | 317 | |
---|
.. | .. |
---|
322 | 328 | NSS_COMMON_CLK_GATE_GMII_TX_EN(gmac->id); |
---|
323 | 329 | break; |
---|
324 | 330 | default: |
---|
325 | | - goto err_unsupported_phy; |
---|
| 331 | + /* We don't get here; the switch above will have errored out */ |
---|
| 332 | + unreachable(); |
---|
326 | 333 | } |
---|
327 | 334 | regmap_write(gmac->nss_common, NSS_COMMON_CLK_GATE, val); |
---|
328 | 335 | |
---|
.. | .. |
---|
344 | 351 | plat_dat->bsp_priv = gmac; |
---|
345 | 352 | plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; |
---|
346 | 353 | plat_dat->multicast_filter_bins = 0; |
---|
347 | | - plat_dat->tx_fifo_size = 8192; |
---|
348 | | - plat_dat->rx_fifo_size = 8192; |
---|
349 | 354 | |
---|
350 | 355 | err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); |
---|
351 | 356 | if (err) |
---|
352 | 357 | goto err_remove_config_dt; |
---|
353 | 358 | |
---|
354 | 359 | return 0; |
---|
355 | | - |
---|
356 | | -err_unsupported_phy: |
---|
357 | | - dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n", |
---|
358 | | - phy_modes(gmac->phy_mode)); |
---|
359 | | - err = -EINVAL; |
---|
360 | 360 | |
---|
361 | 361 | err_remove_config_dt: |
---|
362 | 362 | stmmac_remove_config_dt(pdev, plat_dat); |
---|