diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff')
-rw-r--r-- | recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff b/recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff new file mode 100644 index 0000000000..f848d2a224 --- /dev/null +++ b/recipes/linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff @@ -0,0 +1,64 @@ +--- linux/drivers/net/au1000_eth.c.orig 2004-11-23 12:01:00.551663672 +0100 ++++ linux/drivers/net/au1000_eth.c 2004-11-23 12:08:36.795304096 +0100 +@@ -6,7 +6,9 @@ + * Copyright 2002 TimeSys Corp. + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.com +- * ++ * Bjoern Riemer 2004 ++ * riemer@fokus.fraunhofer.de or riemer@riemer-nt.de ++ * // fixed the link beat detection with ioctls (SIOCGMIIPHY) + * ######################################################################## + * + * This program is free software; you can distribute it and/or modify it +@@ -1383,6 +1385,10 @@ + aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed); + control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE; + #ifndef CONFIG_CPU_LITTLE_ENDIAN ++ /*riemer: fix for startup without cable */ ++ if (!link) ++ dev->flags &= ~IFF_RUNNING; ++ + control |= MAC_BIG_ENDIAN; + #endif + if (link && (dev->if_port == IF_PORT_100BASEFX)) { +@@ -1841,17 +1847,35 @@ + + static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) + { +- //u16 *data = (u16 *)&rq->ifr_data; ++/* ++// This structure is used in all SIOCxMIIxxx ioctl calls ++struct mii_ioctl_data { ++ 0 u16 phy_id; ++ 1 u16 reg_num; ++ 2 u16 val_in; ++ 3 u16 val_out; ++};*/ ++ u16 *data = (u16 *)&rq->ifr_data; ++ struct au1000_private *aup = (struct au1000_private *) dev->priv; ++ //struct mii_ioctl_data *data = (struct mii_ioctl_data *) & rq->ifr_data; + + /* fixme */ + switch(cmd) { + case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */ +- //data[0] = PHY_ADDRESS; ++ case SIOCGMIIPHY: ++ if (!netif_running(dev)) ++ return -EINVAL; ++ data[0] = aup->phy_addr; + case SIOCDEVPRIVATE+1: /* Read the specified MII register. */ +- //data[3] = mdio_read(ioaddr, data[0], data[1]); ++ case SIOCGMIIREG: ++ data[3] = mdio_read(dev, data[0], data[1]); ++ //data->val_out = mdio_read(dev,data->phy_id,data->reg_num); + return 0; + case SIOCDEVPRIVATE+2: /* Write the specified MII register */ +- //mdio_write(ioaddr, data[0], data[1], data[2]); ++ case SIOCSMIIREG: ++ if (!capable(CAP_NET_ADMIN)) ++ return -EPERM; ++ mdio_write(dev, data[0], data[1],data[2]); + return 0; + default: + return -EOPNOTSUPP; |