diff options
| author | Robert Mustacchi <rm@joyent.com> | 2014-06-27 00:28:46 +0000 |
|---|---|---|
| committer | Robert Mustacchi <rm@joyent.com> | 2014-06-27 16:54:38 +0000 |
| commit | e773758d864f95e9deb17984990400744e20cc09 (patch) | |
| tree | 36e447f1542e8f381f2cbdc5d178cc44b06fd13b | |
| parent | f9b630b29ad10c18c3c1304e0c10a7c77b241a08 (diff) | |
| download | illumos-joyent-release-20140626.tar.gz | |
OS-3142 a vnd mac_tx_notification somehow stuck aroundrelease-20140626
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
| -rw-r--r-- | usr/src/uts/common/io/vnd/vnd.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/vnd/vnd.c b/usr/src/uts/common/io/vnd/vnd.c index 9c86c85a4c..4594a1854e 100644 --- a/usr/src/uts/common/io/vnd/vnd.c +++ b/usr/src/uts/common/io/vnd/vnd.c @@ -2220,6 +2220,18 @@ vnd_dld_cap_enable(vnd_str_t *vsp, vnd_rx_t rxfunc) vnd_mac_enter(vsp, &mph); + /* + * If we're coming in here for a second pass, we need to make sure that + * we remove an existing flow control notification callback, otherwise + * we'll create a duplicate that will remain with garbage data. + */ + if (c->vsc_tx_fc_hdl != NULL) { + ASSERT(c->vsc_set_fcb_hdl != NULL); + (void) c->vsc_set_fcb_f(c->vsc_set_fcb_hdl, NULL, + c->vsc_tx_fc_hdl); + c->vsc_tx_fc_hdl = NULL; + } + if (vsp->vns_caps.vsc_capab_f(c->vsc_capab_hdl, DLD_CAPAB_DIRECT, &d, DLD_ENABLE) == 0) { c->vsc_tx_f = (vnd_dld_tx_t)d.di_tx_df; @@ -2376,7 +2388,7 @@ vnd_st_shutdown(vnd_str_t *vsp) if (vsc->vsc_flags & VNS_C_DIRECT) { vnd_mac_enter(vsp, &mph); vsc->vsc_flags &= ~VNS_C_DIRECT; - vsc->vsc_set_fcb_f(vsc->vsc_set_fcb_hdl, NULL, + (void) vsc->vsc_set_fcb_f(vsc->vsc_set_fcb_hdl, NULL, vsc->vsc_tx_fc_hdl); vsc->vsc_tx_fc_hdl = NULL; (void) vsc->vsc_capab_f(vsc->vsc_capab_hdl, DLD_CAPAB_DIRECT, |
