Virtual HBA SIM
Florian Florensa
florian.florensa at gmail.com
Wed Dec 13 12:31:39 UTC 2017
Hello everyone,
I've been working on a FreeBSD sim that would emulate a SCSI HBA and a
few attached SCSI devices.
For now, i have been struggling with the device creation in the system.
Here is what happens inside the code:
the driver setup a new 'fake' device and call online_device with the
needed parameter.
Online device call the 'vhba_cam_init' which create the sim for the
fake device (along with its devq, mtx, path and bus registering).
Afterwords it setups a CCB with the func code XPT_GDEV_TYPE, call
xpt_action, and finally xpt_async is called with code AC_FOUND_DEVICE.
Here you can find the relevant code in a pastebin for readability:
https://pastebin.com/e50bYHiQ
Unfortunately the device never gets created, and I seem unable to
understand either why it is not created, neither how I can fix it.
If anyone can shed some lights on this, i would really appreciate it.
Regards,
Florian
More information about the freebsd-drivers
mailing list