wendy jiang wrote:

Hi I just wrote a dummy network driver for my PCI network card. I can see it is 
attached to the card, but soon detach function is called to remove the driver. 
However I did not see any other gld_mac_info functions(gldm_reset, gldm_start 
etc) got called before OS started to detach the driver.

There's a magic setting you can use to stop this called "ddi-no-autodetach".

The IPFilter code uses it like this:

#ifdef DDI_NO_AUTODETACH
       if (ddi_prop_update_int(DDI_DEV_T_NONE, dip,
                               DDI_NO_AUTODETACH, 1) != DDI_PROP_SUCCESS) {
               cmn_err(CE_WARN, "!updating DDI_NO_AUTODETACH failed");
               return DDI_FAILURE;
       }
#else
       if (ddi_prop_update_int(DDI_DEV_T_NONE, dip,
"ddi-no-autodetach", 1) != DDI_PROP_SUCCESS) {
               cmn_err(CE_WARN, "!updating ddi-no-autodetach failed");
               return DDI_FAILURE;
       }
#endif

For more information, see:
http://docs.sun.com/app/docs/doc/816-5181/6mbbfuibd?a=view

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to