}
/**
- * This method is called by the remote device to inform the controller
- * that this remote device has started.
- *
- */
-
-void scic_sds_controller_remote_device_started(struct scic_sds_controller *scic,
- struct scic_sds_remote_device *sci_dev)
-{
- u32 state;
- scic_sds_controller_device_handler_t started;
-
- state = scic->parent.state_machine.current_state_id;
- started = scic_sds_controller_state_handler_table[state].remote_device_started_handler;
-
- if (started)
- started(scic, sci_dev);
- else {
- dev_dbg(scic_to_dev(scic),
- "%s: SCIC Controller 0x%p remote device started event "
- "from device 0x%p in unexpected state %d\n",
- __func__, scic, sci_dev, state);
- }
-}
-
-/**
* This is a helper method to determine if any remote devices on this
* controller are still in the stopping state.
*
scic_sds_controller_device_handler_t stopped;
state = scic->parent.state_machine.current_state_id;
- stopped = scic_sds_controller_state_handler_table[state].remote_device_stopped_handler;
+ stopped = scic_sds_controller_state_handler_table[state].device_stopped;
if (stopped)
stopped(scic, sci_dev);
.base.complete_io = scic_sds_controller_stopping_state_complete_io_handler,
.base.continue_io = scic_sds_controller_default_request_handler,
.terminate_request = scic_sds_controller_default_request_handler,
- .remote_device_stopped_handler = scic_sds_controller_stopping_state_device_stopped_handler,
+ .device_stopped = scic_sds_controller_stopping_state_device_stopped_handler,
},
[SCI_BASE_CONTROLLER_STATE_STOPPED] = {
.base.reset = scic_sds_controller_general_reset_handler,
sci_base_controller_request_handler_t terminate_request;
scic_sds_controller_phy_handler_t link_up;
scic_sds_controller_phy_handler_t link_down;
- scic_sds_controller_device_handler_t remote_device_started_handler;
- scic_sds_controller_device_handler_t remote_device_stopped_handler;
+ scic_sds_controller_device_handler_t device_stopped;
};
extern const struct scic_sds_controller_state_handler
#define scic_sds_controller_clear_invalid_phy(controller, phy) \
((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index))
-/* --------------------------------------------------------------------------- */
-
-
-/* --------------------------------------------------------------------------- */
-
void scic_sds_controller_post_request(
struct scic_sds_controller *this_controller,
u32 request);
-/* --------------------------------------------------------------------------- */
-
void scic_sds_controller_release_frame(
struct scic_sds_controller *this_controller,
u32 frame_index);
void *frame_header,
void *frame_buffer);
-/* --------------------------------------------------------------------------- */
-
enum sci_status scic_sds_controller_allocate_remote_node_context(
struct scic_sds_controller *this_controller,
struct scic_sds_remote_device *the_device,
struct scic_sds_controller *this_controller,
u16 node_id);
-/* --------------------------------------------------------------------------- */
-
struct scic_sds_request *scic_sds_controller_get_io_request_from_tag(
struct scic_sds_controller *this_controller,
u16 io_tag);
struct scic_sds_controller *this_controller,
u16 io_tag);
-/*
- * *****************************************************************************
- * * CORE CONTROLLER POWER CONTROL METHODS
- * ***************************************************************************** */
-
-
void scic_sds_controller_power_control_queue_insert(
struct scic_sds_controller *this_controller,
struct scic_sds_phy *the_phy);
struct scic_sds_controller *this_controller,
struct scic_sds_phy *the_phy);
-/*
- * *****************************************************************************
- * * CORE CONTROLLER PHY MESSAGE PROCESSING
- * ***************************************************************************** */
-
void scic_sds_controller_link_up(
struct scic_sds_controller *this_controller,
struct scic_sds_port *the_port,
struct scic_sds_port *the_port,
struct scic_sds_phy *the_phy);
-/*
- * *****************************************************************************
- * * CORE CONTROLLER REMOTE DEVICE MESSAGE PROCESSING
- * ***************************************************************************** */
-
-
-void scic_sds_controller_remote_device_started(
- struct scic_sds_controller *this_controller,
- struct scic_sds_remote_device *the_device);
-
void scic_sds_controller_remote_device_stopped(
struct scic_sds_controller *this_controller,
struct scic_sds_remote_device *the_device);
SCIC_REMOTE_DEVICE_NOT_READY_START_REQUESTED);
}
-/**
- *
- * @object: This is the struct sci_base_object that is cast into a
- * struct scic_sds_remote_device.
- *
- * This is the exit function for the SCI_BASE_REMOTE_DEVICE_STATE_STARTING it
- * reports that the device start is complete. none
- */
-static void scic_sds_remote_device_starting_state_exit(
- struct sci_base_object *object)
+static void scic_sds_remote_device_starting_state_exit(struct sci_base_object *object)
{
- struct scic_sds_remote_device *sci_dev =
- (struct scic_sds_remote_device *)object;
- struct scic_sds_controller *scic =
- scic_sds_remote_device_get_controller(sci_dev);
+ struct scic_sds_remote_device *sci_dev = container_of(object, typeof(*sci_dev),
+ 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);
-
/*
* @todo Check the device object for the proper return code for this
* callback
*/
isci_remote_device_start_complete(ihost, idev, SCI_SUCCESS);
-
- scic_sds_controller_remote_device_started(
- scic_sds_remote_device_get_controller(sci_dev),
- sci_dev);
}
/**