Changeset 35582


Ignore:
Timestamp:
2013-02-13T17:03:47+01:00 (5 years ago)
Author:
hauke
Message:

switch: fix switches with more than 6 ports

This is based on a patch by jcharest and the Broadcom SDK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/switch/src/switch-robo.c

    r35581 r35582  
    7979        struct ifreq ifr; 
    8080        struct net_device *dev; 
    81         unsigned char port[6]; 
     81        unsigned char port[9]; 
    8282}; 
    8383 
     
    309309 
    310310        robo.device = devname; 
    311         for (i = 0; i < 5; i++) 
    312                 robo.port[i] = i; 
    313         robo.port[5] = 8; 
    314311 
    315312        /* try access using MII ioctls - get phy address */ 
     
    387384 
    388385        robo.gmii = robo_gmii(); 
     386        if (robo.devid == ROBO_DEVICE_ID_5325) { 
     387                for (i = 0; i < 5; i++) 
     388                        robo.port[i] = i; 
     389        } else { 
     390                for (i = 0; i < 8; i++) 
     391                        robo.port[i] = i; 
     392        } 
     393        robo.port[i] = ROBO_IM_PORT_CTRL; 
    389394 
    390395        robo_switch_reset(); 
Note: See TracChangeset for help on using the changeset viewer.