For LUN behind the target, once LUN was added/remove, please handle below scenarios in HBA driver by NDI interfaces as my last email.
1. According SCSI standard, first following command send to the other LUN of the same target will be replied as CHECK CONDITION with ASC/ASCQ (0x3F/0x0E) which means report_luns data changed. 2. If the first following command send to the exactly same LUN what we are handling, the command will be replied by ASC/ASCQ(0x25/0x00) which means invalid LUN. Once HBA driver detects the above two conditions, HBA driver should call ndi_devi_online or ndi_devi_offline to update the target node in the Solaris device tree. Javen Javen Wu wrote: >I think you are asking hotplug supporting in HBA driver. >Once your HBA driver realize the device status change(added/remove), >you can online/offline the target devices from Solaris by calling >ndi_devi_online/ndi_devi_offline. > >In my mind, dynamic configuration is relevant to auto-enumeration >closely. That means, >HBA driver enumerate target devices by itself rather than relies on >target dot conf file(IE, sd.conf, st.conf, etc). >So all targets attached with the HBA enumerated by HBA driver and HBA >driver handle hotplug itself. > >I think you should refer to below interfaces: > >ndi_devi_enter() >ndi_devi_exit() >ndi_dev_is_persistent_node() >ndi_merge_node() >ndi_devi_alloc() >ndi_devi_free() >ndi_devi_online() >ndi_devi_offline() >ndi_busop_bus_config() >ndi_prop_update_int() >ndi_prop_update_string_array() >ndi_prop_remove_all() > >BTW, Sun is improving SCSA framework to support auto-enumeration and hotplug >in framework for making HBA driver developer life easier. > >-Javen > >Somnath kotur wrote: > > > >>Hi David/anybody else who could provide an answer to >>this one >> >> I would like to know if there is an DDI/DKI API >>or some undocumented call by which one can inform the >>OS of a target thats been added/removed ,this is >>especially useful in a non-DAS environment,(SCSI >>interconnect is not the regular SPI) and targets can >>be added/removed on the fly and the same needs to be >>conveyed to the OS (solaris x86) ...basicaly >>simulating a tgt probe from inside the SCSI HBA >>driver?? >> >>Thanks in advance >> >>Som >> >> >> _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss