Changeset 18886


Ignore:
Timestamp:
04/01/12 04:18:18 (14 months ago)
Author:
BrainSlayer
Message:

fix switch driver bug (thx nbd)

Location:
src/linux/universal
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag71xx/ag71xx_ar7240.c

    r18801 r18886  
    291291        u8 ver; 
    292292        bool vlan; 
     293        bool init; 
    293294        u16 vlan_id[AR7240_MAX_VLANS]; 
    294295        u8 vlan_table[AR7240_MAX_VLANS]; 
     
    864865 
    865866        memset(portmask, 0, sizeof(portmask)); 
    866         if (as->vlan) { 
     867        if (!as->init) { 
    867868                /* calculate the port destination masks and load vlans 
    868869                 * into the vlan translation unit */ 
     
    907908{ 
    908909        struct ar7240sw *as = sw_to_ar7240(dev); 
     910        as->init = false; 
    909911        ar7240sw_reset(as); 
    910912        return 0; 
     
    10951097 
    10961098        as->vlan_table[0] = ar7240sw_port_mask_all(as); 
     1099        as->init = true; 
    10971100 
    10981101        return as; 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag934x/ag71xx_ar7240.c

    r18801 r18886  
    291291        u8 ver; 
    292292        bool vlan; 
     293        bool init; 
    293294        u16 vlan_id[AR7240_MAX_VLANS]; 
    294295        u8 vlan_table[AR7240_MAX_VLANS]; 
     
    864865 
    865866        memset(portmask, 0, sizeof(portmask)); 
    866         if (as->vlan) { 
     867        if (!as->init) { 
    867868                /* calculate the port destination masks and load vlans 
    868869                 * into the vlan translation unit */ 
     
    907908{ 
    908909        struct ar7240sw *as = sw_to_ar7240(dev); 
     910        as->init = false; 
    909911        ar7240sw_reset(as); 
    910912        return 0; 
     
    10951097 
    10961098        as->vlan_table[0] = ar7240sw_port_mask_all(as); 
     1099        as->init = true; 
    10971100 
    10981101        return as; 
  • src/linux/universal/linux-3.3/drivers/net/ethernet/ag71xx/ag71xx_ar7240.c

    r18801 r18886  
    291291        u8 ver; 
    292292        bool vlan; 
     293        bool init; 
    293294        u16 vlan_id[AR7240_MAX_VLANS]; 
    294295        u8 vlan_table[AR7240_MAX_VLANS]; 
     
    864865 
    865866        memset(portmask, 0, sizeof(portmask)); 
    866         if (as->vlan) { 
     867        if (!as->init) { 
    867868                /* calculate the port destination masks and load vlans 
    868869                 * into the vlan translation unit */ 
     
    907908{ 
    908909        struct ar7240sw *as = sw_to_ar7240(dev); 
     910        as->init = false; 
    909911        ar7240sw_reset(as); 
    910912        return 0; 
     
    10951097 
    10961098        as->vlan_table[0] = ar7240sw_port_mask_all(as); 
     1099        as->init = true; 
    10971100 
    10981101        return as; 
  • src/linux/universal/linux-3.3/drivers/net/ethernet/ag934x/ag71xx_ar7240.c

    r18801 r18886  
    291291        u8 ver; 
    292292        bool vlan; 
     293        bool init; 
    293294        u16 vlan_id[AR7240_MAX_VLANS]; 
    294295        u8 vlan_table[AR7240_MAX_VLANS]; 
     
    864865 
    865866        memset(portmask, 0, sizeof(portmask)); 
    866         if (as->vlan) { 
     867        if (!as->init) { 
    867868                /* calculate the port destination masks and load vlans 
    868869                 * into the vlan translation unit */ 
     
    907908{ 
    908909        struct ar7240sw *as = sw_to_ar7240(dev); 
     910        as->init = false; 
    909911        ar7240sw_reset(as); 
    910912        return 0; 
     
    10951097 
    10961098        as->vlan_table[0] = ar7240sw_port_mask_all(as); 
     1099        as->init = true; 
    10971100 
    10981101        return as; 
Note: See TracChangeset for help on using the changeset viewer.