Deleted Added
full compact
scsi_da.c (256843) scsi_da.c (256880)
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 256843 2013-10-21 12:00:26Z mav $");
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 256880 2013-10-22 08:22:19Z mav $");
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>

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

2120 softc->disk->d_drv1 = periph;
2121 if (cpi.maxio == 0)
2122 softc->disk->d_maxsize = DFLTPHYS; /* traditional default */
2123 else if (cpi.maxio > MAXPHYS)
2124 softc->disk->d_maxsize = MAXPHYS; /* for safety */
2125 else
2126 softc->disk->d_maxsize = cpi.maxio;
2127 softc->disk->d_unit = periph->unit_number;
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>

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

2120 softc->disk->d_drv1 = periph;
2121 if (cpi.maxio == 0)
2122 softc->disk->d_maxsize = DFLTPHYS; /* traditional default */
2123 else if (cpi.maxio > MAXPHYS)
2124 softc->disk->d_maxsize = MAXPHYS; /* for safety */
2125 else
2126 softc->disk->d_maxsize = cpi.maxio;
2127 softc->disk->d_unit = periph->unit_number;
2128 softc->disk->d_flags = 0;
2128 softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION;
2129 if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0)
2130 softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
2131 if ((cpi.hba_misc & PIM_UNMAPPED) != 0)
2132 softc->disk->d_flags |= DISKFLAG_UNMAPPED_BIO;
2133 cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor,
2134 sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr));
2135 strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr));
2136 cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)],

--- 1730 unchanged lines hidden ---
2129 if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0)
2130 softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
2131 if ((cpi.hba_misc & PIM_UNMAPPED) != 0)
2132 softc->disk->d_flags |= DISKFLAG_UNMAPPED_BIO;
2133 cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor,
2134 sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr));
2135 strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr));
2136 cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)],

--- 1730 unchanged lines hidden ---