mlxreg.h (52544) | mlxreg.h (54419) |
---|---|
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/mlxreg.h 52544 1999-10-26 23:20:43Z msmith $ | 26 * $FreeBSD: head/sys/dev/mlx/mlxreg.h 54419 1999-12-11 00:00:13Z msmith $ |
27 */ 28 29#define MLX_CFG_BASE0 0x10 /* first region */ 30#define MLX_CFG_BASE1 0x14 /* second region (type 3 only) */ 31 32#define MLX_BLKSIZE 512 /* fixed feature */ 33 34/* --- 13 unchanged lines hidden (view full) --- 48#define MLX_CMD_STARTCHANNEL 0x12 49 50/* 51 * Status values. 52 */ 53#define MLX_STATUS_OK 0x0000 54#define MLX_STATUS_RDWROFFLINE 0x0002 /* read/write claims drive is offline */ 55#define MLX_STATUS_WEDGED 0xdead /* controller not listening */ | 27 */ 28 29#define MLX_CFG_BASE0 0x10 /* first region */ 30#define MLX_CFG_BASE1 0x14 /* second region (type 3 only) */ 31 32#define MLX_BLKSIZE 512 /* fixed feature */ 33 34/* --- 13 unchanged lines hidden (view full) --- 48#define MLX_CMD_STARTCHANNEL 0x12 49 50/* 51 * Status values. 52 */ 53#define MLX_STATUS_OK 0x0000 54#define MLX_STATUS_RDWROFFLINE 0x0002 /* read/write claims drive is offline */ 55#define MLX_STATUS_WEDGED 0xdead /* controller not listening */ |
56#define MLX_STATUS_LOST 0xbeef /* never came back */ |
|
56#define MLX_STATUS_BUSY 0xffff /* command is in controller */ 57 58/* 59 * Accessor defines for the V3 interface. 60 */ 61#define MLX_V3_MAILBOX 0x00 62#define MLX_V3_STATUS_IDENT 0x0d 63#define MLX_V3_STATUS 0x0e --- 46 unchanged lines hidden (view full) --- 110 111#define MLX_V4_ODB_HWMBOX_ACK (1<<0) /* ack status read from hardware mailbox */ 112#define MLX_V4_ODB_MEMMBOX_ACK (1<<1) /* ack status read from memory mailbox */ 113 114#define MLX_V4_IER_MASK 0xfb /* message unit interrupt mask */ 115#define MLX_V4_IER_DISINT (1<<2) /* interrupt disable bit */ 116 117/* | 57#define MLX_STATUS_BUSY 0xffff /* command is in controller */ 58 59/* 60 * Accessor defines for the V3 interface. 61 */ 62#define MLX_V3_MAILBOX 0x00 63#define MLX_V3_STATUS_IDENT 0x0d 64#define MLX_V3_STATUS 0x0e --- 46 unchanged lines hidden (view full) --- 111 112#define MLX_V4_ODB_HWMBOX_ACK (1<<0) /* ack status read from hardware mailbox */ 113#define MLX_V4_ODB_MEMMBOX_ACK (1<<1) /* ack status read from memory mailbox */ 114 115#define MLX_V4_IER_MASK 0xfb /* message unit interrupt mask */ 116#define MLX_V4_IER_DISINT (1<<2) /* interrupt disable bit */ 117 118/* |
119 * Accessor defines for the V5 interface 120 */ 121#define MLX_V5_MAILBOX 0x50 122#define MLX_V5_STATUS_IDENT 0x5d 123#define MLX_V5_STATUS 0x5e 124#define MLX_V5_IDBR 0x60 125#define MLX_V5_ODBR 0x61 126#define MLX_V5_IER 0x34 127 128#define MLX_V5_PUT_MAILBOX(sc, idx, val) bus_space_write_1(sc->mlx_btag, sc->mlx_bhandle, MLX_V5_MAILBOX + idx, val) 129#define MLX_V5_GET_STATUS_IDENT(sc) bus_space_read_1 (sc->mlx_btag, sc->mlx_bhandle, MLX_V5_STATUS_IDENT) 130#define MLX_V5_GET_STATUS(sc) bus_space_read_2 (sc->mlx_btag, sc->mlx_bhandle, MLX_V5_STATUS) 131#define MLX_V5_GET_IDBR(sc) bus_space_read_1 (sc->mlx_btag, sc->mlx_bhandle, MLX_V5_IDBR) 132#define MLX_V5_PUT_IDBR(sc, val) bus_space_write_1(sc->mlx_btag, sc->mlx_bhandle, MLX_V5_IDBR, val) 133#define MLX_V5_GET_ODBR(sc) bus_space_read_1 (sc->mlx_btag, sc->mlx_bhandle, MLX_V5_ODBR) 134#define MLX_V5_PUT_ODBR(sc, val) bus_space_write_1(sc->mlx_btag, sc->mlx_bhandle, MLX_V5_ODBR, val) 135#define MLX_V5_PUT_IER(sc, val) bus_space_write_1(sc->mlx_btag, sc->mlx_bhandle, MLX_V5_IER, val) 136 137#define MLX_V5_IDB_EMPTY (1<<0) /* mailbox is empty */ 138 139#define MLX_V5_IDB_HWMBOX_CMD (1<<0) /* posted hardware mailbox command */ 140#define MLX_V5_IDB_SACK (1<<1) /* acknowledge status read */ 141#define MLX_V5_IDB_MEMMBOX_CMD (1<<4) /* posted memory mailbox command */ 142 143#define MLX_V5_ODB_HWSAVAIL (1<<0) /* status is available for hardware mailbox */ 144#define MLX_V5_ODB_MEMSAVAIL (1<<1) /* status is available for memory mailbox */ 145 146#define MLX_V5_ODB_HWMBOX_ACK (1<<0) /* ack status read from hardware mailbox */ 147#define MLX_V5_ODB_MEMMBOX_ACK (1<<1) /* ack status read from memory mailbox */ 148 149#define MLX_V5_IER_DISINT (1<<2) /* interrupt disable bit */ 150 151 152/* |
|
118 * Scatter-gather list format, type 1, kind 00. 119 */ 120struct mlx_sgentry 121{ 122 u_int32_t sg_addr; 123 u_int32_t sg_count; 124} __attribute__ ((packed)); 125 --- 248 unchanged lines hidden --- | 153 * Scatter-gather list format, type 1, kind 00. 154 */ 155struct mlx_sgentry 156{ 157 u_int32_t sg_addr; 158 u_int32_t sg_count; 159} __attribute__ ((packed)); 160 --- 248 unchanged lines hidden --- |