1/*
2 * Copyright (c) 2014, LSI Corp.
3 * All rights reserved.
4 * Author: Marian Choy
5 * Support: freebsdraid@lsi.com
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 28 unchanged lines hidden (view full) ---
37 *
38 * Send feedback to: <megaraidfbsd@lsi.com>
39 * Mail to: LSI Corporation, 1621 Barber Lane, Milpitas, CA 95035
40 * ATTN: MegaRaid FreeBSD
41 *
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas_ioctl.h 265555 2014-05-07 16:16:49Z ambrisko $");
46
47#ifndef MRSAS_IOCTL_H
48#define MRSAS_IOCTL_H
49
50#ifndef _IOWR
51#include <sys/ioccom.h>
52#endif /* !_IOWR */
53
54/*
55 * We need to use the same values as the mfi driver until MegaCli adds
56 * support for this (mrsas) driver:
57 * M is for MegaRAID. (This is typically the vendor or product initial)
58 * 1 arbitrary. (This may be used to segment kinds of commands.
59 * (1-9 status, 10-20 policy, etc.)
60 * struct mrsas_iocpacket (sizeof() this parameter will be used.)
61 * These three values are encoded into a somewhat unique, 32-bit value.
62 */
63
64#define MRSAS_IOC_FIRMWARE_PASS_THROUGH _IOWR('M', 1, struct mrsas_iocpacket)
65
66#define MRSAS_IOC_SCAN_BUS _IO('M', 10)
67
68#define MAX_IOCTL_SGE 16
69#define MFI_FRAME_DIR_READ 0x0010
70#define MFI_CMD_LD_SCSI_IO 0x03
71
72#define INQUIRY_CMD 0x12
73#define INQUIRY_CMDLEN 6
74#define INQUIRY_REPLY_LEN 96
75#define INQUIRY_VENDOR 8 /* Offset in reply data to vendor name */
--- 13 unchanged lines hidden (view full) ---
89 union {
90 u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
91 struct mrsas_header hdr;
92 } frame;
93 struct iovec sgl[MAX_IOCTL_SGE];
94};
95#pragma pack()
96
97#endif /* MRSAS_IOCTL_H */
2 * Copyright (c) 2014, LSI Corp.
3 * All rights reserved.
4 * Author: Marian Choy
5 * Support: freebsdraid@lsi.com
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 28 unchanged lines hidden (view full) ---
37 *
38 * Send feedback to: <megaraidfbsd@lsi.com>
39 * Mail to: LSI Corporation, 1621 Barber Lane, Milpitas, CA 95035
40 * ATTN: MegaRaid FreeBSD
41 *
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas_ioctl.h 265555 2014-05-07 16:16:49Z ambrisko $");
46
47#ifndef MRSAS_IOCTL_H
48#define MRSAS_IOCTL_H
49
50#ifndef _IOWR
51#include <sys/ioccom.h>
52#endif /* !_IOWR */
53
54/*
55 * We need to use the same values as the mfi driver until MegaCli adds
56 * support for this (mrsas) driver:
57 * M is for MegaRAID. (This is typically the vendor or product initial)
58 * 1 arbitrary. (This may be used to segment kinds of commands.
59 * (1-9 status, 10-20 policy, etc.)
60 * struct mrsas_iocpacket (sizeof() this parameter will be used.)
61 * These three values are encoded into a somewhat unique, 32-bit value.
62 */
63
64#define MRSAS_IOC_FIRMWARE_PASS_THROUGH _IOWR('M', 1, struct mrsas_iocpacket)
65
66#define MRSAS_IOC_SCAN_BUS _IO('M', 10)
67
68#define MAX_IOCTL_SGE 16
69#define MFI_FRAME_DIR_READ 0x0010
70#define MFI_CMD_LD_SCSI_IO 0x03
71
72#define INQUIRY_CMD 0x12
73#define INQUIRY_CMDLEN 6
74#define INQUIRY_REPLY_LEN 96
75#define INQUIRY_VENDOR 8 /* Offset in reply data to vendor name */
--- 13 unchanged lines hidden (view full) ---
89 union {
90 u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
91 struct mrsas_header hdr;
92 } frame;
93 struct iovec sgl[MAX_IOCTL_SGE];
94};
95#pragma pack()
96
97#endif /* MRSAS_IOCTL_H */