Deleted Added
full compact
mlx.c (52225) mlx.c (52273)
1/*-
2 * Copyright (c) 1999 Michael Smith
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Michael Smith
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/mlx/mlx.c 52225 1999-10-14 02:54:06Z msmith $
26 * $FreeBSD: head/sys/dev/mlx/mlx.c 52273 1999-10-16 01:46:59Z msmith $
27 */
28
29/*
30 * Driver for the Mylex DAC960 family of RAID controllers.
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>

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

1625 bp->b_blkno, blkcount, sc->mlx_sysdrive[driveno].ms_size);
1626
1627 /*
1628 * Build the I/O command. Note that the SG list type bits are set to zero,
1629 * denoting the format of SG list that we are using.
1630 */
1631 mlx_make_type5(mc, cmd,
1632 blkcount & 0xff, /* xfer length low byte */
27 */
28
29/*
30 * Driver for the Mylex DAC960 family of RAID controllers.
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>

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

1625 bp->b_blkno, blkcount, sc->mlx_sysdrive[driveno].ms_size);
1626
1627 /*
1628 * Build the I/O command. Note that the SG list type bits are set to zero,
1629 * denoting the format of SG list that we are using.
1630 */
1631 mlx_make_type5(mc, cmd,
1632 blkcount & 0xff, /* xfer length low byte */
1633 (driveno << 4) | ((blkcount >> 8) & 0x0f), /* target and length high nybble */
1633 (driveno << 3) | ((blkcount >> 8) & 0x07), /* target and length high 3 bits */
1634 bp->b_blkno, /* physical block number */
1635 mc->mc_sgphys, /* location of SG list */
1636 mc->mc_nsgent & 0x3f); /* size of SG list (top 2 bits clear) */
1637
1638
1639 /* try to give command to controller */
1640 if (mlx_start(mc) != 0) {
1641 /* fail the command */

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

1657
1658 if (mc->mc_status != MLX_STATUS_OK) { /* could be more verbose here? */
1659 bp->b_error = EIO;
1660 bp->b_flags |= B_ERROR;
1661
1662 switch(mc->mc_status) {
1663 case MLX_STATUS_RDWROFFLINE: /* system drive has gone offline */
1664 device_printf(mlxd->mlxd_dev, "drive offline\n");
1634 bp->b_blkno, /* physical block number */
1635 mc->mc_sgphys, /* location of SG list */
1636 mc->mc_nsgent & 0x3f); /* size of SG list (top 2 bits clear) */
1637
1638
1639 /* try to give command to controller */
1640 if (mlx_start(mc) != 0) {
1641 /* fail the command */

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

1657
1658 if (mc->mc_status != MLX_STATUS_OK) { /* could be more verbose here? */
1659 bp->b_error = EIO;
1660 bp->b_flags |= B_ERROR;
1661
1662 switch(mc->mc_status) {
1663 case MLX_STATUS_RDWROFFLINE: /* system drive has gone offline */
1664 device_printf(mlxd->mlxd_dev, "drive offline\n");
1665 device_printf(sc->mlx_dev, "drive offline\n");
1666 /* should signal this with a return code */
1667 mlxd->mlxd_drive->ms_state = MLX_SYSD_OFFLINE;
1668 break;
1669
1670 default: /* other I/O error */
1671 device_printf(sc->mlx_dev, "I/O error - %s\n", mlx_diagnose_command(mc));
1672#if 0
1673 device_printf(sc->mlx_dev, " b_bcount %ld blkcount %ld b_blkno %d\n",

--- 720 unchanged lines hidden ---
1665 /* should signal this with a return code */
1666 mlxd->mlxd_drive->ms_state = MLX_SYSD_OFFLINE;
1667 break;
1668
1669 default: /* other I/O error */
1670 device_printf(sc->mlx_dev, "I/O error - %s\n", mlx_diagnose_command(mc));
1671#if 0
1672 device_printf(sc->mlx_dev, " b_bcount %ld blkcount %ld b_blkno %d\n",

--- 720 unchanged lines hidden ---