From f655adef65e4cf6b929054b049ee19ae9b5ccbe2 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Wed, 27 Feb 2008 15:06:39 -0600 Subject: net: uec_phy: handle 88e1111 rev.B2 erratum 5.6 erratum 5.6 states the autoneg completion bit is functional only if the autoneg bit is asserted. This fixes any secondarily-issued networking commands on non-gigabit links on the mpc8360 mds board. Signed-off-by: Kim Phillips --- drivers/qe/uec_phy.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers') diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index c549b6b..cf9921b 100644 --- a/drivers/qe/uec_phy.c +++ b/drivers/qe/uec_phy.c @@ -574,6 +574,7 @@ 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__); @@ -609,6 +610,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) -- cgit v1.1 From 491fb6dea9f52fdb9cb5996e8e978b9e9685179f Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Mon, 3 Mar 2008 09:58:52 -0600 Subject: fix QE firmware uploading limit Fix a typo in qe_upload_firmware() that prevented uploading firmware on systems with more than one RISC core. Signed-off-by: Timur Tabi --- drivers/qe/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') 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; } -- cgit v1.1 From f30b6154f16f5ffa4a9f5bfca5e114d72b6ef675 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Wed, 27 Feb 2008 16:08:22 -0600 Subject: net: uec_phy: actually increment the timeout counter allow u-boot to recover (and, e.g., switch to another interface) in the case where a PHY does not report autonegotiation is complete within its two second timeout value. Signed-off-by: Kim Phillips --- drivers/qe/uec_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index cf9921b..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); } @@ -577,7 +578,7 @@ void marvell_phy_interface_mode (struct eth_device *dev, 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; -- cgit v1.1 From d75469d48c05795144f4b8ba76addbb4920a7bba Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Sat, 8 Mar 2008 09:25:49 +0900 Subject: net: rtl8169: Add processing when OWNbit did't enable in rtl_recv() When rtl_recv() of rtl8169 is called, OWNbit of status register is not enable occasionally. rtl_recv() doesn't work normally when the driver doesn't do appropriate processing. This patch fix this problem. Signed-off-by: Nobuhiro Iwamatsu --- drivers/net/rtl8169.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers') 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 */ -- cgit v1.1