Commit 09d7da13 authored by Dave Jiang's avatar Dave Jiang Committed by Dan Williams

isci: Remove event_* calls as they are just wrappers

Removed isci_event_* calls and call those functions directly.
Reported-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 52ae18ac
......@@ -9,7 +9,7 @@ EXTRA_CFLAGS += -Idrivers/scsi/isci/core/ -Idrivers/scsi/isci/
obj-$(CONFIG_SCSI_ISCI) += isci.o
isci-objs := init.o phy.o request.o sata.o \
remote_device.o port.o timers.o \
host.o task.o events.o probe_roms.o \
host.o task.o probe_roms.o \
core/scic_sds_controller.o \
core/scic_sds_remote_device.o \
core/scic_sds_request.o \
......
......@@ -681,8 +681,7 @@ void scic_sds_controller_copy_task_context(
struct scic_sds_controller *this_controller,
struct scic_sds_request *this_request);
void scic_sds_controller_timeout_handler(
struct scic_sds_controller *controller);
void scic_sds_controller_timeout_handler(void *controller);
void scic_sds_controller_initialize_power_control(
struct scic_sds_controller *this_controller);
......
This diff is collapsed.
This diff is collapsed.
......@@ -431,46 +431,47 @@ static void scic_sds_mpc_agent_link_up(
* assigned port.
* @phy: This is the phy object which has gone link down.
*
* This method handles the manual port configuration link down notifications.
* This function handles the manual port configuration link down notifications.
* Since all ports and phys are associated at initialization time we just turn
* around and notifiy the port object of the link down event. If this PHY is
* not associated with a port there is no action taken. Is it possible to get a
* link down notification from a phy that has no assocoated port?
*/
static void scic_sds_mpc_agent_link_down(
struct scic_sds_controller *controller,
struct scic_sds_controller *scic,
struct scic_sds_port_configuration_agent *port_agent,
struct scic_sds_port *port,
struct scic_sds_phy *phy)
struct scic_sds_port *sci_port,
struct scic_sds_phy *sci_phy)
{
if (port != NULL) {
if (sci_port != NULL) {
/*
* If we can form a new port from the remainder of the phys then we want
* to start the timer to allow the SCI User to cleanup old devices and
* rediscover the port before rebuilding the port with the phys that
* remain in the ready state. */
port_agent->phy_ready_mask &= ~(1 << scic_sds_phy_get_index(phy));
port_agent->phy_configured_mask &= ~(1 << scic_sds_phy_get_index(phy));
* If we can form a new port from the remainder of the phys
* then we want to start the timer to allow the SCI User to
* cleanup old devices and rediscover the port before
* rebuilding the port with the phys that remain in the ready
* state.
*/
port_agent->phy_ready_mask &=
~(1 << scic_sds_phy_get_index(sci_phy));
port_agent->phy_configured_mask &=
~(1 << scic_sds_phy_get_index(sci_phy));
/*
* Check to see if there are more phys waiting to be configured into a port.
* If there are allow the SCI User to tear down this port, if necessary, and
* then reconstruc the port after the timeout. */
if (
(port_agent->phy_configured_mask == 0x0000)
&& (port_agent->phy_ready_mask != 0x0000)
&& !port_agent->timer_pending
) {
* Check to see if there are more phys waiting to be
* configured into a port. If there are allow the SCI User
* to tear down this port, if necessary, and then reconstruct
* the port after the timeout.
*/
if ((port_agent->phy_configured_mask == 0x0000) &&
(port_agent->phy_ready_mask != 0x0000) &&
!port_agent->timer_pending) {
port_agent->timer_pending = true;
isci_event_timer_start(
controller,
port_agent->timer,
SCIC_SDS_MPC_RECONFIGURATION_TIMEOUT
);
isci_timer_start(port_agent->timer,
SCIC_SDS_MPC_RECONFIGURATION_TIMEOUT);
}
scic_sds_port_link_down(port, phy);
scic_sds_port_link_down(sci_port, sci_phy);
}
}
......@@ -535,19 +536,18 @@ static enum sci_status scic_sds_apc_agent_validate_phy_configuration(
* the next time period. This could be caused by either a link down event or a
* link up event where we can not yet tell to which port a phy belongs.
*/
static void scic_sds_apc_agent_start_timer(
struct scic_sds_controller *controller,
static inline void scic_sds_apc_agent_start_timer(
struct scic_sds_controller *scic,
struct scic_sds_port_configuration_agent *port_agent,
struct scic_sds_phy *phy,
struct scic_sds_phy *sci_phy,
u32 timeout)
{
if (port_agent->timer_pending) {
isci_event_timer_stop(controller, port_agent->timer);
}
if (port_agent->timer_pending)
isci_timer_stop(port_agent->timer);
port_agent->timer_pending = true;
isci_event_timer_start(controller, port_agent->timer, timeout);
isci_timer_start(port_agent->timer, timeout);
}
/**
......@@ -816,45 +816,46 @@ void scic_sds_port_configuration_agent_construct(
* This method will construct the port configuration agent for this controller.
*/
enum sci_status scic_sds_port_configuration_agent_initialize(
struct scic_sds_controller *controller,
struct scic_sds_controller *scic,
struct scic_sds_port_configuration_agent *port_agent)
{
enum sci_status status = SCI_SUCCESS;
enum SCIC_PORT_CONFIGURATION_MODE mode;
struct isci_host *ihost = sci_object_get_association(scic);
mode = controller->oem_parameters.sds1.controller.mode_type;
mode = scic->oem_parameters.sds1.controller.mode_type;
if (mode == SCIC_PORT_MANUAL_CONFIGURATION_MODE) {
status = scic_sds_mpc_agent_validate_phy_configuration(controller, port_agent);
status = scic_sds_mpc_agent_validate_phy_configuration(
scic, port_agent);
port_agent->link_up_handler = scic_sds_mpc_agent_link_up;
port_agent->link_down_handler = scic_sds_mpc_agent_link_down;
port_agent->timer = isci_event_timer_create(
controller,
scic_sds_mpc_agent_timeout_handler,
controller
);
port_agent->timer = isci_timer_create(
ihost,
scic,
scic_sds_mpc_agent_timeout_handler);
} else {
status = scic_sds_apc_agent_validate_phy_configuration(controller, port_agent);
status = scic_sds_apc_agent_validate_phy_configuration(
scic, port_agent);
port_agent->link_up_handler = scic_sds_apc_agent_link_up;
port_agent->link_down_handler = scic_sds_apc_agent_link_down;
port_agent->timer = isci_event_timer_create(
controller,
scic_sds_apc_agent_timeout_handler,
controller
);
port_agent->timer = isci_timer_create(
ihost,
scic,
scic_sds_apc_agent_timeout_handler);
}
/* Make sure we have actually gotten a timer */
if ((status == SCI_SUCCESS) && (port_agent->timer == NULL)) {
dev_err(scic_to_dev(controller),
dev_err(scic_to_dev(scic),
"%s: Controller 0x%p automatic port configuration "
"agent could not get timer.\n",
__func__,
controller);
scic);
status = SCI_FAILURE;
}
......
......@@ -1795,7 +1795,7 @@ static void scic_sds_remote_device_initial_state_enter(
* @object: This is the struct sci_base_object that is cast into a
* struct scic_sds_remote_device.
*
* This is the enter method for the SCI_BASE_REMOTE_DEVICE_STATE_INITIAL it
* This is the enter function for the SCI_BASE_REMOTE_DEVICE_STATE_INITIAL it
* sets the stopped state handlers and if this state is entered from the
* SCI_BASE_REMOTE_DEVICE_STATE_STOPPING then the SCI User is informed that the
* device stop is complete. none
......@@ -1803,30 +1803,29 @@ static void scic_sds_remote_device_initial_state_enter(
static void scic_sds_remote_device_stopped_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;
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);
SET_STATE_HANDLER(
this_device,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_STOPPED
);
SET_STATE_HANDLER(sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_STOPPED);
/*
* If we are entering from the stopping state let the SCI User know that
* the stop operation has completed. */
if (this_device->parent.state_machine.previous_state_id
== SCI_BASE_REMOTE_DEVICE_STATE_STOPPING) {
isci_event_remote_device_stop_complete(
scic_sds_remote_device_get_controller(this_device),
this_device,
SCI_SUCCESS
);
}
* the stop operation has completed.
*/
if (sci_dev->parent.state_machine.previous_state_id ==
SCI_BASE_REMOTE_DEVICE_STATE_STOPPING)
isci_remote_device_stop_complete(ihost, idev, SCI_SUCCESS);
scic_sds_controller_remote_device_stopped(
scic_sds_remote_device_get_controller(this_device),
this_device
);
scic_sds_remote_device_get_controller(sci_dev),
sci_dev);
}
/**
......@@ -1834,29 +1833,28 @@ static void scic_sds_remote_device_stopped_state_enter(
* @object: This is the struct sci_base_object that is cast into a
* struct scic_sds_remote_device.
*
* This is the enter method for the SCI_BASE_REMOTE_DEVICE_STATE_STARTING it
* This is the enter function for the SCI_BASE_REMOTE_DEVICE_STATE_STARTING it
* sets the starting state handlers, sets the device not ready, and posts the
* remote node context to the hardware. none
*/
static void scic_sds_remote_device_starting_state_enter(
struct sci_base_object *object)
{
struct scic_sds_controller *the_controller;
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
struct scic_sds_controller *scic;
struct scic_sds_remote_device *sci_dev =
(struct scic_sds_remote_device *)object;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
the_controller = scic_sds_remote_device_get_controller(this_device);
scic = scic_sds_remote_device_get_controller(sci_dev);
SET_STATE_HANDLER(
this_device,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_STARTING
);
sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_STARTING);
isci_event_remote_device_not_ready(
the_controller,
this_device,
SCIC_REMOTE_DEVICE_NOT_READY_START_REQUESTED
);
isci_remote_device_not_ready(
idev,
SCIC_REMOTE_DEVICE_NOT_READY_START_REQUESTED);
}
/**
......@@ -1864,27 +1862,29 @@ static void scic_sds_remote_device_starting_state_enter(
* @object: This is the struct sci_base_object that is cast into a
* struct scic_sds_remote_device.
*
* This is the exit method for the SCI_BASE_REMOTE_DEVICE_STATE_STARTING it
* 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)
{
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;
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_event_remote_device_start_complete(
scic_sds_remote_device_get_controller(this_device),
this_device,
SCI_SUCCESS
);
* @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(this_device),
this_device
);
scic_sds_remote_device_get_controller(sci_dev),
sci_dev);
}
/**
......@@ -1892,30 +1892,28 @@ static void scic_sds_remote_device_starting_state_exit(
* @object: This is the struct sci_base_object that is cast into a
* struct scic_sds_remote_device.
*
* This is the enter method for the SCI_BASE_REMOTE_DEVICE_STATE_READY it sets
* This is the enter function for the SCI_BASE_REMOTE_DEVICE_STATE_READY it sets
* the ready state handlers, and starts the ready substate machine. none
*/
static void scic_sds_remote_device_ready_state_enter(
struct sci_base_object *object)
{
struct scic_sds_controller *the_controller;
struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)object;
the_controller = scic_sds_remote_device_get_controller(this_device);
struct scic_sds_remote_device *sci_dev =
(struct scic_sds_remote_device *)object;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
struct scic_sds_controller *scic
= scic_sds_remote_device_get_controller(sci_dev);
SET_STATE_HANDLER(
this_device,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_READY
);
SET_STATE_HANDLER(sci_dev,
scic_sds_remote_device_state_handler_table,
SCI_BASE_REMOTE_DEVICE_STATE_READY);
the_controller->remote_device_sequence[this_device->rnc->remote_node_index]++;
scic->remote_device_sequence[sci_dev->rnc->remote_node_index]++;
if (this_device->has_ready_substate_machine) {
sci_base_state_machine_start(&this_device->ready_substate_machine);
} else {
isci_event_remote_device_ready(the_controller, this_device);
}
if (sci_dev->has_ready_substate_machine)
sci_base_state_machine_start(&sci_dev->ready_substate_machine);
else
isci_remote_device_ready(idev);
}
/**
......@@ -1923,26 +1921,22 @@ static void scic_sds_remote_device_ready_state_enter(
* @object: This is the struct sci_base_object that is cast into a
* struct scic_sds_remote_device.
*
* This is the exit method for the SCI_BASE_REMOTE_DEVICE_STATE_READY it does
* This is the exit function for the SCI_BASE_REMOTE_DEVICE_STATE_READY it does
* nothing. none
*/
static void scic_sds_remote_device_ready_state_exit(
struct sci_base_object *object)
{
struct scic_sds_controller *the_controller;
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;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
the_controller = scic_sds_remote_device_get_controller(this_device);
if (this_device->has_ready_substate_machine) {
sci_base_state_machine_stop(&this_device->ready_substate_machine);
} else {
isci_event_remote_device_not_ready(
the_controller,
this_device,
SCIC_REMOTE_DEVICE_NOT_READY_STOP_REQUESTED
);
}
if (sci_dev->has_ready_substate_machine)
sci_base_state_machine_stop(&sci_dev->ready_substate_machine);
else
isci_remote_device_not_ready(
idev,
SCIC_REMOTE_DEVICE_NOT_READY_STOP_REQUESTED);
}
/**
......
......@@ -2077,30 +2077,24 @@ static void scic_sds_request_started_state_exit(
static void scic_sds_request_completed_state_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;
struct scic_sds_controller *scic =
scic_sds_request_get_controller(sci_req);
struct isci_host *ihost = sci_object_get_association(scic);
struct isci_request *ireq = sci_object_get_association(sci_req);
SET_STATE_HANDLER(
this_request,
scic_sds_request_state_handler_table,
SCI_BASE_REQUEST_STATE_COMPLETED
);
SET_STATE_HANDLER(sci_req,
scic_sds_request_state_handler_table,
SCI_BASE_REQUEST_STATE_COMPLETED);
/* Tell the SCI_USER that the IO request is complete */
if (this_request->is_task_management_request == false) {
isci_event_io_request_complete(
scic_sds_request_get_controller(this_request),
scic_sds_request_get_device(this_request),
this_request,
this_request->sci_status
);
} else {
isci_event_task_request_complete(
scic_sds_request_get_controller(this_request),
scic_sds_request_get_device(this_request),
this_request,
this_request->sci_status
);
}
if (sci_req->is_task_management_request == false)
isci_request_io_request_complete(ihost,
ireq,
sci_req->sci_status);
else
isci_task_request_complete(ihost, ireq, sci_req->sci_status);
}
/**
......
......@@ -250,22 +250,23 @@ const struct scic_sds_remote_device_state_handler scic_sds_smp_remote_device_rea
* struct scic_sds_remote_device.
*
* This is the SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE enter method.
* This method sets the ready cmd substate handlers and reports the device as
* This function sets the ready cmd substate handlers and reports the device as
* ready. none
*/
static void scic_sds_smp_remote_device_ready_idle_substate_enter(
static inline void scic_sds_smp_remote_device_ready_idle_substate_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;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
SET_STATE_HANDLER(
this_device,
scic_sds_smp_remote_device_ready_substate_handler_table,
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE
);
sci_dev,
scic_sds_smp_remote_device_ready_substate_handler_table,
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE);
isci_event_remote_device_ready(
scic_sds_remote_device_get_controller(this_device), this_device);
isci_remote_device_ready(idev);
}
/**
......@@ -274,27 +275,26 @@ static void scic_sds_smp_remote_device_ready_idle_substate_enter(
* struct scic_sds_remote_device.
*
* This is the SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD enter method. This
* method sets the remote device objects ready cmd substate handlers, and
* function sets the remote device objects ready cmd substate handlers, and
* notify core user that the device is not ready. none
*/
static void scic_sds_smp_remote_device_ready_cmd_substate_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;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
BUG_ON(this_device->working_request == NULL);
BUG_ON(sci_dev->working_request == NULL);
SET_STATE_HANDLER(
this_device,
scic_sds_smp_remote_device_ready_substate_handler_table,
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD
);
sci_dev,
scic_sds_smp_remote_device_ready_substate_handler_table,
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD);
isci_event_remote_device_not_ready(
scic_sds_remote_device_get_controller(this_device),
this_device,
SCIC_REMOTE_DEVICE_NOT_READY_SMP_REQUEST_STARTED
);
isci_remote_device_not_ready(
idev,
SCIC_REMOTE_DEVICE_NOT_READY_SMP_REQUEST_STARTED);
}
/**
......
......@@ -677,23 +677,22 @@ const struct scic_sds_remote_device_state_handler scic_sds_stp_remote_device_rea
* * STP REMOTE DEVICE READY SUBSTATE PRIVATE METHODS
* ***************************************************************************** */
static void scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler(
void *user_cookie)
static inline void
scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler(
void *user_cookie)
{
struct scic_sds_remote_device *this_device;
this_device = (struct scic_sds_remote_device *)user_cookie;
struct scic_sds_remote_device *sci_dev =
(struct scic_sds_remote_device *)user_cookie;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
/*
* For NCQ operation we do not issue a
* scic_cb_remote_device_not_ready(). As a result, avoid sending
* the ready notification. */
if (this_device->ready_substate_machine.previous_state_id
!= SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ) {
isci_event_remote_device_ready(
scic_sds_remote_device_get_controller(this_device), this_device
);
}
* the ready notification.
*/
if (sci_dev->ready_substate_machine.previous_state_id !=
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ)
isci_remote_device_ready(idev);
}
/*
......@@ -749,26 +748,23 @@ static void scic_sds_stp_remote_device_ready_idle_substate_enter(
* struct scic_sds_remote_device object.
*
*/
static void scic_sds_stp_remote_device_ready_cmd_substate_enter(
static inline void scic_sds_stp_remote_device_ready_cmd_substate_enter(
struct sci_base_object *device)
{
struct scic_sds_remote_device *this_device;
struct scic_sds_remote_device *sci_dev =
(struct scic_sds_remote_device *)device;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
this_device = (struct scic_sds_remote_device *)device;
BUG_ON(this_device->working_request == NULL);
BUG_ON(sci_dev->working_request == NULL);
SET_STATE_HANDLER(
this_device,
scic_sds_stp_remote_device_ready_substate_handler_table,
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD
);
sci_dev,
scic_sds_stp_remote_device_ready_substate_handler_table,
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD);
isci_event_remote_device_not_ready(
scic_sds_remote_device_get_controller(this_device),
this_device,
SCIC_REMOTE_DEVICE_NOT_READY_SATA_REQUEST_STARTED
);
isci_remote_device_not_ready(
idev,
SCIC_REMOTE_DEVICE_NOT_READY_SATA_REQUEST_STARTED);
}
/*
......@@ -807,27 +803,21 @@ static void scic_sds_stp_remote_device_ready_ncq_substate_enter(
* struct scic_sds_remote_device object.
*
*/
static void scic_sds_stp_remote_device_ready_ncq_error_substate_enter(
static inline void scic_sds_stp_remote_device_ready_ncq_error_substate_enter(
struct sci_base_object *device)
{
struct scic_sds_remote_device *this_device;
this_device = (struct scic_sds_remote_device *)device;
struct scic_sds_remote_device *sci_dev =
(struct scic_sds_remote_device *)device;
struct isci_remote_device *idev = sci_object_get_association(sci_dev);
SET_STATE_HANDLER(
this_device,
scic_sds_stp_remote_device_ready_substate_handler_table,
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR
);
sci_dev,
scic_sds_stp_remote_device_ready_substate_handler_table,
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR);
if (this_device->not_ready_reason ==
SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED) {
isci_event_remote_device_not_ready(
scic_sds_remote_device_get_controller(this_device),
this_device,
this_device->not_ready_reason
);
}
if (sci_dev->not_ready_reason ==
SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED)
isci_remote_device_not_ready(idev, sci_dev->not_ready_reason);
}
/*
......
This diff is collapsed.
This diff is collapsed.
......@@ -71,7 +71,6 @@
#include "timers.h"
#include "sci_status.h"
#include "request.h"
#include "events.h"
#include "task.h"
#include "sata.h"
......
......@@ -279,10 +279,8 @@ void isci_port_link_up(
* @port: This parameter specifies the isci port with the active link.
*
*/
void isci_port_link_down(
struct isci_host *isci_host,
struct isci_phy *isci_phy,
struct isci_port *isci_port)
void isci_port_link_down(struct isci_host *isci_host, struct isci_phy *isci_phy,
struct isci_port *isci_port)
{
struct isci_remote_device *isci_device;
......@@ -358,9 +356,7 @@ void isci_port_formed(
* @port: This parameter specifies the sci port with the active link.
*
*/
void isci_port_ready(
struct isci_host *isci_host,
struct isci_port *isci_port)
void isci_port_ready(struct isci_host *isci_host, struct isci_port *isci_port)
{
dev_dbg(&isci_host->pdev->dev,
"%s: isci_port = %p\n", __func__, isci_port);
......@@ -378,9 +374,7 @@ void isci_port_ready(
* @port: This parameter specifies the sci port with the active link.
*
*/
void isci_port_not_ready(
struct isci_host *isci_host,
struct isci_port *isci_port)
void isci_port_not_ready(struct isci_host *isci_host, struct isci_port *isci_port)
{
dev_dbg(&isci_host->pdev->dev,
"%s: isci_port = %p\n", __func__, isci_port);
......@@ -394,9 +388,8 @@ void isci_port_not_ready(
* process.
*
*/
void isci_port_hard_reset_complete(
struct isci_port *isci_port,
enum sci_status completion_status)
void isci_port_hard_reset_complete(struct isci_port *isci_port,
enum sci_status completion_status)
{
dev_dbg(&isci_port->isci_host->pdev->dev,
"%s: isci_port = %p, completion_status=%x\n",
......@@ -480,3 +473,35 @@ int isci_port_perform_hard_reset(
return ret;
}
/**
* isci_port_invalid_link_up() - This function informs the SCI Core user that
* a phy/link became ready, but the phy is not allowed in the port. In some
* situations the underlying hardware only allows for certain phy to port
* mappings. If these mappings are violated, then this API is invoked.
* @controller: This parameter represents the controller which contains the
* port.
* @port: This parameter specifies the SCI port object for which the callback
* is being invoked.
* @phy: This parameter specifies the phy that came ready, but the phy can't be
* a valid member of the port.
*
*/
void isci_port_invalid_link_up(struct scic_sds_controller *scic,
struct scic_sds_port *sci_port,
struct scic_sds_phy *phy)
{
struct isci_host *ihost =
(struct isci_host *)sci_object_get_association(scic);
dev_warn(&ihost->pdev->dev, "Invalid link up!\n");
}
void isci_port_stop_complete(struct scic_sds_controller *scic,
struct scic_sds_port *sci_port,
enum sci_status completion_status)
{
struct isci_host *ihost = sci_object_get_association(scic);
dev_dbg(&ihost->pdev->dev, "Port stop complete\n");
}
......@@ -147,5 +147,15 @@ int isci_port_perform_hard_reset(
struct isci_port *isci_port_ptr,
struct isci_phy *isci_phy_ptr);
void isci_port_invalid_link_up(
struct scic_sds_controller *scic,
struct scic_sds_port *sci_port,
struct scic_sds_phy *phy);
void isci_port_stop_complete(
struct scic_sds_controller *scic,
struct scic_sds_port *sci_port,
enum sci_status completion_status);
#endif /* !defined(_ISCI_PORT_H_) */
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