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
>
>--- David Gwynne <[EMAIL PROTECTED]> wrote:
>
>
>>On Fri, Dec 21, 2007 at 12:59:23AM -0800, Somnath
>>kotur wrote:
>>
>>>Hi David,
>>>          I am involved in writing a SCSI HBA
>>>
>>Driver
>>
>>>myself for  properietary card, i noticed that in
>>>tran_init_pkt , you first stash away the DMA
>>>
>>cookies
>>
>>>for the 'buf' structure in an intermediate
>>>
>>structure
>>
>>>called the ccb_sgl[] ,and then in tran_start you
>>>
>>load
>>
>>>the hw sgl with this ccb_sgl (referring to
>>>
>>function
>>
>>>mfi_load_sgl()) ..Is there a reason the hw sgl was
>>>
>>not
>>
>>>directly loaded in tran_init_pkt in the same loop
>>>
>>as
>>
>>>the ccb_sgl[] is loaded ? i saw the svn commit for
>>>
>>the
>>
>>>same and am not sure i fully understood, could you
>>>
>>pls
>>
>>>explain?
>>>
>>solaris has a really annoying "feature" where you
>>cant iterate over its
>>dma descriptors more than once. so if you want to
>>use them twice you
>>have to keep a copy of their values yourself. i
>>stash the values
>>because i need their value twice, the first time in
>>init_pkt to figure
>>out how much you're going to transfer in that io,
>>and the second time
>>in tran_start as you describe above.
>>
>>the reason i dont write the sgl to the hardware
>>descriptor during
>>init_pkt is because i dont know what type of command
>>im doing at that
>>point. mfi handles block io operation with a
>>differently sized command
>>to the one you pass the rest of the scsi commands to
>>the firmware with.
>>this means the beginning of the sgl can be in two
>>different offsets. i
>>cant write the sgl till tran_start when i figure out
>>what command
>>it is.
>>
>>hope this helps,
>>dlg
>>
>>
>>>Thanks
>>>Som
>>>--- David Gwynne <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>I have written a driver called mfi that supports
>>>>
>>the
>>
>>>>LSI MegaRAID SAS  
>>>>and Dell PERC 5 RAID controllers. This hardware
>>>>currently lacks  
>>>>support in OpenSolaris, but a lot of of the big
>>>>vendors (it seems  
>>>>like everyone except Sun) are now shipping these
>>>>boards in their  
>>>>machines. Integrating this driver could open
>>>>
>>doors
>>
>>>>for OpenSolaris  
>>>>based distributions on these machines.
>>>>
>>>>I currently have a RFE 6556091 open against this
>>>>code, however, I'd  
>>>>like to see the process of integration done in
>>>>
>>the
>>
>>>>open and by the  
>>>>community, hence this project proposal.
>>>>
>>>>The code for the driver is available at the
>>>>following urls:
>>>>
>>>>http://www.itee.uq.edu.au/~dlg/mfi/
>>>>https://svn.itee.uq.edu.au/repo/mfi/ (svn)
>>>>https://svn.itee.uq.edu.au/viewvc/mfi/
>>>>
>>>>Feel free to contact me if you need further
>>>>information.
>>>>
>>>>dlg
>>>>_______________________________________________
>>>>driver-discuss mailing list
>>>>driver-discuss@opensolaris.org
>>>>
>>>>
>http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>
>>>
>>>
>>>     
>>>
>____________________________________________________________________________________
>
>>>Looking for last minute shopping deals?  
>>>Find them fast with Yahoo! Search. 
>>>
>http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
>
>
>
>      
> ____________________________________________________________________________________
>Be a better friend, newshound, and 
>know-it-all with Yahoo! Mobile.  Try it now.  
>http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>
>_______________________________________________
>driver-discuss mailing list
>driver-discuss@opensolaris.org
>http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>

_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to