.. | .. |
---|
528 | 528 | case 100: |
---|
529 | 529 | tmp_reg16 |= IF_MODE_SGMII_SPEED_100M; |
---|
530 | 530 | break; |
---|
531 | | - case 1000: /* fallthrough */ |
---|
| 531 | + case 1000: |
---|
532 | 532 | default: |
---|
533 | 533 | tmp_reg16 |= IF_MODE_SGMII_SPEED_1G; |
---|
534 | 534 | break; |
---|
.. | .. |
---|
596 | 596 | |
---|
597 | 597 | static int check_init_parameters(struct fman_mac *memac) |
---|
598 | 598 | { |
---|
599 | | - if (memac->addr == 0) { |
---|
600 | | - pr_err("Ethernet MAC must have a valid MAC address\n"); |
---|
601 | | - return -EINVAL; |
---|
602 | | - } |
---|
603 | 599 | if (!memac->exception_cb) { |
---|
604 | 600 | pr_err("Uninitialized exception handler\n"); |
---|
605 | 601 | return -EINVAL; |
---|
.. | .. |
---|
782 | 778 | /* Set full duplex */ |
---|
783 | 779 | tmp &= ~IF_MODE_HD; |
---|
784 | 780 | |
---|
785 | | - if (memac->phy_if == PHY_INTERFACE_MODE_RGMII) { |
---|
| 781 | + if (phy_interface_mode_is_rgmii(memac->phy_if)) { |
---|
786 | 782 | /* Configure RGMII in manual mode */ |
---|
787 | 783 | tmp &= ~IF_MODE_RGMII_AUTO; |
---|
788 | 784 | tmp &= ~IF_MODE_RGMII_SP_MASK; |
---|
.. | .. |
---|
1056 | 1052 | } |
---|
1057 | 1053 | |
---|
1058 | 1054 | /* MAC Address */ |
---|
1059 | | - MAKE_ENET_ADDR_FROM_UINT64(memac->addr, eth_addr); |
---|
1060 | | - add_addr_in_paddr(memac->regs, (u8 *)eth_addr, 0); |
---|
| 1055 | + if (memac->addr != 0) { |
---|
| 1056 | + MAKE_ENET_ADDR_FROM_UINT64(memac->addr, eth_addr); |
---|
| 1057 | + add_addr_in_paddr(memac->regs, (u8 *)eth_addr, 0); |
---|
| 1058 | + } |
---|
1061 | 1059 | |
---|
1062 | 1060 | fixed_link = memac_drv_param->fixed_link; |
---|
1063 | 1061 | |
---|