passstart() and immediate CCBs
Jack
jacks.1785 at gmail.com
Thu Oct 11 06:43:28 UTC 2012
Hello all,
I was going through cam subsystem source(FreeBSD RELEASE 9 ),
and tried understanding how it works.
One thing I got stuck is, when exactly is passtart() invoked in case of
immediate CCBs. For non-immediate CCBs, it is quite clear to me.
In case of scsi pass driver(scsi_pass.c), xpt_schedule() is invoked by
cam_periph_getccb(), and cam_periph_ioctl().
But not in case of immediate CCBs. In case of immediate CCBs,
xpt_alloc_ccb_nowait() is invoked and then xpt_setup_ccb().
Is it that in case of immediate CCBs, passstart() is never invoked?
If it is true then, how does the thread awakens(which is slept by calling
cam_periph_ccbwait() inside cam_periph_runccb() ) when HBA driver
serves interrupt, and passdone() is invoked.
There seems no code inside passdone(), to wakeup the thread, the
only code being inside PASS_CCB_WAITING case is not valid
for immediate CCBs, as passstart() is never invoked so it didn't
set ccb type to PASS_CCB_WAITING.
Do immediate and immediate CCBs have any implications on
cam priority assignment specified in CCB header?
It seems that concept of which queues are in existence in cam subsystem
is not clear to me.
ie beginning from cam_periph_runccb(), how passdone() is invoked,
how passstart() is invoked if it is, and which queues are involved,
especially in case of immediate CCBs.
As far as I can get, there are at least 2 queues:
one is maintained by SCSI HBA driver for I/O requests, the other is queue
of CCBs maintained per cam peripheral( ie struct cam_peripheral) ?? or
cam device (ie struct cam_ed) ?? at transport layer.
I've been looking around, but haven't found anything yet.
I'll continue digging though :-)
Regards
--
Jack
More information about the freebsd-scsi
mailing list