Replaced spin() by snooze()

The link change functions are no longer called from inside the interrupt handler.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7482 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2004-05-09 22:06:32 +00:00
parent a05655eea6
commit 3d546cd6e5
2 changed files with 12 additions and 12 deletions
@@ -1371,6 +1371,7 @@ em_local_timer(void *arg)
em_update_stats_counters(adapter);
if (em_display_debug_stats && ifp->if_flags & IFF_RUNNING) {
em_print_hw_stats(adapter);
em_print_debug_info(adapter);
}
em_smartspeed(adapter);
@@ -2792,6 +2793,7 @@ em_print_debug_info(struct adapter *adapter)
dprintf("ipro1000/%d: CleanTxInterrupts = %ld\n", unit,
adapter->clean_tx_interrupts);
#endif
snooze(10000); // give syslog reader some time to catchup
dprintf("ipro1000/%d: fifo workaround = %Ld, fifo_reset = %Ld\n", unit,
(long long)adapter->tx_fifo_wrk,
(long long)adapter->tx_fifo_reset);
@@ -2810,6 +2812,7 @@ em_print_debug_info(struct adapter *adapter)
adapter->mbuf_cluster_failed);
dprintf("ipro1000/%d: Driver dropped packets = %ld\n", unit,
adapter->dropped_pkts);
snooze(10000); // give syslog reader some time to catchup
return;
}
@@ -2827,6 +2830,7 @@ em_print_hw_stats(struct adapter *adapter)
(long long)adapter->stats.sec);
dprintf("ipro1000/%d: Defer count = %Ld\n", unit,
(long long)adapter->stats.dc);
snooze(10000); // give syslog reader some time to catchup
dprintf("ipro1000/%d: Missed Packets = %Ld\n", unit,
(long long)adapter->stats.mpc);
@@ -2842,6 +2846,7 @@ em_print_hw_stats(struct adapter *adapter)
(long long)adapter->stats.algnerrc);
dprintf("ipro1000/%d: Carrier extension errors = %Ld\n", unit,
(long long)adapter->stats.cexterr);
snooze(10000); // give syslog reader some time to catchup
dprintf("ipro1000/%d: XON Rcvd = %Ld\n", unit,
(long long)adapter->stats.xonrxc);
@@ -2851,6 +2856,7 @@ em_print_hw_stats(struct adapter *adapter)
(long long)adapter->stats.xoffrxc);
dprintf("ipro1000/%d: XOFF Xmtd = %Ld\n", unit,
(long long)adapter->stats.xofftxc);
snooze(10000); // give syslog reader some time to catchup
dprintf("ipro1000/%d: Good Packets Rcvd = %Ld\n", unit,
(long long)adapter->stats.gprc);
@@ -2112,8 +2112,7 @@ em_check_for_link(struct em_hw *hw)
else if((hw->media_type == em_media_type_internal_serdes) &&
!(E1000_TXCW_ANE & E1000_READ_REG(hw, TXCW))) {
/* SYNCH bit and IV bit are sticky. */
// usec_delay(10);
spin(10);
usec_delay(10);
if(E1000_RXCW_SYNCH & E1000_READ_REG(hw, RXCW)) {
if(!(rxcw & E1000_RXCW_IV)) {
hw->serdes_link_down = FALSE;
@@ -2244,8 +2243,7 @@ em_raise_mdi_clk(struct em_hw *hw,
*/
E1000_WRITE_REG(hw, CTRL, (*ctrl | E1000_CTRL_MDC));
E1000_WRITE_FLUSH(hw);
// usec_delay(10);
spin(10);
usec_delay(10);
}
/******************************************************************************
@@ -2263,8 +2261,7 @@ em_lower_mdi_clk(struct em_hw *hw,
*/
E1000_WRITE_REG(hw, CTRL, (*ctrl & ~E1000_CTRL_MDC));
E1000_WRITE_FLUSH(hw);
// usec_delay(10);
spin(10);
usec_delay(10);
}
/******************************************************************************
@@ -2308,8 +2305,7 @@ em_shift_out_mdi_bits(struct em_hw *hw,
E1000_WRITE_REG(hw, CTRL, ctrl);
E1000_WRITE_FLUSH(hw);
//usec_delay(10);
spin(10);
usec_delay(10);
em_raise_mdi_clk(hw, &ctrl);
em_lower_mdi_clk(hw, &ctrl);
@@ -2427,8 +2423,7 @@ em_read_phy_reg_ex(struct em_hw *hw,
/* Poll the ready bit to see if the MDI read completed */
for(i = 0; i < 64; i++) {
// usec_delay(50);
spin(50);
usec_delay(50);
mdic = E1000_READ_REG(hw, MDIC);
if(mdic & E1000_MDIC_READY) break;
}
@@ -2532,8 +2527,7 @@ em_write_phy_reg_ex(struct em_hw *hw,
/* Poll the ready bit to see if the MDI read completed */
for(i = 0; i < 640; i++) {
// usec_delay(5);
spin(5);
usec_delay(5);
mdic = E1000_READ_REG(hw, MDIC);
if(mdic & E1000_MDIC_READY) break;
}