mac-fec.c was setting individual UDP address registers instead of multicast group address registers when joining a multicast group. This prevented from correctly receiving UDP multicast packets. According to datasheet, replaced hash_table_high and hash_table_low with grp_hash_table_high and grp_hash_table_low respectively. Also renamed hash_table_* with grp_hash_table_* in struct fec declaration for 8xx: these registers are used only for multicast there. Tested on a MPC5121 based board. Build tested also against mpc866_ads_defconfig.
Unified · Split
| @@ -393,8 +393,8 @@ typedef struct fec { · 392 unmodified lines | |||
| 393 | uint fec_addr_low; /* lower 32 bits of station address */ | 393 | uint fec_addr_low; /* lower 32 bits of station address */ |
| 394 | ushort fec_addr_high; /* upper 16 bits of station address */ | 394 | ushort fec_addr_high; /* upper 16 bits of station address */ |
| 395 | ushort res1; /* reserved */ | 395 | ushort res1; /* reserved */ |
| 396 | uint fec_hash_table_high; /* upper 32-bits of hash table */ | 396 | uint fec_grp_hash_table_high; /* upper 32-bits of hash table */ |
| 397 | uint fec_hash_table_low; /* lower 32-bits of hash table */ | 397 | uint fec_grp_hash_table_low; /* lower 32-bits of hash table */ |
| 398 | uint fec_r_des_start; /* beginning of Rx descriptor ring */ | 398 | uint fec_r_des_start; /* beginning of Rx descriptor ring */ |
| 399 | uint fec_x_des_start; /* beginning of Tx descriptor ring */ | 399 | uint fec_x_des_start; /* beginning of Tx descriptor ring */ |
| 400 | uint fec_r_buff_size; /* Rx buffer size */ | 400 | uint fec_r_buff_size; /* Rx buffer size */ |
| @@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev) · 225 unmodified lines | |||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | FC(fecp, r_cntrl, FEC_RCNTRL_PROM); | 228 | FC(fecp, r_cntrl, FEC_RCNTRL_PROM); |
| 229 | FW(fecp, hash_table_high, fep->fec.hthi); | 229 | FW(fecp, grp_hash_table_high, fep->fec.hthi); |
| 230 | FW(fecp, hash_table_low, fep->fec.htlo); | 230 | FW(fecp, grp_hash_table_low, fep->fec.htlo); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static void set_multicast_list(struct net_device *dev) | 233 | static void set_multicast_list(struct net_device *dev) |
| @@ -273,8 +273,8 @@ static void restart(struct net_device *dev) · 39 unmodified lines | |||
| 273 | /* | 273 | /* |
| 274 | * Reset all multicast. | 274 | * Reset all multicast. |
| 275 | */ | 275 | */ |
| 276 | FW(fecp, hash_table_high, fep->fec.hthi); | 276 | FW(fecp, grp_hash_table_high, fep->fec.hthi); |
| 277 | FW(fecp, hash_table_low, fep->fec.htlo); | 277 | FW(fecp, grp_hash_table_low, fep->fec.htlo); |
| 278 | 278 | ||
| 279 | /* | 279 | /* |
| 280 | * Set maximum receive buffer size. | 280 | * Set maximum receive buffer size. |