Deleted Added
full compact
scsi_target.c (58252) scsi_target.c (58345)
1/*
2 * Implementation of a simple Target Mode SCSI Proccessor Target driver for CAM.
3 *
4 * Copyright (c) 1998, 1999 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*
2 * Implementation of a simple Target Mode SCSI Proccessor Target driver for CAM.
3 *
4 * Copyright (c) 1998, 1999 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 58252 2000-03-18 22:13:27Z gibbs $
28 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 58345 2000-03-20 10:44:49Z phk $
29 */
30#include <stddef.h> /* For offsetof */
31
32#include <sys/param.h>
33#include <sys/queue.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/types.h>

--- 1123 unchanged lines hidden (view full) ---

1160 }
1161
1162 /*
1163 * Place it in the queue of buffers available for either
1164 * SEND or RECEIVE commands.
1165 *
1166 */
1167 bp->b_resid = bp->b_bcount;
29 */
30#include <stddef.h> /* For offsetof */
31
32#include <sys/param.h>
33#include <sys/queue.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/types.h>

--- 1123 unchanged lines hidden (view full) ---

1160 }
1161
1162 /*
1163 * Place it in the queue of buffers available for either
1164 * SEND or RECEIVE commands.
1165 *
1166 */
1167 bp->b_resid = bp->b_bcount;
1168 if ((bp->b_flags & B_READ) != 0) {
1168 if (bp->b_iocmd == BIO_READ) {
1169 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
1170 ("Queued a SEND buffer\n"));
1171 bufq_insert_tail(&softc->snd_buf_queue, bp);
1172 } else {
1173 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
1174 ("Queued a RECEIVE buffer\n"));
1175 bufq_insert_tail(&softc->rcv_buf_queue, bp);
1176 }

--- 1036 unchanged lines hidden ---
1169 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
1170 ("Queued a SEND buffer\n"));
1171 bufq_insert_tail(&softc->snd_buf_queue, bp);
1172 } else {
1173 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
1174 ("Queued a RECEIVE buffer\n"));
1175 bufq_insert_tail(&softc->rcv_buf_queue, bp);
1176 }

--- 1036 unchanged lines hidden ---