Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2004 13:06:24 -0500
From:      Joseph M Link <freebsd@joelink.net>
To:        freebsd-hackers@freebsd.org
Subject:   xpt_schedule() and start interface context question.
Message-ID:  <40FD5F20.3090502@joelink.net>

next in thread | raw e-mail | index | archive | help

Hello,

I have been looking at the targ driver written by Nate Lawson and Justin 
Gibbs.  I am seeing some access of user memory outside of what is 
obviously user context (the call to copyin and cam_periph_mapmem() by 
way of the targstart() interface).  I am wondering how xpt_schedule() 
works and if they are leveraging something there.  Specifically, does a 
call to a periph's start() function always get called in the same 
context as the caller of xpt_schedule() (which happens to always be user 
context in the targ driver)?

In looking at the code for xpt_schedule(), it definitely seems that that 
is possible, but it also seems possible that if the device has no 
resources available, the start() call is queued and delayed.  If the 
latter case is actually possible with the targ driver, then what context 
is the targstart() called in?  if it's not the user's context, that 
would make the calls to copyin() and cam_periph_mapmem() behave 
incorrectly, right?

Thanks,
Joe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40FD5F20.3090502>