int gld_unregister(gld_mac_info_t *macinfo);
gld_unregister() is called by the device driver's detach(9E) function, and if successful, performs the following tasks:
Ensures that the device's interrupts are stopped, calling the driver's gldm_stop() routine if necessary
Removes the minor device node
Unlinks the device-specific driver from the GLDv2 system
If gld_unregister() returns DDI_SUCCESS, the detach(9E) routine should deallocate any data structures allocated in the attach(9E) routine, using gld_mac_free() to deallocate the macinfo structure, and return DDI_SUCCESS. If gld_unregister() does not return DDI_SUCCESS, the driver's detach(9E) routine must leave the device operational and return DDI_FAILURE.