diff options
author | Eric Cheng <none@none> | 2009-03-02 18:39:13 -0800 |
---|---|---|
committer | Eric Cheng <none@none> | 2009-03-02 18:39:13 -0800 |
commit | f94ede51cc0422ecc69e8e03cfb542a964596293 (patch) | |
tree | 97cbbb23669d1280f6becfbb8e73b50943ab8fa2 /usr/src | |
parent | 48633f182599946aebd63dccdc852ad722b57d0e (diff) | |
download | illumos-joyent-f94ede51cc0422ecc69e8e03cfb542a964596293.tar.gz |
6803903 potential assertion failure in mac_tx_*_mode()
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/mac/mac_datapath_setup.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/mac/mac_datapath_setup.c b/usr/src/uts/common/io/mac/mac_datapath_setup.c index 9c316911d4..0e231256f0 100644 --- a/usr/src/uts/common/io/mac/mac_datapath_setup.c +++ b/usr/src/uts/common/io/mac/mac_datapath_setup.c @@ -1231,15 +1231,22 @@ done: static void mac_tx_srs_update_bwlimit(mac_soft_ring_set_t *srs, mac_resource_props_t *mrp) { - mac_srs_tx_t *srs_tx = &srs->srs_tx; - uint32_t tx_mode; - mac_impl_t *mip = srs->srs_mcip->mci_mip; + uint32_t tx_mode; + mac_srs_tx_t *srs_tx = &srs->srs_tx; + mac_client_impl_t *mcip = srs->srs_mcip; + mac_impl_t *mip = mcip->mci_mip; + + /* + * We need to quiesce/restart the client here because mac_tx() and + * srs->srs_tx->st_func do not hold srs->srs_lock while accessing + * st_mode and related fields, which are modified by the code below. + */ + mac_tx_client_quiesce(mcip, SRS_QUIESCE); mutex_enter(&srs->srs_lock); mutex_enter(&srs->srs_bw->mac_bw_lock); tx_mode = srs_tx->st_mode; - if (mrp->mrp_maxbw == MRP_MAXBW_RESETVAL) { /* Reset bandwidth limit */ if (tx_mode == SRS_TX_BW) { @@ -1279,6 +1286,8 @@ done: srs_tx->st_func = mac_tx_get_func(srs_tx->st_mode); mutex_exit(&srs->srs_bw->mac_bw_lock); mutex_exit(&srs->srs_lock); + + mac_tx_client_restart(mcip); } /* |