Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254393
b: refs/heads/master
c: 2828dc0
h: refs/heads/master
i:
  254391: f880d3e
v: v3
  • Loading branch information
Dan Williams committed Jul 3, 2011
1 parent 485e4ab commit 3bc97c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 81 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35173d579a08c0d145b3020039d3ba33fbf2c184
refs/heads/master: 2828dc0b55da8937439121eaa82e9ee80c520f53
29 changes: 2 additions & 27 deletions trunk/drivers/scsi/isci/core/scic_sds_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,31 +1583,6 @@ void scic_sds_controller_link_down(
sci_phy->phy_index, state);
}

/**
* 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.
Expand Down Expand Up @@ -1642,7 +1617,7 @@ void scic_sds_controller_remote_device_stopped(struct scic_sds_controller *scic,
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);
Expand Down Expand Up @@ -3575,7 +3550,7 @@ const struct scic_sds_controller_state_handler scic_sds_controller_state_handler
.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,
Expand Down
35 changes: 1 addition & 34 deletions trunk/drivers/scsi/isci/core/scic_sds_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ struct scic_sds_controller_state_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
Expand Down Expand Up @@ -532,17 +531,10 @@ 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);
Expand All @@ -552,8 +544,6 @@ void scic_sds_controller_copy_sata_response(
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,
Expand All @@ -568,8 +558,6 @@ union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffe
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);
Expand All @@ -579,12 +567,6 @@ struct scu_task_context *scic_sds_controller_get_task_context_buffer(
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);
Expand All @@ -593,11 +575,6 @@ void scic_sds_controller_power_control_queue_remove(
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,
Expand All @@ -608,16 +585,6 @@ void scic_sds_controller_link_down(
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);
Expand Down
23 changes: 4 additions & 19 deletions trunk/drivers/scsi/isci/core/scic_sds_remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,34 +1533,19 @@ static void scic_sds_remote_device_starting_state_enter(
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);
}

/**
Expand Down

0 comments on commit 3bc97c0

Please sign in to comment.