Deleted Added
full compact
scsi_target.c (193951) scsi_target.c (194990)
1/*-
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 193951 2009-06-10 20:59:32Z kib $");
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 194990 2009-06-25 18:46:30Z kib $");
32
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/conf.h>
38#include <sys/malloc.h>
39#include <sys/poll.h>

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

547 struct targ_softc *softc;
548 struct targ_cmd_descr *descr;
549 int write_len, error;
550 int func_code, priority;
551
552 softc = (struct targ_softc *)dev->si_drv1;
553 write_len = error = 0;
554 CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
32
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/conf.h>
38#include <sys/malloc.h>
39#include <sys/poll.h>

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

547 struct targ_softc *softc;
548 struct targ_cmd_descr *descr;
549 int write_len, error;
550 int func_code, priority;
551
552 softc = (struct targ_softc *)dev->si_drv1;
553 write_len = error = 0;
554 CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
555 ("write - uio_resid %d\n", uio->uio_resid));
555 ("write - uio_resid %zd\n", uio->uio_resid));
556 while (uio->uio_resid >= sizeof(user_ccb) && error == 0) {
557 union ccb *ccb;
558
559 error = uiomove((caddr_t)&user_ccb, sizeof(user_ccb), uio);
560 if (error != 0) {
561 CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
562 ("write - uiomove failed (%d)\n", error));
563 break;

--- 624 unchanged lines hidden ---
556 while (uio->uio_resid >= sizeof(user_ccb) && error == 0) {
557 union ccb *ccb;
558
559 error = uiomove((caddr_t)&user_ccb, sizeof(user_ccb), uio);
560 if (error != 0) {
561 CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
562 ("write - uiomove failed (%d)\n", error));
563 break;

--- 624 unchanged lines hidden ---