Deleted Added
full compact
mfivar.h (233877) mfivar.h (235014)
1/*-
2 * Copyright (c) 2006 IronPort Systems
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

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

49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * SUCH DAMAGE.
51 */
52
53#ifndef _MFIVAR_H
54#define _MFIVAR_H
55
56#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 IronPort Systems
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

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

49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * SUCH DAMAGE.
51 */
52
53#ifndef _MFIVAR_H
54#define _MFIVAR_H
55
56#include <sys/cdefs.h>
57__FBSDID("$FreeBSD: head/sys/dev/mfi/mfivar.h 233877 2012-04-04 16:15:40Z jkim $");
57__FBSDID("$FreeBSD: head/sys/dev/mfi/mfivar.h 235014 2012-05-04 16:00:39Z ambrisko $");
58
59#include <sys/lock.h>
60#include <sys/sx.h>
61
62#include <sys/types.h>
63#include <sys/taskqueue.h>
64
65/*

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

100#define MFI_CMD_DATAIN (1<<1)
101#define MFI_CMD_DATAOUT (1<<2)
102#define MFI_CMD_COMPLETED (1<<3)
103#define MFI_CMD_POLLED (1<<4)
104#define MFI_ON_MFIQ_FREE (1<<5)
105#define MFI_ON_MFIQ_READY (1<<6)
106#define MFI_ON_MFIQ_BUSY (1<<7)
107#define MFI_ON_MFIQ_MASK ((1<<5)|(1<<6)|(1<<7))
58
59#include <sys/lock.h>
60#include <sys/sx.h>
61
62#include <sys/types.h>
63#include <sys/taskqueue.h>
64
65/*

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

100#define MFI_CMD_DATAIN (1<<1)
101#define MFI_CMD_DATAOUT (1<<2)
102#define MFI_CMD_COMPLETED (1<<3)
103#define MFI_CMD_POLLED (1<<4)
104#define MFI_ON_MFIQ_FREE (1<<5)
105#define MFI_ON_MFIQ_READY (1<<6)
106#define MFI_ON_MFIQ_BUSY (1<<7)
107#define MFI_ON_MFIQ_MASK ((1<<5)|(1<<6)|(1<<7))
108 int cm_aen_abort;
109 uint8_t retry_for_fw_reset;
110 void (* cm_complete)(struct mfi_command *cm);
111 void *cm_private;
112 int cm_index;
113 int cm_error;
114};
115
116struct mfi_disk {

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

211 bus_dma_tag_t mfi_tb_init_dmat;
212 bus_dmamap_t mfi_tb_init_dmamap;
213 bus_addr_t mfi_tb_init_busaddr;
214 bus_addr_t mfi_tb_ioc_init_busaddr;
215 union mfi_frame *mfi_tb_init;
216
217 TAILQ_HEAD(,mfi_evt_queue_elm) mfi_evt_queue;
218 struct task mfi_evt_task;
108 uint8_t retry_for_fw_reset;
109 void (* cm_complete)(struct mfi_command *cm);
110 void *cm_private;
111 int cm_index;
112 int cm_error;
113};
114
115struct mfi_disk {

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

210 bus_dma_tag_t mfi_tb_init_dmat;
211 bus_dmamap_t mfi_tb_init_dmamap;
212 bus_addr_t mfi_tb_init_busaddr;
213 bus_addr_t mfi_tb_ioc_init_busaddr;
214 union mfi_frame *mfi_tb_init;
215
216 TAILQ_HEAD(,mfi_evt_queue_elm) mfi_evt_queue;
217 struct task mfi_evt_task;
218 struct task mfi_map_sync_task;
219 TAILQ_HEAD(,mfi_aen) mfi_aen_pids;
220 struct mfi_command *mfi_aen_cm;
221 struct mfi_command *mfi_skinny_cm;
219 TAILQ_HEAD(,mfi_aen) mfi_aen_pids;
220 struct mfi_command *mfi_aen_cm;
221 struct mfi_command *mfi_skinny_cm;
222 struct mfi_command *mfi_map_sync_cm;
223 int cm_aen_abort;
224 int cm_map_abort;
222 uint32_t mfi_aen_triggered;
223 uint32_t mfi_poll_waiting;
224 uint32_t mfi_boot_seq_num;
225 struct selinfo mfi_select;
226 int mfi_delete_busy_volumes;
227 int mfi_keep_deleted_volumes;
228 int mfi_detaching;
229

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

298 void (*mfi_issue_cmd)(struct mfi_softc *sc, bus_addr_t bus_add,
299 uint32_t frame_cnt);
300 int (*mfi_adp_reset)(struct mfi_softc *sc);
301 int (*mfi_adp_check_reset)(struct mfi_softc *sc);
302
303 /* ThunderBolt */
304 uint32_t mfi_tbolt;
305 uint32_t MFA_enabled;
225 uint32_t mfi_aen_triggered;
226 uint32_t mfi_poll_waiting;
227 uint32_t mfi_boot_seq_num;
228 struct selinfo mfi_select;
229 int mfi_delete_busy_volumes;
230 int mfi_keep_deleted_volumes;
231 int mfi_detaching;
232

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

301 void (*mfi_issue_cmd)(struct mfi_softc *sc, bus_addr_t bus_add,
302 uint32_t frame_cnt);
303 int (*mfi_adp_reset)(struct mfi_softc *sc);
304 int (*mfi_adp_check_reset)(struct mfi_softc *sc);
305
306 /* ThunderBolt */
307 uint32_t mfi_tbolt;
308 uint32_t MFA_enabled;
306 uint64_t map_id;
307 struct mfi_command *map_update_cmd;
308 /* Single Reply structure size */
309 uint16_t reply_size;
310 /* Singler message size. */
311 uint16_t raid_io_msg_size;
312 TAILQ_HEAD(TB, mfi_cmd_tbolt) mfi_cmd_tbolt_tqh;
313 /* ThunderBolt base contiguous memory mapping. */
314 bus_dma_tag_t mfi_tb_dmat;
315 bus_dmamap_t mfi_tb_dmamap;

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

412extern uint32_t mfi_tbolt_get_memory_requirement(struct mfi_softc *);
413extern int mfi_tbolt_init_desc_pool(struct mfi_softc *, uint8_t *, uint32_t);
414extern int mfi_tbolt_init_MFI_queue(struct mfi_softc *);
415extern void mfi_intr_tbolt(void *arg);
416extern int mfi_tbolt_alloc_cmd(struct mfi_softc *sc);
417extern int mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_command *cm);
418extern int mfi_tbolt_adp_reset(struct mfi_softc *sc);
419extern int mfi_tbolt_reset(struct mfi_softc *sc);
309 /* Single Reply structure size */
310 uint16_t reply_size;
311 /* Singler message size. */
312 uint16_t raid_io_msg_size;
313 TAILQ_HEAD(TB, mfi_cmd_tbolt) mfi_cmd_tbolt_tqh;
314 /* ThunderBolt base contiguous memory mapping. */
315 bus_dma_tag_t mfi_tb_dmat;
316 bus_dmamap_t mfi_tb_dmamap;

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

413extern uint32_t mfi_tbolt_get_memory_requirement(struct mfi_softc *);
414extern int mfi_tbolt_init_desc_pool(struct mfi_softc *, uint8_t *, uint32_t);
415extern int mfi_tbolt_init_MFI_queue(struct mfi_softc *);
416extern void mfi_intr_tbolt(void *arg);
417extern int mfi_tbolt_alloc_cmd(struct mfi_softc *sc);
418extern int mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_command *cm);
419extern int mfi_tbolt_adp_reset(struct mfi_softc *sc);
420extern int mfi_tbolt_reset(struct mfi_softc *sc);
420extern int mfi_tbolt_sync_map_info(struct mfi_softc *sc);
421extern void mfi_tbolt_sync_map_info(struct mfi_softc *sc);
422extern void mfi_handle_map_sync(void *context, int pending);
423extern int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **,
424 uint32_t, void **, size_t);
421
422#define MFIQ_ADD(sc, qname) \
423 do { \
424 struct mfi_qstat *qs; \
425 \
426 qs = &(sc)->mfi_qstat[qname]; \
427 qs->q_length++; \
428 if (qs->q_length > qs->q_max) \

--- 173 unchanged lines hidden ---
425
426#define MFIQ_ADD(sc, qname) \
427 do { \
428 struct mfi_qstat *qs; \
429 \
430 qs = &(sc)->mfi_qstat[qname]; \
431 qs->q_length++; \
432 if (qs->q_length > qs->q_max) \

--- 173 unchanged lines hidden ---