Mercurial > flash_v2
changeset 1355:95d716b6e230
Make auto-negotiation timeout configurable
| author | gthomas |
|---|---|
| date | Fri, 07 Nov 2003 17:54:17 +0000 |
| parents | c8903ba86828 |
| children | 6a23e2474d97 |
| files | packages/devs/eth/phy/current/ChangeLog packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl packages/devs/eth/phy/current/src/AM79C874.c packages/devs/eth/phy/current/src/DP83847.c |
| diffstat | 4 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/eth/phy/current/ChangeLog +++ b/packages/devs/eth/phy/current/ChangeLog @@ -1,3 +1,9 @@ +2003-11-07 Gary Thomas <gary@mlbassoc.com> + + * src/DP83847.c: + * src/AM79C874.c: + * cdl/phy_eth_drivers.cdl: Make auto-negotiation timeout configurable. + 2003-09-11 Gary Thomas <gary@mlbassoc.com> * include/eth_phy.h: Minor improvement in status bitfield [comments]
--- a/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl +++ b/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl @@ -60,6 +60,15 @@ cdl_package CYGPKG_DEVS_ETH_PHY { compile eth_phy.c + cdl_option CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME { + display "Time period (seconds) to wait for auto-negotiation" + flavor data + default_value 5 + description " + The length of time to wait for auto-negotiation to complete + before giving up and declaring the link dead/missing." + } + cdl_option CYGHWR_DEVS_ETH_PHY_DP83847 { display "NSDP83847" flavor bool
--- a/packages/devs/eth/phy/current/src/AM79C874.c +++ b/packages/devs/eth/phy/current/src/AM79C874.c @@ -52,6 +52,8 @@ //========================================================================== #include <pkgconf/system.h> +#include <pkgconf/devs_eth_phy.h> + #include <cyg/infra/cyg_type.h> #include <cyg/infra/diag.h> @@ -72,7 +74,7 @@ static bool am79c874_stat(eth_phy_access if (_eth_phy_read(f, 0x1, f->phy_addr, &phy_state)) { if ((phy_state & 0x20) == 0) { diag_printf("... waiting for auto-negotiation"); - for (tries = 0; tries < 15; tries++) { + for (tries = 0; tries < CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME; tries++) { if (_eth_phy_read(f, 0x1, f->phy_addr, &phy_state)) { if ((phy_state & 0x20) != 0) { break;
--- a/packages/devs/eth/phy/current/src/DP83847.c +++ b/packages/devs/eth/phy/current/src/DP83847.c @@ -52,6 +52,8 @@ //========================================================================== #include <pkgconf/system.h> +#include <pkgconf/devs_eth_phy.h> + #include <cyg/infra/cyg_type.h> #include <cyg/infra/diag.h> @@ -72,7 +74,7 @@ static bool dp83847_stat(eth_phy_access_ if (_eth_phy_read(f, 0x10, f->phy_addr, &phy_state)) { if ((phy_state & 0x10) == 0) { diag_printf("... waiting for auto-negotiation"); - for (tries = 0; tries < 15; tries++) { + for (tries = 0; tries < CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME; tries++) { if (_eth_phy_read(f, 0x10, f->phy_addr, &phy_state)) { if ((phy_state & 0x10) != 0) { break;
