/* * Management Module Support for MPT (Message Passing Technology) based * controllers * * This code is based on drivers/scsi/mpt3sas/mpt3sas_ctl.h * Copyright (C) 2012-2014 LSI Corporation * Copyright (C) 2013-2014 Avago Technologies * (mailto: MPT-FusionLinux.pdl@avagotech.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * NO WARRANTY * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is * solely responsible for determining the appropriateness of using and * distributing the Program and assumes all risks associated with its * exercise of rights under this Agreement, including but not limited to * the risks and costs of program errors, damage to or loss of data, * programs or equipment, and unavailability or interruption of operations.
* DISCLAIMER OF LIABILITY * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA.
*/
/* UID not found */ #define MPT3_DIAG_UID_NOT_FOUND (0xFF)
/** * struct mpt3_ioctl_header - main header structure * @ioc_number - IOC unit number * @port_number - IOC port number * @max_data_size - maximum number bytes to transfer on read
*/ struct mpt3_ioctl_header {
uint32_t ioc_number;
uint32_t port_number;
uint32_t max_data_size;
};
/* number of event log entries */ #define MPT3SAS_CTL_EVENT_LOG_SIZE (200)
/** * struct mpt3_ioctl_eventquery - query event count and type * @hdr - generic header * @event_entries - number of events returned by get_event_report * @rsvd - reserved * @event_types - type of events currently being captured
*/ struct mpt3_ioctl_eventquery { struct mpt3_ioctl_header hdr;
uint16_t event_entries;
uint16_t rsvd;
uint32_t event_types[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
};
/** * struct mpt3_ioctl_eventenable - enable/disable event capturing * @hdr - generic header * @event_types - toggle off/on type of events to be captured
*/ struct mpt3_ioctl_eventenable { struct mpt3_ioctl_header hdr;
uint32_t event_types[4];
};
#define MPT3_EVENT_DATA_SIZE (192) /** * struct MPT3_IOCTL_EVENTS - * @event - the event that was reported * @context - unique value for each event assigned by driver * @data - event data returned in fw reply message
*/ struct MPT3_IOCTL_EVENTS {
uint32_t event;
uint32_t context;
uint8_t data[MPT3_EVENT_DATA_SIZE];
};
/** * struct mpt3_ioctl_command - generic mpt firmware passthru ioctl * @hdr - generic header * @timeout - command timeout in seconds. (if zero then use driver default * value). * @reply_frame_buf_ptr - reply location * @data_in_buf_ptr - destination for read * @data_out_buf_ptr - data source for write * @sense_data_ptr - sense data location * @max_reply_bytes - maximum number of reply bytes to be sent to app. * @data_in_size - number bytes for data transfer in (read) * @data_out_size - number bytes for data transfer out (write) * @max_sense_bytes - maximum number of bytes for auto sense buffers * @data_sge_offset - offset in words from the start of the request message to * the first SGL * @mf[1];
*/ struct mpt3_ioctl_command { struct mpt3_ioctl_header hdr;
uint32_t timeout; void __user *reply_frame_buf_ptr; void __user *data_in_buf_ptr; void __user *data_out_buf_ptr; void __user *sense_data_ptr;
uint32_t max_reply_bytes;
uint32_t data_in_size;
uint32_t data_out_size;
uint32_t max_sense_bytes;
uint32_t data_sge_offset;
uint8_t mf[1];
};
/** * struct mpt3_ioctl_btdh_mapping - mapping info * @hdr - generic header * @id - target device identification number * @bus - SCSI bus number that the target device exists on * @handle - device handle for the target device * @rsvd - reserved * * To obtain a bus/id the application sets * handle to valid handle, and bus/id to 0xFFFF. * * To obtain the device handle the application sets * bus/id valid value, and the handle to 0xFFFF.
*/ struct mpt3_ioctl_btdh_mapping { struct mpt3_ioctl_header hdr;
uint32_t id;
uint32_t bus;
uint16_t handle;
uint16_t rsvd;
};
/* flags for mpt3_diag_read_buffer */ #define MPT3_FLAGS_REREGISTER (0x0001)
#define MPT3_PRODUCT_SPECIFIC_DWORDS 23
/** * struct mpt3_diag_register - application register with driver * @hdr - generic header * @reserved - * @buffer_type - specifies either TRACE, SNAPSHOT, or EXTENDED * @application_flags - misc flags * @diagnostic_flags - specifies flags affecting command processing * @product_specific - product specific information * @requested_buffer_size - buffers size in bytes * @unique_id - tag specified by application that is used to signal ownership * of the buffer. * * This will allow the driver to setup any required buffers that will be * needed by firmware to communicate with the driver.
*/ struct mpt3_diag_register { struct mpt3_ioctl_header hdr;
uint8_t reserved;
uint8_t buffer_type;
uint16_t application_flags;
uint32_t diagnostic_flags;
uint32_t product_specific[MPT3_PRODUCT_SPECIFIC_DWORDS];
uint32_t requested_buffer_size;
uint32_t unique_id;
};
/** * struct mpt3_diag_unregister - application unregister with driver * @hdr - generic header * @unique_id - tag uniquely identifies the buffer to be unregistered * * This will allow the driver to cleanup any memory allocated for diag * messages and to free up any resources.
*/ struct mpt3_diag_unregister { struct mpt3_ioctl_header hdr;
uint32_t unique_id;
};
/** * struct mpt3_diag_query - query relevant info associated with diag buffers * @hdr - generic header * @reserved - * @buffer_type - specifies either TRACE, SNAPSHOT, or EXTENDED * @application_flags - misc flags * @diagnostic_flags - specifies flags affecting command processing * @product_specific - product specific information * @total_buffer_size - diag buffer size in bytes * @driver_added_buffer_size - size of extra space appended to end of buffer * @unique_id - unique id associated with this buffer. * * The application will send only buffer_type and unique_id. Driver will * inspect unique_id first, if valid, fill in all the info. If unique_id is * 0x00, the driver will return info specified by Buffer Type.
*/ struct mpt3_diag_query { struct mpt3_ioctl_header hdr;
uint8_t reserved;
uint8_t buffer_type;
uint16_t application_flags;
uint32_t diagnostic_flags;
uint32_t product_specific[MPT3_PRODUCT_SPECIFIC_DWORDS];
uint32_t total_buffer_size;
uint32_t driver_added_buffer_size;
uint32_t unique_id;
};
/** * struct mpt3_diag_release - request to send Diag Release Message to firmware * @hdr - generic header * @unique_id - tag uniquely identifies the buffer to be released * * This allows ownership of the specified buffer to returned to the driver, * allowing an application to read the buffer without fear that firmware is * overwriting information in the buffer.
*/ struct mpt3_diag_release { struct mpt3_ioctl_header hdr;
uint32_t unique_id;
};
/** * struct mpt3_diag_read_buffer - request for copy of the diag buffer * @hdr - generic header * @status - * @reserved - * @flags - misc flags * @starting_offset - starting offset within drivers buffer where to start * reading data at into the specified application buffer * @bytes_to_read - number of bytes to copy from the drivers buffer into the * application buffer starting at starting_offset. * @unique_id - unique id associated with this buffer. * @diagnostic_data - data payload
*/ struct mpt3_diag_read_buffer { struct mpt3_ioctl_header hdr;
uint8_t status;
uint8_t reserved;
uint16_t flags;
uint32_t starting_offset;
uint32_t bytes_to_read;
uint32_t unique_id;
uint32_t diagnostic_data[1];
};
/** * struct mpt3_passthru_command - generic mpt firmware passthru command * @dev_index - device index * @timeout - command timeout in seconds. (if zero then use driver default * value). * @reply_frame_buf_ptr - MPI reply location * @data_in_buf_ptr - destination for read * @data_out_buf_ptr - data source for write * @max_reply_bytes - maximum number of reply bytes to be sent to app. * @data_in_size - number bytes for data transfer in (read) * @data_out_size - number bytes for data transfer out (write) * @mpi_request - request frame
*/ struct mpt3_passthru_command {
u8 dev_index;
uint32_t timeout; void *reply_frame_buf_ptr; void *data_in_buf_ptr; void *data_out_buf_ptr;
uint32_t max_reply_bytes;
uint32_t data_in_size;
uint32_t data_out_size;
Mpi26MctpPassthroughRequest_t *mpi_request;
};
/* * mpt3sas_get_device_count - Retrieve the count of MCTP passthrough * capable devices managed by the driver. * * Returns number of devices that support MCTP passthrough.
*/ int mpt3sas_get_device_count(void);
/* * mpt3sas_send_passthru_cmd - Send an MPI MCTP passthrough command to * firmware * @command: The MPI MCTP passthrough command to send to firmware * * Returns 0 on success, anything else is error .
*/ int mpt3sas_send_mctp_passthru_req(struct mpt3_passthru_command *command);
#endif/* MPT3SAS_CTL_H_INCLUDED */
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.