summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/4xx_enet.c2
-rw-r--r--drivers/net/designware.c6
-rw-r--r--drivers/net/fec_mxc.c6
-rw-r--r--drivers/net/greth.c2
-rw-r--r--drivers/net/natsemi.c2
-rw-r--r--drivers/net/netarm_eth.c12
-rw-r--r--drivers/net/ns8382x.c2
-rw-r--r--drivers/net/phy/generic_10g.c8
-rw-r--r--drivers/net/smc911x.h2
9 files changed, 27 insertions, 15 deletions
diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index b1763b1..e616aaf 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1704,7 +1704,7 @@ int enetInt (struct eth_device *dev)
rc = 0;
}
- /* handle MAL RX EOB interupt from a receive */
+ /* handle MAL RX EOB interrupt from a receive */
/* check for EOB on valid channels */
if (uic_mal & UIC_MAL_RXEOB) {
mal_eob = mfdcr(MAL0_RXEOBISR);
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 3f5eeb7..bfa4384 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -368,11 +368,13 @@ static int configure_phy(struct eth_device *dev)
{
struct dw_eth_dev *priv = dev->priv;
int phy_addr;
- u16 bmcr, ctrl;
+ u16 bmcr;
#if defined(CONFIG_DW_AUTONEG)
u16 bmsr;
u32 timeout;
u16 anlpar, btsr;
+#else
+ u16 ctrl;
#endif
#if defined(CONFIG_DW_SEARCH_PHY)
@@ -381,6 +383,8 @@ static int configure_phy(struct eth_device *dev)
priv->address = phy_addr;
else
return -1;
+#else
+ phy_addr = priv->address;
#endif
if (dw_reset_phy(dev) < 0)
return -1;
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4e4cd27..ab90afa 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -86,7 +86,7 @@ static int fec_miiphy_read(const char *dev, uint8_t phyAddr, uint8_t regAddr,
/*
* wait for the related interrupt
*/
- start = get_timer_masked();
+ start = get_timer(0);
while (!(readl(&fec->eth->ievent) & FEC_IEVENT_MII)) {
if (get_timer(start) > (CONFIG_SYS_HZ / 1000)) {
printf("Read MDIO failed...\n");
@@ -138,7 +138,7 @@ static int fec_miiphy_write(const char *dev, uint8_t phyAddr, uint8_t regAddr,
/*
* wait for the MII interrupt
*/
- start = get_timer_masked();
+ start = get_timer(0);
while (!(readl(&fec->eth->ievent) & FEC_IEVENT_MII)) {
if (get_timer(start) > (CONFIG_SYS_HZ / 1000)) {
printf("Write MDIO failed...\n");
@@ -189,7 +189,7 @@ static int miiphy_wait_aneg(struct eth_device *dev)
/*
* Wait for AN completion
*/
- start = get_timer_masked();
+ start = get_timer(0);
do {
if (get_timer(start) > (CONFIG_SYS_HZ * 5)) {
printf("%s: Autonegotiation timeout\n", dev->name);
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 6c32226..2aab52f 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -576,7 +576,7 @@ int greth_recv(struct eth_device *dev)
GRETH_REGORIN(&regs->control, GRETH_RXEN);
}
done:
- /* return positive length of packet or 0 if non recieved */
+ /* return positive length of packet or 0 if non received */
return len;
}
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 14b2d35..9386adf 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -282,7 +282,7 @@ OUTL(struct eth_device *dev, int command, u_long addr)
* ready to send and receive packets.
*
* Side effects:
- * leaves the natsemi initialized, and ready to recieve packets.
+ * leaves the natsemi initialized, and ready to receive packets.
*
* Returns: struct eth_device *: pointer to NIC data structure
*/
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index c9e324e..f54817e 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -81,9 +81,10 @@ static unsigned int na_mii_read (int reg)
static int na_mii_poll_busy (void)
{
+ ulong start;
/* arm simple, non interrupt dependent timer */
- reset_timer_masked ();
- while (get_timer_masked () < NA_MII_POLL_BUSY_DELAY) {
+ start = get_timer(0));
+ while (get_timer(start) < NA_MII_POLL_BUSY_DELAY) {
if (!(GET_EADDR (NETARM_ETH_MII_IND) & NETARM_ETH_MIII_BUSY)) {
return 1;
}
@@ -164,19 +165,20 @@ static unsigned int na_mii_check_speed (void)
static int reset_eth (void)
{
int pt;
+ ulong start;
na_get_mac_addr ();
pt = na_mii_identify_phy ();
/* reset the phy */
na_mii_write (MII_PHY_CONTROL, 0x8000);
- reset_timer_masked ();
- while (get_timer_masked () < NA_MII_NEGOTIATE_DELAY) {
+ start = get_timer(0);
+ while (get_timer(start) < NA_MII_NEGOTIATE_DELAY) {
if ((na_mii_read (MII_PHY_STATUS) & 0x8000) == 0) {
break;
}
}
- if (get_timer_masked () >= NA_MII_NEGOTIATE_DELAY)
+ if (get_timer(start) >= NA_MII_NEGOTIATE_DELAY)
printf ("phy reset timeout\n");
/* set the PCS reg */
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index 45402cc..6dfcd0e 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -299,7 +299,7 @@ OUTL(struct eth_device *dev, int command, u_long addr)
* Description: Retrieves the MAC address of the card, and sets up some
* globals required by other routines, and initializes the NIC, making it
* ready to send and receive packets.
- * Side effects: initializes ns8382xs, ready to recieve packets.
+ * Side effects: initializes ns8382xs, ready to receive packets.
* Returns: int: number of cards found
*/
diff --git a/drivers/net/phy/generic_10g.c b/drivers/net/phy/generic_10g.c
index 60dec45..e4a499d 100644
--- a/drivers/net/phy/generic_10g.c
+++ b/drivers/net/phy/generic_10g.c
@@ -36,7 +36,7 @@ int gen10g_shutdown(struct phy_device *phydev)
int gen10g_startup(struct phy_device *phydev)
{
int devad, reg;
- u32 mmd_mask = phydev->mmds;
+ u32 mmd_mask = phydev->mmds & MDIO_DEVS_LINK;
phydev->link = 1;
@@ -44,8 +44,12 @@ int gen10g_startup(struct phy_device *phydev)
phydev->speed = SPEED_10000;
phydev->duplex = DUPLEX_FULL;
+ /*
+ * Go through all the link-reporting devices, and make sure
+ * they're all up and happy
+ */
for (devad = 0; mmd_mask; devad++, mmd_mask = mmd_mask >> 1) {
- if (!mmd_mask & 1)
+ if (!(mmd_mask & 1))
continue;
/* Read twice because link state is latched and a
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 05e007c..8ce08a9 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -384,6 +384,7 @@ static inline void smc911x_reg_write(struct eth_device *dev,
#define WUCSR_MPEN 0x00000002
/* Chip ID values */
+#define CHIP_89218 0x218a
#define CHIP_9115 0x115
#define CHIP_9116 0x116
#define CHIP_9117 0x117
@@ -402,6 +403,7 @@ struct chip_id {
};
static const struct chip_id chip_ids[] = {
+ { CHIP_89218, "LAN89218" },
{ CHIP_9115, "LAN9115" },
{ CHIP_9116, "LAN9116" },
{ CHIP_9117, "LAN9117" },