Commit e2023b87 authored by Dave Jiang's avatar Dave Jiang Committed by 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: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 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,
......
This diff is collapsed.
This diff is collapsed.
......@@ -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_ */
......@@ -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)
......
This diff is collapsed.
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment