bool do_notify_user)
{
struct scic_sds_controller *scic = scic_sds_port_get_controller(sci_port);
- struct isci_port *iport = sci_object_get_association(sci_port);
+ struct isci_port *iport = sci_port->iport;
struct isci_host *ihost = scic->ihost;
struct isci_phy *iphy = sci_phy->iphy;
*/
static void scic_sds_port_ready_substate_waiting_enter(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
scic_sds_port_set_ready_state_handlers(
sci_port, SCIC_SDS_PORT_READY_SUBSTATE_WAITING
static void scic_sds_port_ready_substate_operational_enter(void *object)
{
u32 index;
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
struct scic_sds_controller *scic =
scic_sds_port_get_controller(sci_port);
struct isci_host *ihost = scic->ihost;
- struct isci_port *iport = sci_object_get_association(sci_port);
+ struct isci_port *iport = sci_port->iport;
scic_sds_port_set_ready_state_handlers(
sci_port,
*/
static void scic_sds_port_ready_substate_operational_exit(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
struct scic_sds_controller *scic =
scic_sds_port_get_controller(sci_port);
struct isci_host *ihost = scic->ihost;
- struct isci_port *iport = sci_object_get_association(sci_port);
+ struct isci_port *iport = sci_port->iport;
/*
* Kill the dummy task for this port if it has not yet posted
*/
static void scic_sds_port_ready_substate_configuring_enter(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
struct scic_sds_controller *scic =
scic_sds_port_get_controller(sci_port);
struct isci_host *ihost = scic->ihost;
- struct isci_port *iport = sci_object_get_association(sci_port);
+ struct isci_port *iport = sci_port->iport;
scic_sds_port_set_ready_state_handlers(
sci_port,
static void scic_sds_port_ready_substate_configuring_exit(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
scic_sds_port_suspend_port_task_scheduler(sci_port);
}
*/
static void scic_sds_port_stopped_state_enter(void *object)
{
- struct scic_sds_port *sci_port;
-
- sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
scic_sds_port_set_base_state_handlers(
sci_port, SCI_BASE_PORT_STATE_STOPPED
*/
static void scic_sds_port_stopped_state_exit(void *object)
{
- struct scic_sds_port *sci_port;
-
- sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
/* Enable and suspend the port task scheduler */
scic_sds_port_enable_port_task_scheduler(sci_port);
static void scic_sds_port_ready_state_enter(void *object)
{
struct scic_sds_controller *scic;
- struct scic_sds_port *sci_port;
+ struct scic_sds_port *sci_port = object;
struct isci_port *iport;
struct isci_host *ihost;
u32 prev_state;
- sci_port = container_of(object, typeof(*sci_port), parent);
scic = scic_sds_port_get_controller(sci_port);
ihost = scic->ihost;
- iport = sci_object_get_association(sci_port);
+ iport = sci_port->iport;
/* Put the ready state handlers in place though they will not be there long */
scic_sds_port_set_base_state_handlers(sci_port, SCI_BASE_PORT_STATE_READY);
static void scic_sds_port_ready_state_exit(void *object)
{
- struct scic_sds_port *sci_port;
+ struct scic_sds_port *sci_port = object;
- sci_port = container_of(object, typeof(*sci_port), parent);
sci_base_state_machine_stop(&sci_port->ready_substate_machine);
scic_sds_port_invalidate_dummy_remote_node(sci_port);
}
*/
static void scic_sds_port_resetting_state_enter(void *object)
{
- struct scic_sds_port *sci_port;
-
- sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
scic_sds_port_set_base_state_handlers(
sci_port, SCI_BASE_PORT_STATE_RESETTING
*/
static inline void scic_sds_port_resetting_state_exit(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
isci_timer_stop(sci_port->timer_handle);
}
*/
static void scic_sds_port_stopping_state_enter(void *object)
{
- struct scic_sds_port *sci_port;
-
- sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
scic_sds_port_set_base_state_handlers(
sci_port, SCI_BASE_PORT_STATE_STOPPING
static inline void
scic_sds_port_stopping_state_exit(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
+ struct scic_sds_port *sci_port = object;
isci_timer_stop(sci_port->timer_handle);
*/
static void scic_sds_port_failed_state_enter(void *object)
{
- struct scic_sds_port *sci_port = (struct scic_sds_port *)object;
- struct isci_port *iport = sci_object_get_association(sci_port);
+ struct scic_sds_port *sci_port = object;
+ struct isci_port *iport = sci_port->iport;
scic_sds_port_set_base_state_handlers(sci_port,
SCI_BASE_PORT_STATE_FAILED);
{
u32 index;
- sci_port->parent.private = NULL;
sci_base_state_machine_construct(&sci_port->state_machine,
- &sci_port->parent,
+ sci_port,
scic_sds_port_state_table,
SCI_BASE_PORT_STATE_STOPPED);
sci_base_state_machine_start(&sci_port->state_machine);
sci_base_state_machine_construct(&sci_port->ready_substate_machine,
- &sci_port->parent,
+ sci_port,
scic_sds_port_ready_substate_table,
SCIC_SDS_PORT_READY_SUBSTATE_WAITING);