Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ea99d52 authored by Maciej Trela's avatar Maciej Trela Committed by Dan Williams
Browse files

isci: remove base_remote_device abstraction



Merge struct sci_base_remote_device into scic_sds_remote_device.  As for
now sci_base_remote_device was accessed indirectly using
scic_sds_remote_device->parent field.  Both machine state handlers are
also merged together.

Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMaciej Trela <Maciej.Trela@intel.com>
Signed-off-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent c629582d
Loading
Loading
Loading
Loading
+0 −274
Original line number Diff line number Diff line
/*
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * GPL LICENSE SUMMARY
 *
 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * 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.
 *
 * 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 St - Fifth Floor, Boston, MA 02110-1301 USA.
 * The full GNU General Public License is included in this distribution
 * in the file called LICENSE.GPL.
 *
 * BSD LICENSE
 *
 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *   * Neither the name of Intel Corporation nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _SCI_BASE_REMOTE_DEVICE_H_
#define _SCI_BASE_REMOTE_DEVICE_H_

/**
 * This file contains all of the structures, constants, and methods common to
 *    all remote device object definitions.
 *
 *
 */

#include "sci_base_state_machine.h"

struct scic_sds_request;

/**
 * enum sci_base_remote_device_states - This enumeration depicts all the states
 *    for the common remote device state machine.
 *
 *
 */
enum sci_base_remote_device_states {
	/**
	 * Simply the initial state for the base remote device state machine.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_INITIAL,

	/**
	 * This state indicates that the remote device has successfully been
	 * stopped.  In this state no new IO operations are permitted.
	 * This state is entered from the INITIAL state.
	 * This state is entered from the STOPPING state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STOPPED,

	/**
	 * This state indicates the the remote device is in the process of
	 * becoming ready (i.e. starting).  In this state no new IO operations
	 * are permitted.
	 * This state is entered from the STOPPED state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STARTING,

	/**
	 * This state indicates the remote device is now ready.  Thus, the user
	 * is able to perform IO operations on the remote device.
	 * This state is entered from the STARTING state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_READY,

	/**
	 * This state indicates that the remote device is in the process of
	 * stopping.  In this state no new IO operations are permitted, but
	 * existing IO operations are allowed to complete.
	 * This state is entered from the READY state.
	 * This state is entered from the FAILED state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STOPPING,

	/**
	 * This state indicates that the remote device has failed.
	 * In this state no new IO operations are permitted.
	 * This state is entered from the INITIALIZING state.
	 * This state is entered from the READY state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_FAILED,

	/**
	 * This state indicates the device is being reset.
	 * In this state no new IO operations are permitted.
	 * This state is entered from the READY state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_RESETTING,

	/**
	 * Simply the final state for the base remote device state machine.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_FINAL,
};

/**
 * struct sci_base_remote_device - The base remote device object abstracts the
 *    fields common to all SCI remote device objects.
 *
 *
 */
struct sci_base_remote_device {
	/**
	 * The field specifies that the parent object for the base remote
	 * device is the base object itself.
	 */
	struct sci_base_object parent;

	/**
	 * This field contains the information for the base remote device state
	 * machine.
	 */
	struct sci_base_state_machine state_machine;
};


typedef enum sci_status (*sci_base_remote_device_handler_t)(
	struct sci_base_remote_device *
	);

typedef enum sci_status (*sci_base_remote_device_request_handler_t)(
	struct sci_base_remote_device *,
	struct scic_sds_request *
	);

typedef enum sci_status (*sci_base_remote_device_high_priority_request_complete_handler_t)(
	struct sci_base_remote_device *,
	struct scic_sds_request *,
	void *,
	enum sci_io_status
	);

/**
 * struct sci_base_remote_device_state_handler - This structure contains all of
 *    the state handler methods common to base remote device state machines.
 *    Handler methods provide the ability to change the behavior for user
 *    requests or transitions depending on the state the machine is in.
 *
 *
 */
struct sci_base_remote_device_state_handler {
	/**
	 * The start_handler specifies the method invoked when a user attempts to
	 * start a remote device.
	 */
	sci_base_remote_device_handler_t start_handler;

	/**
	 * The stop_handler specifies the method invoked when a user attempts to
	 * stop a remote device.
	 */
	sci_base_remote_device_handler_t stop_handler;

	/**
	 * The fail_handler specifies the method invoked when a remote device
	 * failure has occurred.  A failure may be due to an inability to
	 * initialize/configure the device.
	 */
	sci_base_remote_device_handler_t fail_handler;

	/**
	 * The destruct_handler specifies the method invoked when attempting to
	 * destruct a remote device.
	 */
	sci_base_remote_device_handler_t destruct_handler;

	/**
	 * The reset handler specifies the method invloked when requesting to reset a
	 * remote device.
	 */
	sci_base_remote_device_handler_t reset_handler;

	/**
	 * The reset complete handler specifies the method invloked when reporting
	 * that a reset has completed to the remote device.
	 */
	sci_base_remote_device_handler_t reset_complete_handler;

	/**
	 * The start_io_handler specifies the method invoked when a user
	 * attempts to start an IO request for a remote device.
	 */
	sci_base_remote_device_request_handler_t start_io_handler;

	/**
	 * The complete_io_handler specifies the method invoked when a user
	 * attempts to complete an IO request for a remote device.
	 */
	sci_base_remote_device_request_handler_t complete_io_handler;

	/**
	 * The continue_io_handler specifies the method invoked when a user
	 * attempts to continue an IO request for a remote device.
	 */
	sci_base_remote_device_request_handler_t continue_io_handler;

	/**
	 * The start_task_handler specifies the method invoked when a user
	 * attempts to start a task management request for a remote device.
	 */
	sci_base_remote_device_request_handler_t start_task_handler;

	/**
	 * The complete_task_handler specifies the method invoked when a user
	 * attempts to complete a task management request for a remote device.
	 */
	sci_base_remote_device_request_handler_t complete_task_handler;

};

/**
 * sci_base_remote_device_construct() - Construct the base remote device
 * @this_remote_device: This parameter specifies the base remote device to be
 *    constructed.
 * @state_table: This parameter specifies the table of state definitions to be
 *    utilized for the remote device state machine.
 *
 */
static inline void sci_base_remote_device_construct(
	struct sci_base_remote_device *base_dev,
	const struct sci_base_state *state_table)
{
	base_dev->parent.private = NULL;
	sci_base_state_machine_construct(
		&base_dev->state_machine,
		&base_dev->parent,
		state_table,
		SCI_BASE_REMOTE_DEVICE_STATE_INITIAL
		);

	sci_base_state_machine_start(
		&base_dev->state_machine
		);
}
#endif /* _SCI_BASE_REMOTE_DEVICE_H_ */
+4 −4
Original line number Diff line number Diff line
@@ -1500,13 +1500,13 @@ void scic_sds_controller_link_down(struct scic_sds_controller *scic,
 *
 */
static bool scic_sds_controller_has_remote_devices_stopping(
	struct scic_sds_controller *this_controller)
	struct scic_sds_controller *controller)
{
	u32 index;

	for (index = 0; index < this_controller->remote_node_entries; index++) {
		if ((this_controller->device_table[index] != NULL) &&
		   (this_controller->device_table[index]->parent.state_machine.current_state_id
	for (index = 0; index < controller->remote_node_entries; index++) {
		if ((controller->device_table[index] != NULL) &&
		   (controller->device_table[index]->state_machine.current_state_id
		    == SCI_BASE_REMOTE_DEVICE_STATE_STOPPING))
			return true;
	}
+245 −267

File changed.

Preview size limit exceeded, changes collapsed.

+162 −26
Original line number Diff line number Diff line
@@ -56,22 +56,74 @@
#ifndef _SCIC_SDS_REMOTE_DEVICE_H_
#define _SCIC_SDS_REMOTE_DEVICE_H_

#include "intel_sas.h"
#include "scu_remote_node_context.h"
#include "scic_sds_remote_node_context.h"

/**
 * This file contains the structures, constants, and prototypes for the
 *    struct scic_sds_remote_device object.
 * enum scic_sds_remote_device_states - This enumeration depicts all the states
 *    for the common remote device state machine.
 *
 *
 */
enum scic_sds_remote_device_states {
	/**
	 * Simply the initial state for the base remote device state machine.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_INITIAL,

#include "intel_sas.h"
#include "sci_base_remote_device.h"
#include "scu_remote_node_context.h"
#include "scic_sds_remote_node_context.h"
	/**
	 * This state indicates that the remote device has successfully been
	 * stopped.  In this state no new IO operations are permitted.
	 * This state is entered from the INITIAL state.
	 * This state is entered from the STOPPING state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STOPPED,

	/**
	 * This state indicates the the remote device is in the process of
	 * becoming ready (i.e. starting).  In this state no new IO operations
	 * are permitted.
	 * This state is entered from the STOPPED state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STARTING,

	/**
	 * This state indicates the remote device is now ready.  Thus, the user
	 * is able to perform IO operations on the remote device.
	 * This state is entered from the STARTING state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_READY,

	/**
	 * This state indicates that the remote device is in the process of
	 * stopping.  In this state no new IO operations are permitted, but
	 * existing IO operations are allowed to complete.
	 * This state is entered from the READY state.
	 * This state is entered from the FAILED state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_STOPPING,

	/**
	 * This state indicates that the remote device has failed.
	 * In this state no new IO operations are permitted.
	 * This state is entered from the INITIALIZING state.
	 * This state is entered from the READY state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_FAILED,

struct scic_sds_controller;
struct scic_sds_port;
struct scic_sds_request;
struct scic_sds_remote_device_state_handler;
	/**
	 * This state indicates the device is being reset.
	 * In this state no new IO operations are permitted.
	 * This state is entered from the READY state.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_RESETTING,

	/**
	 * Simply the final state for the base remote device state machine.
	 */
	SCI_BASE_REMOTE_DEVICE_STATE_FINAL,
};

/**
 * enum scic_sds_ssp_remote_device_ready_substates -
@@ -186,14 +238,21 @@ enum scic_sds_smp_remote_device_ready_substates {
 */
struct scic_sds_remote_device {
	/**
	 * This field is the common base for all remote device objects.
	 * The field specifies that the parent object for the base remote
	 * device is the base object itself.
	 */
	struct sci_base_object parent;

	/**
	 * This field contains the information for the base remote device state
	 * machine.
	 */
	struct sci_base_remote_device parent;
	struct sci_base_state_machine state_machine;

	/**
	 * This field is the programmed device port width.  This value is written to
	 * the RCN data structure to tell the SCU how many open connections this
	 * device can have.
	 * This field is the programmed device port width.  This value is
	 * written to the RCN data structure to tell the SCU how many open
	 * connections this device can have.
	 */
	u32 device_port_width;

@@ -279,6 +338,16 @@ struct scic_sds_remote_device {
	const struct scic_sds_remote_device_state_handler *state_handlers;
};

typedef enum sci_status (*scic_sds_remote_device_request_handler_t)(
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request);

typedef enum sci_status (*scic_sds_remote_device_high_priority_request_complete_handler_t)(
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request,
	void *,
	enum sci_io_status);

typedef enum sci_status (*scic_sds_remote_device_handler_t)(
	struct scic_sds_remote_device *this_device);

@@ -308,7 +377,74 @@ typedef void (*scic_sds_remote_device_ready_not_ready_handler_t)(
 *
 */
struct scic_sds_remote_device_state_handler {
	struct sci_base_remote_device_state_handler parent;
	/**
	 * The start_handler specifies the method invoked when a user
	 * attempts to start a remote device.
	 */
	scic_sds_remote_device_handler_t start_handler;

	/**
	 * The stop_handler specifies the method invoked when a user attempts to
	 * stop a remote device.
	 */
	scic_sds_remote_device_handler_t stop_handler;

	/**
	 * The fail_handler specifies the method invoked when a remote device
	 * failure has occurred.  A failure may be due to an inability to
	 * initialize/configure the device.
	 */
	scic_sds_remote_device_handler_t fail_handler;

	/**
	 * The destruct_handler specifies the method invoked when attempting to
	 * destruct a remote device.
	 */
	scic_sds_remote_device_handler_t destruct_handler;

	/**
	 * The reset handler specifies the method invloked when requesting to
	 * reset a remote device.
	 */
	scic_sds_remote_device_handler_t reset_handler;

	/**
	 * The reset complete handler specifies the method invloked when
	 * reporting that a reset has completed to the remote device.
	 */
	scic_sds_remote_device_handler_t reset_complete_handler;

	/**
	 * The start_io_handler specifies the method invoked when a user
	 * attempts to start an IO request for a remote device.
	 */
	scic_sds_remote_device_request_handler_t start_io_handler;

	/**
	 * The complete_io_handler specifies the method invoked when a user
	 * attempts to complete an IO request for a remote device.
	 */
	scic_sds_remote_device_request_handler_t complete_io_handler;

	/**
	 * The continue_io_handler specifies the method invoked when a user
	 * attempts to continue an IO request for a remote device.
	 */
	scic_sds_remote_device_request_handler_t continue_io_handler;

	/**
	 * The start_task_handler specifies the method invoked when a user
	 * attempts to start a task management request for a remote device.
	 */
	scic_sds_remote_device_request_handler_t start_task_handler;

	/**
	 * The complete_task_handler specifies the method invoked when a user
	 * attempts to complete a task management request for a remote device.
	 */
	scic_sds_remote_device_request_handler_t complete_task_handler;


	scic_sds_remote_device_suspend_handler_t suspend_handler;
	scic_sds_remote_device_resume_handler_t resume_handler;
	scic_sds_remote_device_event_handler_t event_handler;
@@ -490,30 +626,30 @@ void scic_sds_remote_device_start_request(
void scic_sds_remote_device_continue_request(void *sci_dev);

enum sci_status scic_sds_remote_device_default_start_handler(
	struct sci_base_remote_device *this_device);
	struct scic_sds_remote_device *this_device);

enum sci_status scic_sds_remote_device_default_fail_handler(
	struct sci_base_remote_device *this_device);
	struct scic_sds_remote_device *this_device);

enum sci_status scic_sds_remote_device_default_destruct_handler(
	struct sci_base_remote_device *this_device);
	struct scic_sds_remote_device *this_device);

enum sci_status scic_sds_remote_device_default_reset_handler(
	struct sci_base_remote_device *device);
	struct scic_sds_remote_device *device);

enum sci_status scic_sds_remote_device_default_reset_complete_handler(
	struct sci_base_remote_device *device);
	struct scic_sds_remote_device *device);

enum sci_status scic_sds_remote_device_default_start_request_handler(
	struct sci_base_remote_device *device,
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request);

enum sci_status scic_sds_remote_device_default_complete_request_handler(
	struct sci_base_remote_device *device,
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request);

enum sci_status scic_sds_remote_device_default_continue_request_handler(
	struct sci_base_remote_device *device,
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request);

enum sci_status scic_sds_remote_device_default_suspend_handler(
@@ -529,10 +665,10 @@ enum sci_status scic_sds_remote_device_default_frame_handler(
	u32 frame_index);

enum sci_status scic_sds_remote_device_ready_state_stop_handler(
	struct sci_base_remote_device *device);
	struct scic_sds_remote_device *device);

enum sci_status scic_sds_remote_device_ready_state_reset_handler(
	struct sci_base_remote_device *device);
	struct scic_sds_remote_device *device);

enum sci_status scic_sds_remote_device_general_frame_handler(
	struct scic_sds_remote_device *this_device,
+51 −53
Original line number Diff line number Diff line
@@ -77,33 +77,32 @@
 * the idle state. enum sci_status
 */
static enum sci_status scic_sds_smp_remote_device_ready_idle_substate_start_io_handler(
	struct sci_base_remote_device *device,
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request)
{
	enum sci_status status;
	struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)device;

	/* Will the port allow the io request to start? */
	status = this_device->owning_port->state_handlers->start_io_handler(
		this_device->owning_port, this_device, request);
	status = device->owning_port->state_handlers->start_io_handler(
			device->owning_port, device, request);

	if (status == SCI_SUCCESS) {
		status =
			scic_sds_remote_node_context_start_io(this_device->rnc, request);
		status = scic_sds_remote_node_context_start_io(
				device->rnc, request);

		if (status == SCI_SUCCESS)
			status = scic_sds_request_start(request);

		if (status == SCI_SUCCESS) {
			this_device->working_request = request;
			device->working_request = request;

			sci_base_state_machine_change_state(
				&this_device->ready_substate_machine,
				&device->ready_substate_machine,
				SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD
				);
		}

		scic_sds_remote_device_start_request(this_device, request, status);
		scic_sds_remote_device_start_request(device, request, status);
	}

	return status;
@@ -123,7 +122,7 @@ static enum sci_status scic_sds_smp_remote_device_ready_idle_substate_start_io_h
 * until this one is complete. enum sci_status
 */
static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler(
	struct sci_base_remote_device *device,
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request)
{
	return SCI_FAILURE_INVALID_STATE;
@@ -137,38 +136,37 @@ static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_start_io_ha
 *
 * enum sci_status
 */
static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
	struct sci_base_remote_device *device,
static enum sci_status
scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
	struct scic_sds_remote_device *device,
	struct scic_sds_request *request)
{
	enum sci_status status;
	struct scic_sds_remote_device *this_device;
	struct scic_sds_request *the_request;

	this_device = (struct scic_sds_remote_device *)device;
	the_request = (struct scic_sds_request *)request;

	status = scic_sds_io_request_complete(the_request);

	if (status == SCI_SUCCESS) {
		status = scic_sds_port_complete_io(
			this_device->owning_port, this_device, the_request);
			device->owning_port, device, the_request);

		if (status == SCI_SUCCESS) {
			scic_sds_remote_device_decrement_request_count(this_device);
			scic_sds_remote_device_decrement_request_count(device);
			sci_base_state_machine_change_state(
				&this_device->ready_substate_machine,
				&device->ready_substate_machine,
				SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE
				);
		} else
			dev_err(scirdev_to_dev(this_device),
			dev_err(scirdev_to_dev(device),
				"%s: SCIC SDS Remote Device 0x%p io request "
				"0x%p could not be completd on the port 0x%p "
				"failed with status %d.\n",
				__func__,
				this_device,
				device,
				the_request,
				this_device->owning_port,
				device->owning_port,
				status);
	}

@@ -204,34 +202,34 @@ static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_frame_handl

static const struct scic_sds_remote_device_state_handler scic_sds_smp_remote_device_ready_substate_handler_table[] = {
	[SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE] = {
		.parent.start_handler		= scic_sds_remote_device_default_start_handler,
		.parent.stop_handler		= scic_sds_remote_device_ready_state_stop_handler,
		.parent.fail_handler		= scic_sds_remote_device_default_fail_handler,
		.parent.destruct_handler	= scic_sds_remote_device_default_destruct_handler,
		.parent.reset_handler		= scic_sds_remote_device_default_reset_handler,
		.parent.reset_complete_handler	= scic_sds_remote_device_default_reset_complete_handler,
		.parent.start_io_handler	= scic_sds_smp_remote_device_ready_idle_substate_start_io_handler,
		.parent.complete_io_handler	= scic_sds_remote_device_default_complete_request_handler,
		.parent.continue_io_handler	= scic_sds_remote_device_default_continue_request_handler,
		.parent.start_task_handler	= scic_sds_remote_device_default_start_request_handler,
		.parent.complete_task_handler	= scic_sds_remote_device_default_complete_request_handler,
		.start_handler		= scic_sds_remote_device_default_start_handler,
		.stop_handler		= scic_sds_remote_device_ready_state_stop_handler,
		.fail_handler		= scic_sds_remote_device_default_fail_handler,
		.destruct_handler	= scic_sds_remote_device_default_destruct_handler,
		.reset_handler		= scic_sds_remote_device_default_reset_handler,
		.reset_complete_handler	= scic_sds_remote_device_default_reset_complete_handler,
		.start_io_handler	= scic_sds_smp_remote_device_ready_idle_substate_start_io_handler,
		.complete_io_handler	= scic_sds_remote_device_default_complete_request_handler,
		.continue_io_handler	= scic_sds_remote_device_default_continue_request_handler,
		.start_task_handler	= scic_sds_remote_device_default_start_request_handler,
		.complete_task_handler	= scic_sds_remote_device_default_complete_request_handler,
		.suspend_handler	= scic_sds_remote_device_default_suspend_handler,
		.resume_handler		= scic_sds_remote_device_default_resume_handler,
		.event_handler		= scic_sds_remote_device_general_event_handler,
		.frame_handler		= scic_sds_remote_device_default_frame_handler
	},
	[SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD] = {
		.parent.start_handler		= scic_sds_remote_device_default_start_handler,
		.parent.stop_handler		= scic_sds_remote_device_ready_state_stop_handler,
		.parent.fail_handler		= scic_sds_remote_device_default_fail_handler,
		.parent.destruct_handler	= scic_sds_remote_device_default_destruct_handler,
		.parent.reset_handler		= scic_sds_remote_device_default_reset_handler,
		.parent.reset_complete_handler	= scic_sds_remote_device_default_reset_complete_handler,
		.parent.start_io_handler	= scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler,
		.parent.complete_io_handler	= scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler,
		.parent.continue_io_handler	= scic_sds_remote_device_default_continue_request_handler,
		.parent.start_task_handler	= scic_sds_remote_device_default_start_request_handler,
		.parent.complete_task_handler	= scic_sds_remote_device_default_complete_request_handler,
		.start_handler		= scic_sds_remote_device_default_start_handler,
		.stop_handler		= scic_sds_remote_device_ready_state_stop_handler,
		.fail_handler		= scic_sds_remote_device_default_fail_handler,
		.destruct_handler	= scic_sds_remote_device_default_destruct_handler,
		.reset_handler		= scic_sds_remote_device_default_reset_handler,
		.reset_complete_handler	= scic_sds_remote_device_default_reset_complete_handler,
		.start_io_handler	= scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler,
		.complete_io_handler	= scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler,
		.continue_io_handler	= scic_sds_remote_device_default_continue_request_handler,
		.start_task_handler	= scic_sds_remote_device_default_start_request_handler,
		.complete_task_handler	= scic_sds_remote_device_default_complete_request_handler,
		.suspend_handler	= scic_sds_remote_device_default_suspend_handler,
		.resume_handler		= scic_sds_remote_device_default_resume_handler,
		.event_handler		= scic_sds_remote_device_general_event_handler,
@@ -251,7 +249,7 @@ static const struct scic_sds_remote_device_state_handler scic_sds_smp_remote_dev
static void scic_sds_smp_remote_device_ready_idle_substate_enter(struct sci_base_object *object)
{
	struct scic_sds_remote_device *sci_dev = container_of(object, typeof(*sci_dev),
							      parent.parent);
							      parent);
	struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
	struct isci_host *ihost = sci_object_get_association(scic);
	struct isci_remote_device *idev = sci_object_get_association(sci_dev);
@@ -276,7 +274,7 @@ static void scic_sds_smp_remote_device_ready_cmd_substate_enter(
	struct sci_base_object *object)
{
	struct scic_sds_remote_device *sci_dev = container_of(object, typeof(*sci_dev),
							      parent.parent);
							      parent);
	struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
	struct isci_host *ihost = sci_object_get_association(scic);
	struct isci_remote_device *idev = sci_object_get_association(sci_dev);
@@ -301,7 +299,7 @@ static void scic_sds_smp_remote_device_ready_cmd_substate_enter(
static void scic_sds_smp_remote_device_ready_cmd_substate_exit(struct sci_base_object *object)
{
	struct scic_sds_remote_device *sci_dev = container_of(object, typeof(*sci_dev),
							      parent.parent);
							      parent);
	sci_dev->working_request = NULL;
}

Loading