Deleted Added
full compact
scsi_da.c (250208) scsi_da.c (250460)
1/*-
2 * Implementation of SCSI Direct Access Peripheral driver for CAM.
3 *
4 * Copyright (c) 1997 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

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

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
29#include <sys/cdefs.h>
1/*-
2 * Implementation of SCSI Direct Access Peripheral driver for CAM.
3 *
4 * Copyright (c) 1997 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

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

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
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 250208 2013-05-03 11:53:06Z mav $");
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 250460 2013-05-10 16:41:26Z eadler $");
31
32#include <sys/param.h>
33
34#ifdef _KERNEL
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/bio.h>
38#include <sys/sysctl.h>

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

2323 SSD_FULL_SIZE,
2324 da_default_timeout*1000);
2325 break;
2326 }
2327 start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;
2328
2329out:
2330 /*
31
32#include <sys/param.h>
33
34#ifdef _KERNEL
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/bio.h>
38#include <sys/sysctl.h>

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

2323 SSD_FULL_SIZE,
2324 da_default_timeout*1000);
2325 break;
2326 }
2327 start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;
2328
2329out:
2330 /*
2331 * Block out any asyncronous callbacks
2331 * Block out any asynchronous callbacks
2332 * while we touch the pending ccb list.
2333 */
2334 LIST_INSERT_HEAD(&softc->pending_ccbs,
2335 &start_ccb->ccb_h, periph_links.le);
2336 softc->outstanding_cmds++;
2337
2338 /* We expect a unit attention from this device */
2339 if ((softc->flags & DA_FLAG_RETRY_UA) != 0) {

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

2724 bp->bio_resid = bp->bio_bcount;
2725 bp->bio_flags |= BIO_ERROR;
2726 softc->error_inject = 0;
2727 }
2728
2729 }
2730
2731 /*
2332 * while we touch the pending ccb list.
2333 */
2334 LIST_INSERT_HEAD(&softc->pending_ccbs,
2335 &start_ccb->ccb_h, periph_links.le);
2336 softc->outstanding_cmds++;
2337
2338 /* We expect a unit attention from this device */
2339 if ((softc->flags & DA_FLAG_RETRY_UA) != 0) {

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

2724 bp->bio_resid = bp->bio_bcount;
2725 bp->bio_flags |= BIO_ERROR;
2726 softc->error_inject = 0;
2727 }
2728
2729 }
2730
2731 /*
2732 * Block out any asyncronous callbacks
2732 * Block out any asynchronous callbacks
2733 * while we touch the pending ccb list.
2734 */
2735 LIST_REMOVE(&done_ccb->ccb_h, periph_links.le);
2736 softc->outstanding_cmds--;
2737 if (softc->outstanding_cmds == 0)
2738 softc->flags |= DA_FLAG_WENT_IDLE;
2739
2740 if (state == DA_CCB_DELETE) {

--- 846 unchanged lines hidden ---
2733 * while we touch the pending ccb list.
2734 */
2735 LIST_REMOVE(&done_ccb->ccb_h, periph_links.le);
2736 softc->outstanding_cmds--;
2737 if (softc->outstanding_cmds == 0)
2738 softc->flags |= DA_FLAG_WENT_IDLE;
2739
2740 if (state == DA_CCB_DELETE) {

--- 846 unchanged lines hidden ---