diff options
Diffstat (limited to 'usr/src/uts/common/io/nge/nge_main.c')
-rw-r--r-- | usr/src/uts/common/io/nge/nge_main.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/nge/nge_main.c b/usr/src/uts/common/io/nge/nge_main.c index 03a2367cda..80266592f1 100644 --- a/usr/src/uts/common/io/nge/nge_main.c +++ b/usr/src/uts/common/io/nge/nge_main.c @@ -2115,6 +2115,7 @@ nge_restart(nge_t *ngep) { int err = 0; err = nge_reset(ngep); + nge_chip_sync(ngep); if (!err) err = nge_chip_start(ngep); @@ -2521,13 +2522,6 @@ nge_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd) if (brp->rx_hold != 0) return (DDI_FAILURE); - /* Recycle the multicast table */ - for (p = ngep->pcur_mulist; p != NULL; p = nextp) { - nextp = p->next; - kmem_free(p, sizeof (mul_item)); - } - ngep->pcur_mulist = NULL; - /* * Unregister from the GLD subsystem. This can fail, in * particular if there are DLPI style-2 streams still open - @@ -2538,6 +2532,17 @@ nge_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd) return (DDI_FAILURE); /* + * Recycle the multicast table. mac_unregister() should be called + * before it to ensure the multicast table can be used even if + * mac_unregister() fails. + */ + for (p = ngep->pcur_mulist; p != NULL; p = nextp) { + nextp = p->next; + kmem_free(p, sizeof (mul_item)); + } + ngep->pcur_mulist = NULL; + + /* * All activity stopped, so we can clean up & exit */ nge_unattach(ngep); |