If the Freescale fec is in promiscuous mode and network cable is reconnected then the promiscuous mode get lost. The problem is caused by a too soon call of set_multicast_list to re-enable promisc mode. The FEC_R_CNTRL register changes are overwritten by fec_restart. This patch fixes this by moving the call behind the init of FEC_R_CNTRL register in fec_restart. Successful tested on a i.MX28 board.
Unified · Split
| @@ -528,13 +528,6 @@ fec_restart(struct net_device *ndev, int duplex) · 527 unmodified lines | |||
| 528 | /* Clear any outstanding interrupt. */ | 528 | /* Clear any outstanding interrupt. */ |
| 529 | writel(0xffc00000, fep->hwp + FEC_IEVENT); | 529 | writel(0xffc00000, fep->hwp + FEC_IEVENT); |
| 530 | 530 | ||
| 531 | /* Setup multicast filter. */ | ||
| 532 | set_multicast_list(ndev); | ||
| 533 | #ifndef CONFIG_M5272 | ||
| 534 | writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); | ||
| 535 | writel(0, fep->hwp + FEC_HASH_TABLE_LOW); | ||
| 536 | #endif | ||
| 537 | |||
| 538 | /* Set maximum receive buffer size. */ | 531 | /* Set maximum receive buffer size. */ |
| 539 | writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE); | 532 | writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE); |
| 540 | 533 | ||
| @@ -655,6 +648,13 @@ fec_restart(struct net_device *ndev, int duplex) · 114 unmodified lines | |||
| 655 | 648 | ||
| 656 | writel(rcntl, fep->hwp + FEC_R_CNTRL); | 649 | writel(rcntl, fep->hwp + FEC_R_CNTRL); |
| 657 | 650 | ||
| 651 | /* Setup multicast filter. */ | ||
| 652 | set_multicast_list(ndev); | ||
| 653 | #ifndef CONFIG_M5272 | ||
| 654 | writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); | ||
| 655 | writel(0, fep->hwp + FEC_HASH_TABLE_LOW); | ||
| 656 | #endif | ||
| 657 | |||
| 658 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) { | 658 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) { |
| 659 | /* enable ENET endian swap */ | 659 | /* enable ENET endian swap */ |
| 660 | ecntl |= (1 << 8); | 660 | ecntl |= (1 << 8); |