Writing Device Drivers

Hotplugging

In general, this manual does not highlight hotplugging information; following the rules and suggestions for writing device drivers given in this book should enable any driver to handle hotplugging. In particular, you should ensure that autoconfiguration works (see Chapter 5, Driver Autoconfiguration) and always include a working detach(9E) routine in any driver. Writers of drivers with power management issues should also follow the information given in Chapter 9, Power Management. SCSI HBA drivers may need to add a cb_ops structure to their dev_ops structure (see Chapter 15, SCSI Host Bus Adapter Drivers) to take advantage of hotplugging capabilities.

Previous versions of the Solaris operating system required hotpluggable drivers to include a DT_HOTPLUG property, but such a property is no longer required. (Driver writers are free, however, to include it and have routines make use of it as they see fit.)

For more information, visit http://soldc.sun.com/developer/support/driver/notes/scsi-hotplug.html, which contains links to hotplugging whitepapers.