Mercurial > illumos > illumos-gate
changeset 10306:599f03fafdf3
6831485 eri interface hangs while running uperf
author | vitezslav batrla - Sun Microsystems - Prague Czech Republic <Vitezslav.Batrla@Sun.COM> |
---|---|
date | Fri, 14 Aug 2009 09:14:56 +0200 |
parents | f6df05de8700 |
children | 05a4e6d289cc |
files | usr/src/uts/sun/io/eri/eri.c |
diffstat | 1 files changed, 13 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sun/io/eri/eri.c Fri Aug 14 11:26:28 2009 +0800 +++ b/usr/src/uts/sun/io/eri/eri.c Fri Aug 14 09:14:56 2009 +0200 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2894,6 +2894,9 @@ ETX_COMPLETION_MASK); macupdate |= eri_reclaim(erip, erip->tx_completion); + if (macupdate) + erip->wantw = B_FALSE; + mutex_exit(&erip->xmitlock); } @@ -2961,8 +2964,6 @@ erip->rx_completion = rmdi; } - erip->wantw = B_FALSE; - mutex_exit(&erip->intrlock); if (head) @@ -3454,7 +3455,6 @@ uint_t start_offset = 0; uint_t stuff_offset = 0; uint_t flags = 0; - boolean_t macupdate = B_FALSE; caddr_t ptr; uint32_t offset; @@ -3514,9 +3514,16 @@ if (i > (ERI_TPENDING - 4)) goto notmds; - if (i >= (ERI_TPENDING >> 1) && !(erip->starts & 0x7)) + if (i >= (ERI_TPENDING >> 1) && !(erip->starts & 0x7)) { int_me = ERI_TMD_INTME; + if (!erip->tx_int_me) { + PUT_GLOBREG(intmask, GET_GLOBREG(intmask) & + ~(ERI_G_MASK_TX_INT_ME)); + erip->tx_int_me = 1; + } + } + i = tmdp - tbasep; /* index */ offset = (i * ERI_BUFSIZE); @@ -3562,36 +3569,18 @@ if (erip->tx_cur_cnt >= tx_interrupt_rate) { erip->tx_completion = (uint32_t)(GET_ETXREG(tx_completion) & ETX_COMPLETION_MASK); - macupdate |= eri_reclaim(erip, erip->tx_completion); + (void) eri_reclaim(erip, erip->tx_completion); } mutex_exit(&erip->xmitlock); - if (macupdate) - mac_tx_update(erip->mh); - return (B_TRUE); notmds: HSTAT(erip, notmds); erip->wantw = B_TRUE; - if (!erip->tx_int_me) { - PUT_GLOBREG(intmask, GET_GLOBREG(intmask) & - ~(ERI_G_MASK_TX_INT_ME)); - erip->tx_int_me = 1; - } - - if (erip->tx_cur_cnt >= tx_interrupt_rate) { - erip->tx_completion = (uint32_t)(GET_ETXREG(tx_completion) & - ETX_COMPLETION_MASK); - macupdate |= eri_reclaim(erip, erip->tx_completion); - } - mutex_exit(&erip->xmitlock); - if (macupdate) - mac_tx_update(erip->mh); - return (B_FALSE); }