History

eth: fec: Fix lost promiscuous mode after reconnecting cable

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.

Stefan Wahren committed 12 years ago

Commit 84fe6181 parent fb00bc21 file · +7 −7Browse files

Unified · Split

drivers/net/ethernet/freescale/fec_main.c+7−7
@@ -528,13 +528,6 @@ fec_restart(struct net_device *ndev, int duplex) · 527 unmodified lines
528528 /* Clear any outstanding interrupt. */
529529 writel(0xffc00000, fep->hwp + FEC_IEVENT);
530530
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−
538531 /* Set maximum receive buffer size. */
539532 writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE);
540533
@@ -655,6 +648,13 @@ fec_restart(struct net_device *ndev, int duplex) · 114 unmodified lines
655648
656649 writel(rcntl, fep->hwp + FEC_R_CNTRL);
657650
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+
658658 if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) {
659659 /* enable ENET endian swap */
660660 ecntl |= (1 << 8);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t