1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Run xpt_action at splsoftcam() so that it cannot be re-entered by our SWI.

The XPT doesn't have a problem with this itself, but some controllers
drivers may have been caught off guard by the old behavior.

XPT_CONT_TARGET_IO is also a valid ccb type for cam_periph_unmapmem.
This commit is contained in:
Justin T. Gibbs 1999-05-25 20:17:29 +00:00
parent 26b4048320
commit 9911ecf957
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47509
2 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cam_periph.c,v 1.15 1999/05/23 18:57:29 gibbs Exp $
* $Id: cam_periph.c,v 1.16 1999/05/25 17:10:04 ken Exp $
*/
#include <sys/param.h>
@ -654,6 +654,7 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
}
break;
case XPT_SCSI_IO:
case XPT_CONT_TARGET_IO:
data_ptrs[0] = &ccb->csio.data_ptr;
numbufs = min(mapinfo->num_bufs_used, 1);
break;
@ -1114,7 +1115,6 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
status &= CAM_STATUS_MASK;
relsim_flags = 0;
switch (status) {
case CAM_REQ_CMP:
/* decrement the number of retries */

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cam_xpt.c,v 1.59 1999/05/22 21:58:47 gibbs Exp $
* $Id: cam_xpt.c,v 1.60 1999/05/23 18:57:29 gibbs Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -2718,10 +2718,13 @@ xptsetasyncbusfunc(struct cam_eb *bus, void *arg)
void
xpt_action(union ccb *start_ccb)
{
int iopl;
CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n"));
start_ccb->ccb_h.status = CAM_REQ_INPROG;
iopl = splsoftcam();
switch (start_ccb->ccb_h.func_code) {
case XPT_SCSI_IO:
{
@ -3280,6 +3283,7 @@ xpt_action(union ccb *start_ccb)
start_ccb->ccb_h.status = CAM_PROVIDE_FAIL;
break;
}
splx(iopl);
}
void