scsi_target.c (d3ce8327194c0bcf742f2e03b5b0dc8f8cfe7f6b) scsi_target.c (6bfa9a2d66dd0e00182017d6741d44e54d0b2cca)
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

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

175 return (EBUSY);
176 }
177
178 /* Mark device busy before any potentially blocking operations */
179 dev->si_drv1 = (void *)~0;
180
181 /* Create the targ device, allocate its softc, initialize it */
182 if ((dev->si_flags & SI_NAMED) == 0) {
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

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

175 return (EBUSY);
176 }
177
178 /* Mark device busy before any potentially blocking operations */
179 dev->si_drv1 = (void *)~0;
180
181 /* Create the targ device, allocate its softc, initialize it */
182 if ((dev->si_flags & SI_NAMED) == 0) {
183 make_dev(&targ_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600,
183 make_dev(&targ_cdevsw, dev2unit(dev), UID_ROOT, GID_WHEEL, 0600,
184 "targ%d", dev2unit(dev));
185 }
186 MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG,
187 M_WAITOK | M_ZERO);
188 dev->si_drv1 = softc;
189 softc->state = TARG_STATE_OPENED;
190 softc->periph = NULL;
191 softc->path = NULL;

--- 996 unchanged lines hidden ---
184 "targ%d", dev2unit(dev));
185 }
186 MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG,
187 M_WAITOK | M_ZERO);
188 dev->si_drv1 = softc;
189 softc->state = TARG_STATE_OPENED;
190 softc->periph = NULL;
191 softc->path = NULL;

--- 996 unchanged lines hidden ---