diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/rtl8169.c | 14 | ||||
-rw-r--r-- | drivers/qe/qe.c | 2 | ||||
-rw-r--r-- | drivers/qe/uec_phy.c | 11 |
3 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index d71323f..d39ac7c 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -247,6 +247,15 @@ static struct { } rtl_chip_info[] = { {"RTL-8169", 0x00, 0xff7e1880,}, {"RTL-8169", 0x04, 0xff7e1880,}, + {"RTL-8169", 0x00, 0xff7e1880,}, + {"RTL-8169s/8110s", 0x02, 0xff7e1880,}, + {"RTL-8169s/8110s", 0x04, 0xff7e1880,}, + {"RTL-8169sb/8110sb", 0x10, 0xff7e1880,}, + {"RTL-8169sc/8110sc", 0x18, 0xff7e1880,}, + {"RTL-8168b/8111sb", 0x30, 0xff7e1880,}, + {"RTL-8168b/8111sb", 0x38, 0xff7e1880,}, + {"RTL-8101e", 0x34, 0xff7e1880,}, + {"RTL-8100e", 0x32, 0xff7e1880,}, }; enum _DescStatusBit { @@ -312,6 +321,7 @@ static const unsigned int rtl8169_rx_config = (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); static struct pci_device_id supported[] = { + {PCI_VENDOR_ID_REALTEK, 0x8167}, {PCI_VENDOR_ID_REALTEK, 0x8169}, {} }; @@ -433,6 +443,10 @@ static int rtl_recv(struct eth_device *dev) tpc->cur_rx = cur_rx; return 1; + } else { + ushort sts = RTL_R8(IntrStatus); + RTL_W8(IntrStatus, sts & ~(TxErr | RxErr | SYSErr)); + udelay(100); /* wait */ } tpc->cur_rx = cur_rx; return (0); /* initially as this is called to flush the input */ diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 63acfa3..7b6ecd7 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -334,7 +334,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) } /* Validate some of the fields */ - if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) { + if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) { printf("Invalid data\n"); return -EINVAL; } diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index c549b6b..a42701c 100644 --- a/drivers/qe/uec_phy.c +++ b/drivers/qe/uec_phy.c @@ -290,6 +290,7 @@ static int genmii_update_link (struct uec_mii_info *mii_info) return 0; } + i++; udelay(1000); /* 1 ms */ status = phy_read(mii_info, PHY_BMSR); } @@ -574,9 +575,10 @@ void marvell_phy_interface_mode (struct eth_device *dev, { uec_private_t *uec = (uec_private_t *) dev->priv; struct uec_mii_info *mii_info; + u16 status; if (!uec->mii_info) { - printf ("%s: the PHY not intialized\n", __FUNCTION__); + printf ("%s: the PHY not initialized\n", __FUNCTION__); return; } mii_info = uec->mii_info; @@ -609,6 +611,13 @@ void marvell_phy_interface_mode (struct eth_device *dev, phy_write (mii_info, 0x00, 0x8100); udelay (1000000); } + + /* handle 88e1111 rev.B2 erratum 5.6 */ + if (mii_info->autoneg) { + status = phy_read (mii_info, PHY_BMCR); + phy_write (mii_info, PHY_BMCR, status | PHY_BMCR_AUTON); + } + /* now the B2 will correctly report autoneg completion status */ } void change_phy_interface_mode (struct eth_device *dev, enet_interface_e mode) |