提交 e2023b87 编写于 作者: D Dave Jiang 提交者: Dan Williams

isci: replace this_* and the_* variables with more meaningful names

Removed any instances of the_* and this_* to variable names that are more
meaningful and tell us what they actually are.
Signed-off-by: NDave Jiang <dave.jiang@intel.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 2d70de5a
......@@ -73,8 +73,8 @@
*
* Private operation for the pool
*/
#define SCI_POOL_INCREMENT(this_pool, index) \
(((index) + 1) == (this_pool).size ? 0 : (index) + 1)
#define SCI_POOL_INCREMENT(pool, index) \
(((index) + 1) == (pool).size ? 0 : (index) + 1)
/**
* SCI_POOL_CREATE() -
......@@ -98,8 +98,8 @@
* This macro evaluates the pool and returns true if the pool is empty. If the
* pool is empty the user should not perform any get operation on the pool.
*/
#define sci_pool_empty(this_pool) \
((this_pool).get == (this_pool).put)
#define sci_pool_empty(pool) \
((pool).get == (pool).put)
/**
* sci_pool_full() -
......@@ -107,8 +107,8 @@
* This macro evaluates the pool and returns true if the pool is full. If the
* pool is full the user should not perform any put operation.
*/
#define sci_pool_full(this_pool) \
(SCI_POOL_INCREMENT(this_pool, (this_pool).put) == (this_pool).get)
#define sci_pool_full(pool) \
(SCI_POOL_INCREMENT(pool, (pool).put) == (pool).get)
/**
* sci_pool_size() -
......@@ -118,25 +118,25 @@
* pointers can be written simultaneously by different users. As a result,
* this macro subtracts 1 from the internal size
*/
#define sci_pool_size(this_pool) \
((this_pool).size - 1)
#define sci_pool_size(pool) \
((pool).size - 1)
/**
* sci_pool_count() -
*
* This macro indicates the number of elements currently contained in the pool.
*/
#define sci_pool_count(this_pool) \
#define sci_pool_count(pool) \
(\
sci_pool_empty((this_pool)) \
sci_pool_empty((pool)) \
? 0 \
: (\
sci_pool_full((this_pool)) \
? sci_pool_size((this_pool)) \
sci_pool_full((pool)) \
? sci_pool_size((pool)) \
: (\
(this_pool).get > (this_pool).put \
? ((this_pool).size - (this_pool).get + (this_pool).put) \
: ((this_pool).put - (this_pool).get) \
(pool).get > (pool).put \
? ((pool).size - (pool).get + (pool).put) \
: ((pool).put - (pool).get) \
) \
) \
)
......@@ -146,11 +146,11 @@
*
* This macro initializes the pool to an empty condition.
*/
#define sci_pool_initialize(this_pool) \
#define sci_pool_initialize(pool) \
{ \
(this_pool).size = (sizeof((this_pool).array) / sizeof((this_pool).array[0])); \
(this_pool).get = 0; \
(this_pool).put = 0; \
(pool).size = (sizeof((pool).array) / sizeof((pool).array[0])); \
(pool).get = 0; \
(pool).put = 0; \
}
/**
......@@ -159,10 +159,10 @@
* This macro will get the next free element from the pool. This should only be
* called if the pool is not empty.
*/
#define sci_pool_get(this_pool, my_value) \
#define sci_pool_get(pool, my_value) \
{ \
(my_value) = (this_pool).array[(this_pool).get]; \
(this_pool).get = SCI_POOL_INCREMENT((this_pool), (this_pool).get); \
(my_value) = (pool).array[(pool).get]; \
(pool).get = SCI_POOL_INCREMENT((pool), (pool).get); \
}
/**
......@@ -171,10 +171,10 @@
* This macro will put the value into the pool. This should only be called if
* the pool is not full.
*/
#define sci_pool_put(this_pool, the_value) \
#define sci_pool_put(pool, value) \
{ \
(this_pool).array[(this_pool).put] = (the_value); \
(this_pool).put = SCI_POOL_INCREMENT((this_pool), (this_pool).put); \
(pool).array[(pool).put] = (value); \
(pool).put = SCI_POOL_INCREMENT((pool), (pool).put); \
}
/**
......@@ -183,16 +183,16 @@
* This macro will search the pool and remove any elements in the pool matching
* the supplied value. This method can only be utilized on pools
*/
#define sci_pool_erase(this_pool, type, the_value) \
#define sci_pool_erase(pool, type, value) \
{ \
type tmp_value; \
u32 index; \
u32 element_count = sci_pool_count((this_pool)); \
u32 element_count = sci_pool_count((pool)); \
\
for (index = 0; index < element_count; index++) { \
sci_pool_get((this_pool), tmp_value); \
if (tmp_value != (the_value)) \
sci_pool_put((this_pool), tmp_value); \
sci_pool_get((pool), tmp_value); \
if (tmp_value != (value)) \
sci_pool_put((pool), tmp_value); \
} \
}
......
......@@ -542,12 +542,12 @@ void scic_sds_controller_copy_sata_response(
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_remote_device *sci_dev,
u16 *node_id);
void scic_sds_controller_free_remote_node_context(
struct scic_sds_controller *this_controller,
struct scic_sds_remote_device *the_device,
struct scic_sds_remote_device *sci_dev,
u16 node_id);
union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer(
......@@ -565,25 +565,25 @@ struct scu_task_context *scic_sds_controller_get_task_context_buffer(
void scic_sds_controller_power_control_queue_insert(
struct scic_sds_controller *this_controller,
struct scic_sds_phy *the_phy);
struct scic_sds_phy *sci_phy);
void scic_sds_controller_power_control_queue_remove(
struct scic_sds_controller *this_controller,
struct scic_sds_phy *the_phy);
struct scic_sds_phy *sci_phy);
void scic_sds_controller_link_up(
struct scic_sds_controller *this_controller,
struct scic_sds_port *the_port,
struct scic_sds_phy *the_phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
void scic_sds_controller_link_down(
struct scic_sds_controller *this_controller,
struct scic_sds_port *the_port,
struct scic_sds_phy *the_phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
void scic_sds_controller_remote_device_stopped(
struct scic_sds_controller *this_controller,
struct scic_sds_remote_device *the_device);
struct scic_sds_remote_device *sci_dev);
void scic_sds_controller_copy_task_context(
struct scic_sds_controller *this_controller,
......
......@@ -378,77 +378,77 @@ static inline void scic_sds_port_decrement_request_count(struct scic_sds_port *s
(((port)->active_phy_mask & (1 << (phy)->phy_index)) != 0)
void scic_sds_port_construct(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
u8 port_index,
struct scic_sds_controller *owning_controller);
struct scic_sds_controller *scic);
enum sci_status scic_sds_port_initialize(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
void __iomem *port_task_scheduler_registers,
void __iomem *port_configuration_regsiter,
void __iomem *viit_registers);
enum sci_status scic_sds_port_add_phy(
struct scic_sds_port *this_port,
struct scic_sds_phy *the_phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
enum sci_status scic_sds_port_remove_phy(
struct scic_sds_port *this_port,
struct scic_sds_phy *the_phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
void scic_sds_port_setup_transports(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
u32 device_id);
void scic_sds_port_deactivate_phy(
struct scic_sds_port *this_port,
struct scic_sds_phy *phy,
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy,
bool do_notify_user);
bool scic_sds_port_link_detected(
struct scic_sds_port *this_port,
struct scic_sds_phy *phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
void scic_sds_port_link_up(
struct scic_sds_port *this_port,
struct scic_sds_phy *phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
void scic_sds_port_link_down(
struct scic_sds_port *this_port,
struct scic_sds_phy *phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
enum sci_status scic_sds_port_start_io(
struct scic_sds_port *this_port,
struct scic_sds_remote_device *the_device,
struct scic_sds_request *the_io_request);
struct scic_sds_port *sci_port,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *sci_req);
enum sci_status scic_sds_port_complete_io(
struct scic_sds_port *this_port,
struct scic_sds_remote_device *the_device,
struct scic_sds_request *the_io_request);
struct scic_sds_port *sci_port,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *sci_req);
enum sas_linkrate scic_sds_port_get_max_allowed_speed(
struct scic_sds_port *this_port);
struct scic_sds_port *sci_port);
void scic_sds_port_broadcast_change_received(
struct scic_sds_port *this_port,
struct scic_sds_phy *this_phy);
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy);
bool scic_sds_port_is_valid_phy_assignment(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
u32 phy_index);
void scic_sds_port_get_sas_address(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
struct sci_sas_address *sas_address);
void scic_sds_port_get_attached_sas_address(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
struct sci_sas_address *sas_address);
void scic_sds_port_get_attached_protocols(
struct scic_sds_port *this_port,
struct scic_sds_port *sci_port,
struct sci_sas_identify_address_frame_protocols *protocols);
#endif /* _SCIC_SDS_PORT_H_ */
......@@ -149,17 +149,17 @@ enum sci_status scic_remote_device_da_construct(
static void scic_sds_remote_device_get_info_from_smp_discover_response(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct smp_response_discover *discover_response)
{
/* decode discover_response to set sas_address to this_device. */
this_device->device_address.high =
/* decode discover_response to set sas_address to sci_dev. */
sci_dev->device_address.high =
discover_response->attached_sas_address.high;
this_device->device_address.low =
sci_dev->device_address.low =
discover_response->attached_sas_address.low;
this_device->target_protocols.u.all = discover_response->protocols.u.all;
sci_dev->target_protocols.u.all = discover_response->protocols.u.all;
}
......@@ -168,15 +168,15 @@ enum sci_status scic_remote_device_ea_construct(
struct smp_response_discover *discover_response)
{
enum sci_status status;
struct scic_sds_controller *the_controller;
struct scic_sds_controller *scic;
the_controller = scic_sds_port_get_controller(sci_dev->owning_port);
scic = scic_sds_port_get_controller(sci_dev->owning_port);
scic_sds_remote_device_get_info_from_smp_discover_response(
sci_dev, discover_response);
status = scic_sds_controller_allocate_remote_node_context(
the_controller, sci_dev, &sci_dev->rnc->remote_node_index);
scic, sci_dev, &sci_dev->rnc->remote_node_index);
if (status == SCI_SUCCESS) {
if (sci_dev->target_protocols.u.bits.attached_ssp_target) {
......@@ -294,32 +294,32 @@ bool scic_remote_device_is_atapi(struct scic_sds_remote_device *sci_dev)
/**
*
* @this_device: The remote device for which the suspend is being requested.
* @sci_dev: The remote device for which the suspend is being requested.
*
* This method invokes the remote device suspend state handler. enum sci_status
*/
enum sci_status scic_sds_remote_device_suspend(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 suspend_type)
{
return this_device->state_handlers->suspend_handler(this_device, suspend_type);
return sci_dev->state_handlers->suspend_handler(sci_dev, suspend_type);
}
/**
*
* @this_device: The remote device for which the resume is being requested.
* @sci_dev: The remote device for which the resume is being requested.
*
* This method invokes the remote device resume state handler. enum sci_status
*/
enum sci_status scic_sds_remote_device_resume(
struct scic_sds_remote_device *this_device)
struct scic_sds_remote_device *sci_dev)
{
return this_device->state_handlers->resume_handler(this_device);
return sci_dev->state_handlers->resume_handler(sci_dev);
}
/**
*
* @this_device: The remote device for which the event handling is being
* @sci_dev: The remote device for which the event handling is being
* requested.
* @frame_index: This is the frame index that is being processed.
*
......@@ -327,31 +327,31 @@ enum sci_status scic_sds_remote_device_resume(
* enum sci_status
*/
enum sci_status scic_sds_remote_device_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index)
{
return this_device->state_handlers->frame_handler(this_device, frame_index);
return sci_dev->state_handlers->frame_handler(sci_dev, frame_index);
}
/**
*
* @this_device: The remote device for which the event handling is being
* @sci_dev: The remote device for which the event handling is being
* requested.
* @event_code: This is the event code that is to be processed.
*
* This method invokes the remote device event handler. enum sci_status
*/
enum sci_status scic_sds_remote_device_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code)
{
return this_device->state_handlers->event_handler(this_device, event_code);
return sci_dev->state_handlers->event_handler(sci_dev, event_code);
}
/**
*
* @controller: The controller that is starting the io request.
* @this_device: The remote device for which the start io handling is being
* @sci_dev: The remote device for which the start io handling is being
* requested.
* @io_request: The io request that is being started.
*
......@@ -359,17 +359,17 @@ enum sci_status scic_sds_remote_device_event_handler(
*/
enum sci_status scic_sds_remote_device_start_io(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request)
{
return this_device->state_handlers->start_io_handler(
this_device, io_request);
return sci_dev->state_handlers->start_io_handler(
sci_dev, io_request);
}
/**
*
* @controller: The controller that is completing the io request.
* @this_device: The remote device for which the complete io handling is being
* @sci_dev: The remote device for which the complete io handling is being
* requested.
* @io_request: The io request that is being completed.
*
......@@ -377,17 +377,17 @@ enum sci_status scic_sds_remote_device_start_io(
*/
enum sci_status scic_sds_remote_device_complete_io(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request)
{
return this_device->state_handlers->complete_io_handler(
this_device, io_request);
return sci_dev->state_handlers->complete_io_handler(
sci_dev, io_request);
}
/**
*
* @controller: The controller that is starting the task request.
* @this_device: The remote device for which the start task handling is being
* @sci_dev: The remote device for which the start task handling is being
* requested.
* @io_request: The task request that is being started.
*
......@@ -395,17 +395,17 @@ enum sci_status scic_sds_remote_device_complete_io(
*/
enum sci_status scic_sds_remote_device_start_task(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request)
{
return this_device->state_handlers->start_task_handler(
this_device, io_request);
return sci_dev->state_handlers->start_task_handler(
sci_dev, io_request);
}
/**
*
* @controller: The controller that is completing the task request.
* @this_device: The remote device for which the complete task handling is
* @sci_dev: The remote device for which the complete task handling is
* being requested.
* @io_request: The task request that is being completed.
*
......@@ -414,22 +414,22 @@ enum sci_status scic_sds_remote_device_start_task(
/**
*
* @this_device:
* @sci_dev:
* @request:
*
* This method takes the request and bulids an appropriate SCU context for the
* request and then requests the controller to post the request. none
*/
void scic_sds_remote_device_post_request(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 request)
{
u32 context;
context = scic_sds_remote_device_build_command_context(this_device, request);
context = scic_sds_remote_device_build_command_context(sci_dev, request);
scic_sds_controller_post_request(
scic_sds_remote_device_get_controller(this_device),
scic_sds_remote_device_get_controller(sci_dev),
context
);
}
......@@ -437,22 +437,22 @@ void scic_sds_remote_device_post_request(
#if !defined(DISABLE_ATAPI)
/**
*
* @this_device: The device to be checked.
* @sci_dev: The device to be checked.
*
* This method check the signature fis of a stp device to decide whether a
* device is atapi or not. true if a device is atapi device. False if a device
* is not atapi.
*/
bool scic_sds_remote_device_is_atapi(
struct scic_sds_remote_device *this_device)
struct scic_sds_remote_device *sci_dev)
{
if (!this_device->target_protocols.u.bits.attached_stp_target)
if (!sci_dev->target_protocols.u.bits.attached_stp_target)
return false;
else if (this_device->is_direct_attached) {
else if (sci_dev->is_direct_attached) {
struct scic_sds_phy *phy;
struct scic_sata_phy_properties properties;
struct sata_fis_reg_d2h *signature_fis;
phy = scic_sds_port_get_a_connected_phy(this_device->owning_port);
phy = scic_sds_port_get_a_connected_phy(sci_dev->owning_port);
scic_sata_phy_get_properties(phy, &properties);
/* decode the signature fis. */
......@@ -506,16 +506,16 @@ static void scic_sds_cb_remote_device_rnc_destruct_complete(
static void scic_sds_remote_device_resume_complete_handler(
void *user_parameter)
{
struct scic_sds_remote_device *this_device;
struct scic_sds_remote_device *sci_dev;
this_device = (struct scic_sds_remote_device *)user_parameter;
sci_dev = (struct scic_sds_remote_device *)user_parameter;
if (
sci_base_state_machine_get_state(&this_device->state_machine)
sci_base_state_machine_get_state(&sci_dev->state_machine)
!= SCI_BASE_REMOTE_DEVICE_STATE_READY
) {
sci_base_state_machine_change_state(
&this_device->state_machine,
&sci_dev->state_machine,
SCI_BASE_REMOTE_DEVICE_STATE_READY
);
}
......@@ -532,16 +532,16 @@ static void scic_sds_remote_device_resume_complete_handler(
* requests and task requests of all types. none
*/
void scic_sds_remote_device_start_request(
struct scic_sds_remote_device *this_device,
struct scic_sds_request *the_request,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *sci_req,
enum sci_status status)
{
/* We still have a fault in starting the io complete it on the port */
if (status == SCI_SUCCESS)
scic_sds_remote_device_increment_request_count(this_device);
scic_sds_remote_device_increment_request_count(sci_dev);
else{
this_device->owning_port->state_handlers->complete_io_handler(
this_device->owning_port, this_device, the_request
sci_dev->owning_port->state_handlers->complete_io_handler(
sci_dev->owning_port, sci_dev, sci_req
);
}
}
......@@ -576,7 +576,7 @@ void scic_sds_remote_device_continue_request(void *dev)
/**
* This method will terminate all of the IO requests in the controllers IO
* request table that were targeted for this device.
* @this_device: This parameter specifies the remote device for which to
* @sci_dev: This parameter specifies the remote device for which to
* attempt to terminate all requests.
*
* This method returns an indication as to whether all requests were
......@@ -584,24 +584,24 @@ void scic_sds_remote_device_continue_request(void *dev)
* this method will return the failure.
*/
static enum sci_status scic_sds_remote_device_terminate_requests(
struct scic_sds_remote_device *this_device)
struct scic_sds_remote_device *sci_dev)
{
enum sci_status status = SCI_SUCCESS;
enum sci_status terminate_status = SCI_SUCCESS;
struct scic_sds_request *the_request;
struct scic_sds_request *sci_req;
u32 index;
u32 request_count = this_device->started_request_count;
u32 request_count = sci_dev->started_request_count;
for (index = 0;
(index < SCI_MAX_IO_REQUESTS) && (request_count > 0);
index++) {
the_request = this_device->owning_port->owning_controller->io_request_table[index];
sci_req = sci_dev->owning_port->owning_controller->io_request_table[index];
if ((the_request != NULL) && (the_request->target_device == this_device)) {
if ((sci_req != NULL) && (sci_req->target_device == sci_dev)) {
terminate_status = scic_controller_terminate_request(
this_device->owning_port->owning_controller,
this_device,
the_request
sci_dev->owning_port->owning_controller,
sci_dev,
sci_req
);
if (terminate_status != SCI_SUCCESS)
......@@ -684,7 +684,7 @@ enum sci_status scic_sds_remote_device_default_resume_handler(
* returns a failure. enum sci_status SCI_FAILURE_INVALID_STATE
*/
static enum sci_status scic_sds_remote_device_core_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code,
bool is_ready_state)
{
......@@ -694,7 +694,7 @@ static enum sci_status scic_sds_remote_device_core_event_handler(
case SCU_EVENT_TYPE_RNC_OPS_MISC:
case SCU_EVENT_TYPE_RNC_SUSPEND_TX:
case SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX:
status = scic_sds_remote_node_context_event_handler(this_device->rnc, event_code);
status = scic_sds_remote_node_context_event_handler(sci_dev->rnc, event_code);
break;
case SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT:
......@@ -702,13 +702,13 @@ static enum sci_status scic_sds_remote_device_core_event_handler(
status = SCI_SUCCESS;
/* Suspend the associated RNC */
scic_sds_remote_node_context_suspend(this_device->rnc,
scic_sds_remote_node_context_suspend(sci_dev->rnc,
SCI_SOFTWARE_SUSPENSION,
NULL, NULL);
dev_dbg(scirdev_to_dev(this_device),
dev_dbg(scirdev_to_dev(sci_dev),
"%s: device: %p event code: %x: %s\n",
__func__, this_device, event_code,
__func__, sci_dev, event_code,
(is_ready_state)
? "I_T_Nexus_Timeout event"
: "I_T_Nexus_Timeout event in wrong state");
......@@ -718,9 +718,9 @@ static enum sci_status scic_sds_remote_device_core_event_handler(
/* Else, fall through and treat as unhandled... */
default:
dev_dbg(scirdev_to_dev(this_device),
dev_dbg(scirdev_to_dev(sci_dev),
"%s: device: %p event code: %x: %s\n",
__func__, this_device, event_code,
__func__, sci_dev, event_code,
(is_ready_state)
? "unexpected event"
: "unexpected event in wrong state");
......@@ -742,10 +742,10 @@ static enum sci_status scic_sds_remote_device_core_event_handler(
* returns a failure. enum sci_status SCI_FAILURE_INVALID_STATE
*/
static enum sci_status scic_sds_remote_device_default_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code)
{
return scic_sds_remote_device_core_event_handler(this_device,
return scic_sds_remote_device_core_event_handler(sci_dev,
event_code,
false);
}
......@@ -762,20 +762,20 @@ static enum sci_status scic_sds_remote_device_default_event_handler(
* SCI_FAILURE_INVALID_STATE
*/
enum sci_status scic_sds_remote_device_default_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index)
{
dev_warn(scirdev_to_dev(this_device),
dev_warn(scirdev_to_dev(sci_dev),
"%s: SCIC Remote Device requested to handle frame %x "
"while in wrong state %d\n",
__func__,
frame_index,
sci_base_state_machine_get_state(
&this_device->state_machine));
&sci_dev->state_machine));
/* Return the frame back to the controller */
scic_sds_controller_release_frame(
scic_sds_remote_device_get_controller(this_device), frame_index
scic_sds_remote_device_get_controller(sci_dev), frame_index
);
return SCI_FAILURE_INVALID_STATE;
......@@ -815,7 +815,7 @@ enum sci_status scic_sds_remote_device_default_continue_request_handler(
* unsolicited frame to that object. enum sci_status SCI_FAILURE_INVALID_STATE
*/
enum sci_status scic_sds_remote_device_general_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index)
{
enum sci_status result;
......@@ -823,22 +823,22 @@ enum sci_status scic_sds_remote_device_general_frame_handler(
struct scic_sds_request *io_request;
result = scic_sds_unsolicited_frame_control_get_header(
&(scic_sds_remote_device_get_controller(this_device)->uf_control),
&(scic_sds_remote_device_get_controller(sci_dev)->uf_control),
frame_index,
(void **)&frame_header
);
if (SCI_SUCCESS == result) {
io_request = scic_sds_controller_get_io_request_from_tag(
scic_sds_remote_device_get_controller(this_device), frame_header->tag);
scic_sds_remote_device_get_controller(sci_dev), frame_header->tag);
if ((io_request == NULL)
|| (io_request->target_device != this_device)) {
|| (io_request->target_device != sci_dev)) {
/*
* We could not map this tag to a valid IO request
* Just toss the frame and continue */
scic_sds_controller_release_frame(
scic_sds_remote_device_get_controller(this_device), frame_index
scic_sds_remote_device_get_controller(sci_dev), frame_index
);
} else {
/* The IO request is now in charge of releasing the frame */
......@@ -852,17 +852,17 @@ enum sci_status scic_sds_remote_device_general_frame_handler(
/**
*
* @[in]: this_device This is the device object that is receiving the event.
* @[in]: sci_dev This is the device object that is receiving the event.
* @[in]: event_code The event code to process.
*
* This is a common method for handling events reported to the remote device
* from the controller object. enum sci_status
*/
enum sci_status scic_sds_remote_device_general_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code)
{
return scic_sds_remote_device_core_event_handler(this_device,
return scic_sds_remote_device_core_event_handler(sci_dev,
event_code,
true);
}
......@@ -1093,7 +1093,7 @@ static enum sci_status scic_sds_remote_device_ready_state_complete_request_handl
/**
*
* @this_device: The struct scic_sds_remote_device which is cast into a
* @sci_dev: The struct scic_sds_remote_device which is cast into a
* struct scic_sds_remote_device.
*
* This method will stop a struct scic_sds_remote_device that is already in the
......@@ -1536,10 +1536,10 @@ static void scic_sds_remote_device_ready_state_exit(
static void scic_sds_remote_device_stopping_state_enter(
struct sci_base_object *object)
{
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_remote_device *sci_dev = (struct scic_sds_remote_device *)object;
SET_STATE_HANDLER(
this_device,
sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_STOPPING
);
......@@ -1556,10 +1556,10 @@ static void scic_sds_remote_device_stopping_state_enter(
static void scic_sds_remote_device_failed_state_enter(
struct sci_base_object *object)
{
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_remote_device *sci_dev = (struct scic_sds_remote_device *)object;
SET_STATE_HANDLER(
this_device,
sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_FAILED
);
......@@ -1576,16 +1576,16 @@ static void scic_sds_remote_device_failed_state_enter(
static void scic_sds_remote_device_resetting_state_enter(
struct sci_base_object *object)
{
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_remote_device *sci_dev = (struct scic_sds_remote_device *)object;
SET_STATE_HANDLER(
this_device,
sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_RESETTING
);
scic_sds_remote_node_context_suspend(
this_device->rnc, SCI_SOFTWARE_SUSPENSION, NULL, NULL);
sci_dev->rnc, SCI_SOFTWARE_SUSPENSION, NULL, NULL);
}
/**
......@@ -1599,9 +1599,9 @@ static void scic_sds_remote_device_resetting_state_enter(
static void scic_sds_remote_device_resetting_state_exit(
struct sci_base_object *object)
{
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_remote_device *sci_dev = (struct scic_sds_remote_device *)object;
scic_sds_remote_node_context_resume(this_device->rnc, NULL, NULL);
scic_sds_remote_node_context_resume(sci_dev->rnc, NULL, NULL);
}
/**
......@@ -1615,10 +1615,10 @@ static void scic_sds_remote_device_resetting_state_exit(
static void scic_sds_remote_device_final_state_enter(
struct sci_base_object *object)
{
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_remote_device *sci_dev = (struct scic_sds_remote_device *)object;
SET_STATE_HANDLER(
this_device,
sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_FINAL
);
......
......@@ -350,25 +350,25 @@ typedef enum sci_status (*scic_sds_remote_device_high_priority_request_complete_
enum sci_io_status);
typedef enum sci_status (*scic_sds_remote_device_handler_t)(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
typedef enum sci_status (*scic_sds_remote_device_suspend_handler_t)(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 suspend_type);
typedef enum sci_status (*scic_sds_remote_device_resume_handler_t)(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
typedef enum sci_status (*scic_sds_remote_device_frame_handler_t)(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index);
typedef enum sci_status (*scic_sds_remote_device_event_handler_t)(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code);
typedef void (*scic_sds_remote_device_ready_not_ready_handler_t)(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
/**
* struct scic_sds_remote_device_state_handler - This structure conains the
......@@ -461,8 +461,8 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
*
* This macro incrments the request count for this device
*/
#define scic_sds_remote_device_increment_request_count(this_device) \
((this_device)->started_request_count++)
#define scic_sds_remote_device_increment_request_count(sci_dev) \
((sci_dev)->started_request_count++)
/**
* scic_sds_remote_device_decrement_request_count() -
......@@ -470,33 +470,33 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
* This macro decrements the request count for this device. This count will
* never decrment past 0.
*/
#define scic_sds_remote_device_decrement_request_count(this_device) \
((this_device)->started_request_count > 0 ? \
(this_device)->started_request_count-- : 0)
#define scic_sds_remote_device_decrement_request_count(sci_dev) \
((sci_dev)->started_request_count > 0 ? \
(sci_dev)->started_request_count-- : 0)
/**
* scic_sds_remote_device_get_request_count() -
*
* This is a helper macro to return the current device request count.
*/
#define scic_sds_remote_device_get_request_count(this_device) \
((this_device)->started_request_count)
#define scic_sds_remote_device_get_request_count(sci_dev) \
((sci_dev)->started_request_count)
/**
* scic_sds_remote_device_get_port() -
*
* This macro returns the owning port of this remote device obejct.
*/
#define scic_sds_remote_device_get_port(this_device) \
((this_device)->owning_port)
#define scic_sds_remote_device_get_port(sci_dev) \
((sci_dev)->owning_port)
/**
* scic_sds_remote_device_get_controller() -
*
* This macro returns the controller object that contains this device object
*/
#define scic_sds_remote_device_get_controller(this_device) \
scic_sds_port_get_controller(scic_sds_remote_device_get_port(this_device))
#define scic_sds_remote_device_get_controller(sci_dev) \
scic_sds_port_get_controller(scic_sds_remote_device_get_port(sci_dev))
/**
* scic_sds_remote_device_set_state_handlers() -
......@@ -504,26 +504,26 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
* This macro sets the remote device state handlers pointer and is set on entry
* to each device state.
*/
#define scic_sds_remote_device_set_state_handlers(this_device, handlers) \
((this_device)->state_handlers = (handlers))
#define scic_sds_remote_device_set_state_handlers(sci_dev, handlers) \
((sci_dev)->state_handlers = (handlers))
/**
* scic_sds_remote_device_get_port() -
*
* This macro returns the owning port of this device
*/
#define scic_sds_remote_device_get_port(this_device) \
((this_device)->owning_port)
#define scic_sds_remote_device_get_port(sci_dev) \
((sci_dev)->owning_port)
/**
* scic_sds_remote_device_get_sequence() -
*
* This macro returns the remote device sequence value
*/
#define scic_sds_remote_device_get_sequence(this_device) \
#define scic_sds_remote_device_get_sequence(sci_dev) \
(\
scic_sds_remote_device_get_controller(this_device)-> \
remote_device_sequence[(this_device)->rnc->remote_node_index] \
scic_sds_remote_device_get_controller(sci_dev)-> \
remote_device_sequence[(sci_dev)->rnc->remote_node_index] \
)
/**
......@@ -531,11 +531,11 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
*
* This macro returns the controllers protocol engine group
*/
#define scic_sds_remote_device_get_controller_peg(this_device) \
#define scic_sds_remote_device_get_controller_peg(sci_dev) \
(\
scic_sds_controller_get_protocol_engine_group(\
scic_sds_port_get_controller(\
scic_sds_remote_device_get_port(this_device) \
scic_sds_remote_device_get_port(sci_dev) \
) \
) \
)
......@@ -545,16 +545,16 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
*
* This macro returns the port index for the devices owning port
*/
#define scic_sds_remote_device_get_port_index(this_device) \
(scic_sds_port_get_index(scic_sds_remote_device_get_port(this_device)))
#define scic_sds_remote_device_get_port_index(sci_dev) \
(scic_sds_port_get_index(scic_sds_remote_device_get_port(sci_dev)))
/**
* scic_sds_remote_device_get_index() -
*
* This macro returns the remote node index for this device object
*/
#define scic_sds_remote_device_get_index(this_device) \
((this_device)->rnc->remote_node_index)
#define scic_sds_remote_device_get_index(sci_dev) \
((sci_dev)->rnc->remote_node_index)
/**
* scic_sds_remote_device_build_command_context() -
......@@ -579,61 +579,61 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
((device)->working_request = (request))
enum sci_status scic_sds_remote_device_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index);
enum sci_status scic_sds_remote_device_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code);
enum sci_status scic_sds_remote_device_start_io(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request);
enum sci_status scic_sds_remote_device_complete_io(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request);
enum sci_status scic_sds_remote_device_resume(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
enum sci_status scic_sds_remote_device_suspend(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 suspend_type);
enum sci_status scic_sds_remote_device_start_task(
struct scic_sds_controller *controller,
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *io_request);
void scic_sds_remote_device_post_request(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 request);
#if !defined(DISABLE_ATAPI)
bool scic_sds_remote_device_is_atapi(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
#else /* !defined(DISABLE_ATAPI) */
#define scic_sds_remote_device_is_atapi(this_device) false
#define scic_sds_remote_device_is_atapi(sci_dev) false
#endif /* !defined(DISABLE_ATAPI) */
void scic_sds_remote_device_start_request(
struct scic_sds_remote_device *this_device,
struct scic_sds_request *the_request,
struct scic_sds_remote_device *sci_dev,
struct scic_sds_request *sci_req,
enum sci_status status);
void scic_sds_remote_device_continue_request(void *sci_dev);
enum sci_status scic_sds_remote_device_default_start_handler(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
enum sci_status scic_sds_remote_device_default_fail_handler(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
enum sci_status scic_sds_remote_device_default_destruct_handler(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
enum sci_status scic_sds_remote_device_default_reset_handler(
struct scic_sds_remote_device *device);
......@@ -654,15 +654,15 @@ enum sci_status scic_sds_remote_device_default_continue_request_handler(
struct scic_sds_request *request);
enum sci_status scic_sds_remote_device_default_suspend_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 suspend_type);
enum sci_status scic_sds_remote_device_default_resume_handler(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
enum sci_status scic_sds_remote_device_default_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index);
enum sci_status scic_sds_remote_device_ready_state_stop_handler(
......@@ -672,14 +672,14 @@ enum sci_status scic_sds_remote_device_ready_state_reset_handler(
struct scic_sds_remote_device *device);
enum sci_status scic_sds_remote_device_general_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index);
enum sci_status scic_sds_remote_device_general_event_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 event_code);
enum sci_status scic_sds_ssp_remote_device_ready_suspended_substate_resume_handler(
struct scic_sds_remote_device *this_device);
struct scic_sds_remote_device *sci_dev);
#endif /* _SCIC_SDS_REMOTE_DEVICE_H_ */
......@@ -86,25 +86,25 @@ struct scic_sds_remote_node_context;
typedef void (*scics_sds_remote_node_context_callback)(void *);
typedef enum sci_status (*scic_sds_remote_node_context_operation)(
struct scic_sds_remote_node_context *this_rnc,
scics_sds_remote_node_context_callback the_callback,
struct scic_sds_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback callback,
void *callback_parameter
);
typedef enum sci_status (*scic_sds_remote_node_context_suspend_operation)(
struct scic_sds_remote_node_context *this_rnc,
struct scic_sds_remote_node_context *sci_rnc,
u32 suspension_type,
scics_sds_remote_node_context_callback the_callback,
scics_sds_remote_node_context_callback callback,
void *callback_parameter
);
typedef enum sci_status (*scic_sds_remote_node_context_io_request)(
struct scic_sds_remote_node_context *this_rnc,
struct scic_sds_request *the_request
struct scic_sds_remote_node_context *sci_rnc,
struct scic_sds_request *sci_req
);
typedef enum sci_status (*scic_sds_remote_node_context_event_handler)(
struct scic_sds_remote_node_context *this_rnc,
struct scic_sds_remote_node_context *sci_rnc,
u32 event_code
);
......@@ -286,7 +286,7 @@ void scic_sds_remote_node_context_construct(
bool scic_sds_remote_node_context_is_ready(
struct scic_sds_remote_node_context *this_rnc);
struct scic_sds_remote_node_context *sci_rnc);
#define scic_sds_remote_node_context_get_remote_node_index(rcn) \
((rnc)->remote_node_index)
......
......@@ -336,32 +336,32 @@ extern const struct sci_base_state scic_sds_io_request_started_task_mgmt_substat
*
* This macro will return the controller for this io request object
*/
#define scic_sds_request_get_controller(this_request) \
((this_request)->owning_controller)
#define scic_sds_request_get_controller(sci_req) \
((sci_req)->owning_controller)
/**
* scic_sds_request_get_device() -
*
* This macro will return the device for this io request object
*/
#define scic_sds_request_get_device(this_request) \
((this_request)->target_device)
#define scic_sds_request_get_device(sci_req) \
((sci_req)->target_device)
/**
* scic_sds_request_get_port() -
*
* This macro will return the port for this io request object
*/
#define scic_sds_request_get_port(this_request) \
scic_sds_remote_device_get_port(scic_sds_request_get_device(this_request))
#define scic_sds_request_get_port(sci_req) \
scic_sds_remote_device_get_port(scic_sds_request_get_device(sci_req))
/**
* scic_sds_request_get_post_context() -
*
* This macro returns the constructed post context result for the io request.
*/
#define scic_sds_request_get_post_context(this_request) \
((this_request)->post_context)
#define scic_sds_request_get_post_context(sci_req) \
((sci_req)->post_context)
/**
* scic_sds_request_get_task_context() -
......@@ -433,41 +433,41 @@ scic_sds_io_request_tc_completion(struct scic_sds_request *request, u32 completi
* ***************************************************************************** */
void scic_sds_request_build_sgl(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
void scic_sds_stp_request_assign_buffers(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
void scic_sds_smp_request_assign_buffers(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
/* --------------------------------------------------------------------------- */
enum sci_status scic_sds_request_start(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
enum sci_status scic_sds_io_request_terminate(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
enum sci_status scic_sds_io_request_complete(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
void scic_sds_io_request_copy_response(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
enum sci_status scic_sds_io_request_event_handler(
struct scic_sds_request *this_request,
struct scic_sds_request *sci_req,
u32 event_code);
enum sci_status scic_sds_io_request_frame_handler(
struct scic_sds_request *this_request,
struct scic_sds_request *sci_req,
u32 frame_index);
enum sci_status scic_sds_task_request_terminate(
struct scic_sds_request *this_request);
struct scic_sds_request *sci_req);
/*
* *****************************************************************************
......@@ -475,10 +475,10 @@ enum sci_status scic_sds_task_request_terminate(
* ***************************************************************************** */
enum sci_status scic_sds_request_started_state_abort_handler(
struct scic_sds_request *request);
struct scic_sds_request *sci_req);
enum sci_status scic_sds_request_started_state_tc_completion_handler(
struct scic_sds_request *this_request,
struct scic_sds_request *sci_req,
u32 completion_code);
#endif /* _SCIC_SDS_IO_REQUEST_H_ */
......@@ -142,15 +142,15 @@ scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
struct scic_sds_request *request)
{
enum sci_status status;
struct scic_sds_request *the_request;
struct scic_sds_request *sci_req;
the_request = (struct scic_sds_request *)request;
sci_req = (struct scic_sds_request *)request;
status = scic_sds_io_request_complete(the_request);
status = scic_sds_io_request_complete(sci_req);
if (status == SCI_SUCCESS) {
status = scic_sds_port_complete_io(
device->owning_port, device, the_request);
device->owning_port, device, sci_req);
if (status == SCI_SUCCESS) {
scic_sds_remote_device_decrement_request_count(device);
......@@ -165,7 +165,7 @@ scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
"failed with status %d.\n",
__func__,
device,
the_request,
sci_req,
device->owning_port,
status);
}
......@@ -175,13 +175,13 @@ scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
/**
* This is frame handler for smp device ready cmd substate.
* @this_device: This is the device object that is receiving the frame.
* @sci_dev: This is the device object that is receiving the frame.
* @frame_index: The index for the frame received.
*
* enum sci_status
*/
static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_frame_handler(
struct scic_sds_remote_device *this_device,
struct scic_sds_remote_device *sci_dev,
u32 frame_index)
{
enum sci_status status;
......@@ -191,7 +191,7 @@ static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_frame_handl
* / in this state. All unsolicited frames are forwarded to the io request
* / object. */
status = scic_sds_io_request_frame_handler(
this_device->working_request,
sci_dev->working_request,
frame_index
);
......
......@@ -62,8 +62,7 @@
u32 scic_sds_smp_request_get_object_size(void);
void scic_sds_smp_request_copy_response(
struct scic_sds_request *this_request);
void scic_sds_smp_request_copy_response(struct scic_sds_request *sci_req);
#endif /* _SCIC_SDS_SMP_REQUEST_T_ */
......@@ -67,7 +67,7 @@
* determine if the RAW task management frame was sent successfully. If the
* raw frame was sent successfully, then the state for the task request
* transitions to waiting for a response frame.
* @this_request: This parameter specifies the request for which the TC
* @sci_req: This parameter specifies the request for which the TC
* completion was received.
* @completion_code: This parameter indicates the completion status information
* for the TC.
......@@ -76,17 +76,17 @@
* this method always returns success.
*/
static enum sci_status scic_sds_ssp_task_request_await_tc_completion_tc_completion_handler(
struct scic_sds_request *this_request,
struct scic_sds_request *sci_req,
u32 completion_code)
{
switch (SCU_GET_COMPLETION_TL_STATUS(completion_code)) {
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
scic_sds_request_set_status(
this_request, SCU_TASK_DONE_GOOD, SCI_SUCCESS
sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS
);
sci_base_state_machine_change_state(
&this_request->started_substate_machine,
&sci_req->started_substate_machine,
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE
);
break;
......@@ -97,15 +97,15 @@ static enum sci_status scic_sds_ssp_task_request_await_tc_completion_tc_completi
* timeout if the task IU wasn't received successfully.
* There is a potential for receiving multiple task responses if we
* decide to send the task IU again. */
dev_warn(scic_to_dev(this_request->owning_controller),
dev_warn(scic_to_dev(sci_req->owning_controller),
"%s: TaskRequest:0x%p CompletionCode:%x - "
"ACK/NAK timeout\n",
__func__,
this_request,
sci_req,
completion_code);
sci_base_state_machine_change_state(
&this_request->started_substate_machine,
&sci_req->started_substate_machine,
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE
);
break;
......@@ -115,12 +115,12 @@ static enum sci_status scic_sds_ssp_task_request_await_tc_completion_tc_completi
* All other completion status cause the IO to be complete. If a NAK
* was received, then it is up to the user to retry the request. */
scic_sds_request_set_status(
this_request,
sci_req,
SCU_NORMALIZE_COMPLETION_STATUS(completion_code),
SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR
);
sci_base_state_machine_change_state(&this_request->state_machine,
sci_base_state_machine_change_state(&sci_req->state_machine,
SCI_BASE_REQUEST_STATE_COMPLETED);
break;
}
......@@ -132,7 +132,7 @@ static enum sci_status scic_sds_ssp_task_request_await_tc_completion_tc_completi
* This method is responsible for processing a terminate/abort request for this
* TC while the request is waiting for the task management response
* unsolicited frame.
* @this_request: This parameter specifies the request for which the
* @sci_req: This parameter specifies the request for which the
* termination was requested.
*
* This method returns an indication as to whether the abort request was
......@@ -155,7 +155,7 @@ static enum sci_status scic_sds_ssp_task_request_await_tc_response_abort_handler
* waiting for a response frame. It will copy the response data, release
* the unsolicited frame, and transition the request to the
* SCI_BASE_REQUEST_STATE_COMPLETED state.
* @this_request: This parameter specifies the request for which the
* @sci_req: This parameter specifies the request for which the
* unsolicited frame was received.
* @frame_index: This parameter indicates the unsolicited frame index that
* should contain the response.
......@@ -202,10 +202,10 @@ static const struct scic_sds_io_request_state_handler scic_sds_ssp_task_request_
static void scic_sds_io_request_started_task_mgmt_await_tc_completion_substate_enter(
struct sci_base_object *object)
{
struct scic_sds_request *this_request = (struct scic_sds_request *)object;
struct scic_sds_request *sci_req = (struct scic_sds_request *)object;
SET_STATE_HANDLER(
this_request,
sci_req,
scic_sds_ssp_task_request_started_substate_handler_table,
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_COMPLETION
);
......@@ -223,10 +223,10 @@ static void scic_sds_io_request_started_task_mgmt_await_tc_completion_substate_e
static void scic_sds_io_request_started_task_mgmt_await_task_response_substate_enter(
struct sci_base_object *object)
{
struct scic_sds_request *this_request = (struct scic_sds_request *)object;
struct scic_sds_request *sci_req = (struct scic_sds_request *)object;
SET_STATE_HANDLER(
this_request,
sci_req,
scic_sds_ssp_task_request_started_substate_handler_table,
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册