smsc75xx: declare smsc75xx's MII as GMII capable
authorSteve Glendinning <steve.glendinning@shawell.net>
Mon, 30 Apr 2012 07:56:55 +0000 (07:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 May 2012 01:52:42 +0000 (21:52 -0400)
also explicitly set the phy to advertise 1000 speeds

Signed-off-by: Stephane Fillod <fillods@users.sf.net>
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc75xx.c

index 4941782358ef04746f2900f5e7df91487b761f48..ae23d85a973aa142d320571d7f0c282bcfde0ac6 100644 (file)
@@ -652,6 +652,7 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
        dev->mii.mdio_write = smsc75xx_mdio_write;
        dev->mii.phy_id_mask = 0x1f;
        dev->mii.reg_num_mask = 0x1f;
+       dev->mii.supports_gmii = 1;
        dev->mii.phy_id = SMSC75XX_INTERNAL_PHY_ID;
 
        /* reset phy and wait for reset to complete */
@@ -672,6 +673,8 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
        smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
                ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
                ADVERTISE_PAUSE_ASYM);
+       smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_CTRL1000,
+               ADVERTISE_1000FULL);
 
        /* read and write to clear phy interrupt status */
        ret = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC);