]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/smsc911x.c
V4L/DVB (11154): pvrusb2: Split i2c module handling from i2c adapter
[linux-2.6-omap-h63xx.git] / drivers / net / smsc911x.c
index d61514698bb3a02571dcae028161e87a4041bbcf..af8f60ca0f57235f57abdb82cea9437b03d2d804 100644 (file)
@@ -1225,6 +1225,10 @@ static int smsc911x_open(struct net_device *dev)
        dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n",
                 (unsigned long)pdata->ioaddr, dev->irq);
 
+       /* Reset the last known duplex and carrier */
+       pdata->last_duplex = -1;
+       pdata->last_carrier = -1;
+
        /* Bring the PHY up */
        phy_start(pdata->phy_dev);
 
@@ -1676,6 +1680,7 @@ static int smsc911x_eeprom_write_location(struct smsc911x_data *pdata,
                                          u8 address, u8 data)
 {
        u32 op = E2P_CMD_EPC_CMD_ERASE_ | address;
+       u32 temp;
        int ret;
 
        SMSC_TRACE(DRV, "address 0x%x, data 0x%x", address, data);
@@ -1684,6 +1689,10 @@ static int smsc911x_eeprom_write_location(struct smsc911x_data *pdata,
        if (!ret) {
                op = E2P_CMD_EPC_CMD_WRITE_ | address;
                smsc911x_reg_write(pdata, E2P_DATA, (u32)data);
+
+               /* Workaround for hardware read-after-write restriction */
+               temp = smsc911x_reg_read(pdata, BYTE_TEST);
+
                ret = smsc911x_eeprom_send_cmd(pdata, op);
        }