__func__, idev, ireq);
scic_controller_terminate_request(&ihost->sci,
- &idev->sci,
+ idev,
ireq);
}
/* Fall through into the default case... */
*/
static void rnc_destruct_done(void *_dev)
{
- struct scic_sds_remote_device *sci_dev = _dev;
+ struct isci_remote_device *idev = _dev;
- BUG_ON(sci_dev->started_request_count != 0);
- sci_change_state(&sci_dev->sm, SCI_DEV_STOPPED);
+ BUG_ON(idev->started_request_count != 0);
+ sci_change_state(&idev->sm, SCI_DEV_STOPPED);
}
-static enum sci_status scic_sds_remote_device_terminate_requests(struct scic_sds_remote_device *sci_dev)
+static enum sci_status scic_sds_remote_device_terminate_requests(struct isci_remote_device *idev)
{
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
struct isci_host *ihost = scic_to_ihost(scic);
enum sci_status status = SCI_SUCCESS;
u32 i;
enum sci_status s;
if (!test_bit(IREQ_ACTIVE, &ireq->flags) ||
- ireq->target_device != sci_dev)
+ ireq->target_device != idev)
continue;
- s = scic_controller_terminate_request(scic, sci_dev, ireq);
+ s = scic_controller_terminate_request(scic, idev, ireq);
if (s != SCI_SUCCESS)
status = s;
}
return status;
}
-enum sci_status scic_remote_device_stop(struct scic_sds_remote_device *sci_dev,
+enum sci_status scic_remote_device_stop(struct isci_remote_device *idev,
u32 timeout)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
switch (state) {
case SCI_DEV_FAILED:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
case SCI_DEV_STOPPED:
return SCI_SUCCESS;
case SCI_DEV_STARTING:
/* device not started so there had better be no requests */
- BUG_ON(sci_dev->started_request_count != 0);
- scic_sds_remote_node_context_destruct(&sci_dev->rnc,
- rnc_destruct_done, sci_dev);
+ BUG_ON(idev->started_request_count != 0);
+ scic_sds_remote_node_context_destruct(&idev->rnc,
+ rnc_destruct_done, idev);
/* Transition to the stopping state and wait for the
* remote node to complete being posted and invalidated.
*/
case SCI_SMP_DEV_IDLE:
case SCI_SMP_DEV_CMD:
sci_change_state(sm, SCI_DEV_STOPPING);
- if (sci_dev->started_request_count == 0) {
- scic_sds_remote_node_context_destruct(&sci_dev->rnc,
- rnc_destruct_done, sci_dev);
+ if (idev->started_request_count == 0) {
+ scic_sds_remote_node_context_destruct(&idev->rnc,
+ rnc_destruct_done, idev);
return SCI_SUCCESS;
} else
- return scic_sds_remote_device_terminate_requests(sci_dev);
+ return scic_sds_remote_device_terminate_requests(idev);
break;
case SCI_DEV_STOPPING:
/* All requests should have been terminated, but if there is an
* attempt to stop a device already in the stopping state, then
* try again to terminate.
*/
- return scic_sds_remote_device_terminate_requests(sci_dev);
+ return scic_sds_remote_device_terminate_requests(idev);
case SCI_DEV_RESETTING:
sci_change_state(sm, SCI_DEV_STOPPING);
return SCI_SUCCESS;
}
}
-enum sci_status scic_remote_device_reset(struct scic_sds_remote_device *sci_dev)
+enum sci_status scic_remote_device_reset(struct isci_remote_device *idev)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
switch (state) {
case SCI_DEV_RESETTING:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
case SCI_DEV_READY:
}
}
-enum sci_status scic_remote_device_reset_complete(struct scic_sds_remote_device *sci_dev)
+enum sci_status scic_remote_device_reset_complete(struct isci_remote_device *idev)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
if (state != SCI_DEV_RESETTING) {
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
}
return SCI_SUCCESS;
}
-enum sci_status scic_sds_remote_device_suspend(struct scic_sds_remote_device *sci_dev,
+enum sci_status scic_sds_remote_device_suspend(struct isci_remote_device *idev,
u32 suspend_type)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
if (state != SCI_STP_DEV_CMD) {
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
}
- return scic_sds_remote_node_context_suspend(&sci_dev->rnc,
+ return scic_sds_remote_node_context_suspend(&idev->rnc,
suspend_type, NULL, NULL);
}
-enum sci_status scic_sds_remote_device_frame_handler(struct scic_sds_remote_device *sci_dev,
+enum sci_status scic_sds_remote_device_frame_handler(struct isci_remote_device *idev,
u32 frame_index)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
enum sci_status status;
switch (state) {
case SCI_SMP_DEV_IDLE:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
/* Return the frame back to the controller */
scic_sds_controller_release_frame(scic, frame_index);
sci_swab32_cpy(&hdr, frame_header, word_cnt);
ireq = scic_request_by_tag(scic, be16_to_cpu(hdr.tag));
- if (ireq && ireq->target_device == sci_dev) {
+ if (ireq && ireq->target_device == idev) {
/* The IO request is now in charge of releasing the frame */
status = scic_sds_io_request_frame_handler(ireq, frame_index);
} else {
if (hdr->fis_type == FIS_SETDEVBITS &&
(hdr->status & ATA_ERR)) {
- sci_dev->not_ready_reason = SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;
+ idev->not_ready_reason = SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;
/* TODO Check sactive and complete associated IO if any. */
sci_change_state(sm, SCI_STP_DEV_NCQ_ERROR);
* Some devices return D2H FIS when an NCQ error is detected.
* Treat this like an SDB error FIS ready reason.
*/
- sci_dev->not_ready_reason = SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;
- sci_change_state(&sci_dev->sm, SCI_STP_DEV_NCQ_ERROR);
+ idev->not_ready_reason = SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;
+ sci_change_state(&idev->sm, SCI_STP_DEV_NCQ_ERROR);
} else
status = SCI_FAILURE;
* in this state. All unsolicited frames are forwarded to the io request
* object.
*/
- status = scic_sds_io_request_frame_handler(sci_dev->working_request, frame_index);
+ status = scic_sds_io_request_frame_handler(idev->working_request, frame_index);
break;
}
return status;
}
-static bool is_remote_device_ready(struct scic_sds_remote_device *sci_dev)
+static bool is_remote_device_ready(struct isci_remote_device *idev)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
switch (state) {
}
}
-enum sci_status scic_sds_remote_device_event_handler(struct scic_sds_remote_device *sci_dev,
+enum sci_status scic_sds_remote_device_event_handler(struct isci_remote_device *idev,
u32 event_code)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
enum sci_status status;
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(&sci_dev->rnc, event_code);
+ status = scic_sds_remote_node_context_event_handler(&idev->rnc, event_code);
break;
case SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT:
if (scu_get_event_code(event_code) == SCU_EVENT_IT_NEXUS_TIMEOUT) {
status = SCI_SUCCESS;
/* Suspend the associated RNC */
- scic_sds_remote_node_context_suspend(&sci_dev->rnc,
+ scic_sds_remote_node_context_suspend(&idev->rnc,
SCI_SOFTWARE_SUSPENSION,
NULL, NULL);
- dev_dbg(scirdev_to_dev(sci_dev),
+ dev_dbg(scirdev_to_dev(idev),
"%s: device: %p event code: %x: %s\n",
- __func__, sci_dev, event_code,
- is_remote_device_ready(sci_dev)
+ __func__, idev, event_code,
+ is_remote_device_ready(idev)
? "I_T_Nexus_Timeout event"
: "I_T_Nexus_Timeout event in wrong state");
}
/* Else, fall through and treat as unhandled... */
default:
- dev_dbg(scirdev_to_dev(sci_dev),
+ dev_dbg(scirdev_to_dev(idev),
"%s: device: %p event code: %x: %s\n",
- __func__, sci_dev, event_code,
- is_remote_device_ready(sci_dev)
+ __func__, idev, event_code,
+ is_remote_device_ready(idev)
? "unexpected event"
: "unexpected event in wrong state");
status = SCI_FAILURE_INVALID_STATE;
*/
if (scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX ||
scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX)
- status = scic_sds_remote_node_context_resume(&sci_dev->rnc, NULL, NULL);
+ status = scic_sds_remote_node_context_resume(&idev->rnc, NULL, NULL);
}
return status;
}
-static void scic_sds_remote_device_start_request(struct scic_sds_remote_device *sci_dev,
+static void scic_sds_remote_device_start_request(struct isci_remote_device *idev,
struct isci_request *ireq,
enum sci_status status)
{
- struct isci_port *iport = sci_dev->owning_port;
+ struct isci_port *iport = idev->owning_port;
/* cleanup requests that failed after starting on the port */
if (status != SCI_SUCCESS)
- scic_sds_port_complete_io(iport, sci_dev, ireq);
+ scic_sds_port_complete_io(iport, idev, ireq);
else {
- kref_get(&sci_dev_to_idev(sci_dev)->kref);
- scic_sds_remote_device_increment_request_count(sci_dev);
+ kref_get(&idev->kref);
+ scic_sds_remote_device_increment_request_count(idev);
}
}
enum sci_status scic_sds_remote_device_start_io(struct scic_sds_controller *scic,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
- struct isci_port *iport = sci_dev->owning_port;
+ struct isci_port *iport = idev->owning_port;
enum sci_status status;
switch (state) {
case SCI_DEV_RESETTING:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
case SCI_DEV_READY:
* successful it will start the request for the port object then
* increment its own request count.
*/
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_io(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
break;
enum scic_sds_remote_device_states new_state;
struct sas_task *task = isci_request_access_task(ireq);
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_io(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
break;
if (task->ata_task.use_ncq)
new_state = SCI_STP_DEV_NCQ;
else {
- sci_dev->working_request = ireq;
+ idev->working_request = ireq;
new_state = SCI_STP_DEV_CMD;
}
sci_change_state(sm, new_state);
struct sas_task *task = isci_request_access_task(ireq);
if (task->ata_task.use_ncq) {
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_io(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
break;
case SCI_STP_DEV_AWAIT_RESET:
return SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED;
case SCI_SMP_DEV_IDLE:
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_io(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
break;
if (status != SCI_SUCCESS)
break;
- sci_dev->working_request = ireq;
- sci_change_state(&sci_dev->sm, SCI_SMP_DEV_CMD);
+ idev->working_request = ireq;
+ sci_change_state(&idev->sm, SCI_SMP_DEV_CMD);
break;
case SCI_STP_DEV_CMD:
case SCI_SMP_DEV_CMD:
return SCI_FAILURE_INVALID_STATE;
}
- scic_sds_remote_device_start_request(sci_dev, ireq, status);
+ scic_sds_remote_device_start_request(idev, ireq, status);
return status;
}
static enum sci_status common_complete_io(struct isci_port *iport,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq)
{
enum sci_status status;
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_port_complete_io(iport, sci_dev, ireq);
+ status = scic_sds_port_complete_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- scic_sds_remote_device_decrement_request_count(sci_dev);
+ scic_sds_remote_device_decrement_request_count(idev);
return status;
}
enum sci_status scic_sds_remote_device_complete_io(struct scic_sds_controller *scic,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
- struct isci_port *iport = sci_dev->owning_port;
+ struct isci_port *iport = idev->owning_port;
enum sci_status status;
switch (state) {
case SCI_DEV_FAILED:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
case SCI_DEV_READY:
case SCI_STP_DEV_AWAIT_RESET:
case SCI_DEV_RESETTING:
- status = common_complete_io(iport, sci_dev, ireq);
+ status = common_complete_io(iport, idev, ireq);
break;
case SCI_STP_DEV_CMD:
case SCI_STP_DEV_NCQ:
case SCI_STP_DEV_NCQ_ERROR:
- status = common_complete_io(iport, sci_dev, ireq);
+ status = common_complete_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
break;
* status of "DEVICE_RESET_REQUIRED", instead of "INVALID STATE".
*/
sci_change_state(sm, SCI_STP_DEV_AWAIT_RESET);
- } else if (scic_sds_remote_device_get_request_count(sci_dev) == 0)
+ } else if (scic_sds_remote_device_get_request_count(idev) == 0)
sci_change_state(sm, SCI_STP_DEV_IDLE);
break;
case SCI_SMP_DEV_CMD:
- status = common_complete_io(iport, sci_dev, ireq);
+ status = common_complete_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
break;
sci_change_state(sm, SCI_SMP_DEV_IDLE);
break;
case SCI_DEV_STOPPING:
- status = common_complete_io(iport, sci_dev, ireq);
+ status = common_complete_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
break;
- if (scic_sds_remote_device_get_request_count(sci_dev) == 0)
- scic_sds_remote_node_context_destruct(&sci_dev->rnc,
+ if (scic_sds_remote_device_get_request_count(idev) == 0)
+ scic_sds_remote_node_context_destruct(&idev->rnc,
rnc_destruct_done,
- sci_dev);
+ idev);
break;
}
if (status != SCI_SUCCESS)
- dev_err(scirdev_to_dev(sci_dev),
+ dev_err(scirdev_to_dev(idev),
"%s: Port:0x%p Device:0x%p Request:0x%p Status:0x%x "
"could not complete\n", __func__, iport,
- sci_dev, ireq, status);
+ idev, ireq, status);
else
- isci_put_device(sci_dev_to_idev(sci_dev));
+ isci_put_device(idev);
return status;
}
static void scic_sds_remote_device_continue_request(void *dev)
{
- struct scic_sds_remote_device *sci_dev = dev;
+ struct isci_remote_device *idev = dev;
/* we need to check if this request is still valid to continue. */
- if (sci_dev->working_request)
- scic_controller_continue_io(sci_dev->working_request);
+ if (idev->working_request)
+ scic_controller_continue_io(idev->working_request);
}
enum sci_status scic_sds_remote_device_start_task(struct scic_sds_controller *scic,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
- struct isci_port *iport = sci_dev->owning_port;
+ struct isci_port *iport = idev->owning_port;
enum sci_status status;
switch (state) {
case SCI_DEV_RESETTING:
case SCI_DEV_FINAL:
default:
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
case SCI_STP_DEV_IDLE:
case SCI_STP_DEV_NCQ:
case SCI_STP_DEV_NCQ_ERROR:
case SCI_STP_DEV_AWAIT_RESET:
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_task(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_task(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
goto out;
* replace the request that probably resulted in the task
* management request.
*/
- sci_dev->working_request = ireq;
+ idev->working_request = ireq;
sci_change_state(sm, SCI_STP_DEV_CMD);
/* The remote node context must cleanup the TCi to NCQ mapping
* the correct action when the remote node context is suspended
* and later resumed.
*/
- scic_sds_remote_node_context_suspend(&sci_dev->rnc,
+ scic_sds_remote_node_context_suspend(&idev->rnc,
SCI_SOFTWARE_SUSPENSION, NULL, NULL);
- scic_sds_remote_node_context_resume(&sci_dev->rnc,
+ scic_sds_remote_node_context_resume(&idev->rnc,
scic_sds_remote_device_continue_request,
- sci_dev);
+ idev);
out:
- scic_sds_remote_device_start_request(sci_dev, ireq, status);
+ scic_sds_remote_device_start_request(idev, ireq, status);
/* We need to let the controller start request handler know that
* it can't post TC yet. We will provide a callback function to
* post TC when RNC gets resumed.
*/
return SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS;
case SCI_DEV_READY:
- status = scic_sds_port_start_io(iport, sci_dev, ireq);
+ status = scic_sds_port_start_io(iport, idev, ireq);
if (status != SCI_SUCCESS)
return status;
- status = scic_sds_remote_node_context_start_task(&sci_dev->rnc, ireq);
+ status = scic_sds_remote_node_context_start_task(&idev->rnc, ireq);
if (status != SCI_SUCCESS)
break;
status = scic_sds_request_start(ireq);
break;
}
- scic_sds_remote_device_start_request(sci_dev, ireq, status);
+ scic_sds_remote_device_start_request(idev, ireq, status);
return status;
}
* request and then requests the controller to post the request. none
*/
void scic_sds_remote_device_post_request(
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
u32 request)
{
u32 context;
- context = scic_sds_remote_device_build_command_context(sci_dev, request);
+ context = scic_sds_remote_device_build_command_context(idev, request);
scic_sds_controller_post_request(
- scic_sds_remote_device_get_controller(sci_dev),
+ scic_sds_remote_device_get_controller(idev),
context
);
}
*/
static void remote_device_resume_done(void *_dev)
{
- struct scic_sds_remote_device *sci_dev = _dev;
+ struct isci_remote_device *idev = _dev;
- if (is_remote_device_ready(sci_dev))
+ if (is_remote_device_ready(idev))
return;
/* go 'ready' if we are not already in a ready state */
- sci_change_state(&sci_dev->sm, SCI_DEV_READY);
+ sci_change_state(&idev->sm, SCI_DEV_READY);
}
static void scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler(void *_dev)
{
- struct scic_sds_remote_device *sci_dev = _dev;
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
+ struct isci_remote_device *idev = _dev;
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
/* For NCQ operation we do not issue a isci_remote_device_not_ready().
* As a result, avoid sending the ready notification.
*/
- if (sci_dev->sm.previous_state_id != SCI_STP_DEV_NCQ)
+ if (idev->sm.previous_state_id != SCI_STP_DEV_NCQ)
isci_remote_device_ready(scic_to_ihost(scic), idev);
}
static void scic_sds_remote_device_initial_state_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
/* Initial state is a transitional state to the stopped state */
- sci_change_state(&sci_dev->sm, SCI_DEV_STOPPED);
+ sci_change_state(&idev->sm, SCI_DEV_STOPPED);
}
/**
* device isn't valid (e.g. it's already been destoryed, the handle isn't
* valid, etc.).
*/
-static enum sci_status scic_remote_device_destruct(struct scic_sds_remote_device *sci_dev)
+static enum sci_status scic_remote_device_destruct(struct isci_remote_device *idev)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
struct scic_sds_controller *scic;
if (state != SCI_DEV_STOPPED) {
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
}
- scic = sci_dev->owning_port->owning_controller;
- scic_sds_controller_free_remote_node_context(scic, sci_dev,
- sci_dev->rnc.remote_node_index);
- sci_dev->rnc.remote_node_index = SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX;
+ scic = idev->owning_port->owning_controller;
+ scic_sds_controller_free_remote_node_context(scic, idev,
+ idev->rnc.remote_node_index);
+ idev->rnc.remote_node_index = SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX;
sci_change_state(sm, SCI_DEV_FINAL);
return SCI_SUCCESS;
* io requests in process */
BUG_ON(!list_empty(&idev->reqs_in_process));
- scic_remote_device_destruct(&idev->sci);
+ scic_remote_device_destruct(idev);
list_del_init(&idev->node);
isci_put_device(idev);
}
static void scic_sds_remote_device_stopped_state_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
u32 prev_state;
/* If we are entering from the stopping state let the SCI User know that
* the stop operation has completed.
*/
- prev_state = sci_dev->sm.previous_state_id;
+ prev_state = idev->sm.previous_state_id;
if (prev_state == SCI_DEV_STOPPING)
isci_remote_device_deconstruct(scic_to_ihost(scic), idev);
- scic_sds_controller_remote_device_stopped(scic, sci_dev);
+ scic_sds_controller_remote_device_stopped(scic, idev);
}
static void scic_sds_remote_device_starting_state_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(idev);
struct isci_host *ihost = scic_to_ihost(scic);
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
isci_remote_device_not_ready(ihost, idev,
SCIC_REMOTE_DEVICE_NOT_READY_START_REQUESTED);
static void scic_sds_remote_device_ready_state_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
struct domain_device *dev = idev->domain_dev;
if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_SATA)) {
- sci_change_state(&sci_dev->sm, SCI_STP_DEV_IDLE);
+ sci_change_state(&idev->sm, SCI_STP_DEV_IDLE);
} else if (dev_is_expander(dev)) {
- sci_change_state(&sci_dev->sm, SCI_SMP_DEV_IDLE);
+ sci_change_state(&idev->sm, SCI_SMP_DEV_IDLE);
} else
isci_remote_device_ready(scic_to_ihost(scic), idev);
}
static void scic_sds_remote_device_ready_state_exit(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct domain_device *dev = sci_dev_to_domain(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct domain_device *dev = idev->domain_dev;
if (dev->dev_type == SAS_END_DEV) {
- struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
+ struct scic_sds_controller *scic = idev->owning_port->owning_controller;
isci_remote_device_not_ready(scic_to_ihost(scic), idev,
SCIC_REMOTE_DEVICE_NOT_READY_STOP_REQUESTED);
static void scic_sds_remote_device_resetting_state_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
scic_sds_remote_node_context_suspend(
- &sci_dev->rnc, SCI_SOFTWARE_SUSPENSION, NULL, NULL);
+ &idev->rnc, SCI_SOFTWARE_SUSPENSION, NULL, NULL);
}
static void scic_sds_remote_device_resetting_state_exit(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
- scic_sds_remote_node_context_resume(&sci_dev->rnc, NULL, NULL);
+ scic_sds_remote_node_context_resume(&idev->rnc, NULL, NULL);
}
static void scic_sds_stp_remote_device_ready_idle_substate_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
- sci_dev->working_request = NULL;
- if (scic_sds_remote_node_context_is_ready(&sci_dev->rnc)) {
+ idev->working_request = NULL;
+ if (scic_sds_remote_node_context_is_ready(&idev->rnc)) {
/*
* Since the RNC is ready, it's alright to finish completion
* processing (e.g. signal the remote device is ready). */
- scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler(sci_dev);
+ scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler(idev);
} else {
- scic_sds_remote_node_context_resume(&sci_dev->rnc,
+ scic_sds_remote_node_context_resume(&idev->rnc,
scic_sds_stp_remote_device_ready_idle_substate_resume_complete_handler,
- sci_dev);
+ idev);
}
}
static void scic_sds_stp_remote_device_ready_cmd_substate_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(idev);
- BUG_ON(sci_dev->working_request == NULL);
+ BUG_ON(idev->working_request == NULL);
- isci_remote_device_not_ready(scic_to_ihost(scic), sci_dev_to_idev(sci_dev),
+ isci_remote_device_not_ready(scic_to_ihost(scic), idev,
SCIC_REMOTE_DEVICE_NOT_READY_SATA_REQUEST_STARTED);
}
static void scic_sds_stp_remote_device_ready_ncq_error_substate_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
- struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(idev);
- if (sci_dev->not_ready_reason == SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED)
+ if (idev->not_ready_reason == SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED)
isci_remote_device_not_ready(scic_to_ihost(scic), idev,
- sci_dev->not_ready_reason);
+ idev->not_ready_reason);
}
static void scic_sds_smp_remote_device_ready_idle_substate_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(idev);
- isci_remote_device_ready(scic_to_ihost(scic), sci_dev_to_idev(sci_dev));
+ isci_remote_device_ready(scic_to_ihost(scic), idev);
}
static void scic_sds_smp_remote_device_ready_cmd_substate_enter(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
- struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(sci_dev);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
+ struct scic_sds_controller *scic = scic_sds_remote_device_get_controller(idev);
- BUG_ON(sci_dev->working_request == NULL);
+ BUG_ON(idev->working_request == NULL);
- isci_remote_device_not_ready(scic_to_ihost(scic), sci_dev_to_idev(sci_dev),
+ isci_remote_device_not_ready(scic_to_ihost(scic), idev,
SCIC_REMOTE_DEVICE_NOT_READY_SMP_REQUEST_STARTED);
}
static void scic_sds_smp_remote_device_ready_cmd_substate_exit(struct sci_base_state_machine *sm)
{
- struct scic_sds_remote_device *sci_dev = container_of(sm, typeof(*sci_dev), sm);
+ struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm);
- sci_dev->working_request = NULL;
+ idev->working_request = NULL;
}
static const struct sci_base_state scic_sds_remote_device_state_table[] = {
* frees the remote_node_context(s) for the device.
*/
static void scic_remote_device_construct(struct isci_port *iport,
- struct scic_sds_remote_device *sci_dev)
+ struct isci_remote_device *idev)
{
- sci_dev->owning_port = iport;
- sci_dev->started_request_count = 0;
+ idev->owning_port = iport;
+ idev->started_request_count = 0;
- sci_init_sm(&sci_dev->sm, scic_sds_remote_device_state_table, SCI_DEV_INITIAL);
+ sci_init_sm(&idev->sm, scic_sds_remote_device_state_table, SCI_DEV_INITIAL);
- scic_sds_remote_node_context_construct(&sci_dev->rnc,
+ scic_sds_remote_node_context_construct(&idev->rnc,
SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX);
}
* SCI_FAILURE_INSUFFICIENT_RESOURCES - remote node contexts exhausted.
*/
static enum sci_status scic_remote_device_da_construct(struct isci_port *iport,
- struct scic_sds_remote_device *sci_dev)
+ struct isci_remote_device *idev)
{
enum sci_status status;
- struct domain_device *dev = sci_dev_to_domain(sci_dev);
+ struct domain_device *dev = idev->domain_dev;
- scic_remote_device_construct(iport, sci_dev);
+ scic_remote_device_construct(iport, idev);
/*
* This information is request to determine how many remote node context
* entries will be needed to store the remote node.
*/
- sci_dev->is_direct_attached = true;
+ idev->is_direct_attached = true;
status = scic_sds_controller_allocate_remote_node_context(iport->owning_controller,
- sci_dev,
- &sci_dev->rnc.remote_node_index);
+ idev,
+ &idev->rnc.remote_node_index);
if (status != SCI_SUCCESS)
return status;
else
return SCI_FAILURE_UNSUPPORTED_PROTOCOL;
- sci_dev->connection_rate = scic_sds_port_get_max_allowed_speed(iport);
+ idev->connection_rate = scic_sds_port_get_max_allowed_speed(iport);
/* / @todo Should I assign the port width by reading all of the phys on the port? */
- sci_dev->device_port_width = 1;
+ idev->device_port_width = 1;
return SCI_SUCCESS;
}
* SCI_FAILURE_INSUFFICIENT_RESOURCES - remote node contexts exhausted.
*/
static enum sci_status scic_remote_device_ea_construct(struct isci_port *iport,
- struct scic_sds_remote_device *sci_dev)
+ struct isci_remote_device *idev)
{
- struct domain_device *dev = sci_dev_to_domain(sci_dev);
+ struct domain_device *dev = idev->domain_dev;
enum sci_status status;
- scic_remote_device_construct(iport, sci_dev);
+ scic_remote_device_construct(iport, idev);
status = scic_sds_controller_allocate_remote_node_context(iport->owning_controller,
- sci_dev,
- &sci_dev->rnc.remote_node_index);
+ idev,
+ &idev->rnc.remote_node_index);
if (status != SCI_SUCCESS)
return status;
* connection the logical link rate is that same as the
* physical. Furthermore, the SAS-2 and SAS-1.1 fields overlay
* one another, so this code works for both situations. */
- sci_dev->connection_rate = min_t(u16, scic_sds_port_get_max_allowed_speed(iport),
+ idev->connection_rate = min_t(u16, scic_sds_port_get_max_allowed_speed(iport),
dev->linkrate);
/* / @todo Should I assign the port width by reading all of the phys on the port? */
- sci_dev->device_port_width = 1;
+ idev->device_port_width = 1;
return SCI_SUCCESS;
}
* SCI_FAILURE_INVALID_PHY This value is returned if the user attempts to start
* the device when there have been no phys added to it.
*/
-static enum sci_status scic_remote_device_start(struct scic_sds_remote_device *sci_dev,
+static enum sci_status scic_remote_device_start(struct isci_remote_device *idev,
u32 timeout)
{
- struct sci_base_state_machine *sm = &sci_dev->sm;
+ struct sci_base_state_machine *sm = &idev->sm;
enum scic_sds_remote_device_states state = sm->current_state_id;
enum sci_status status;
if (state != SCI_DEV_STOPPED) {
- dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
+ dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %d\n",
__func__, state);
return SCI_FAILURE_INVALID_STATE;
}
- status = scic_sds_remote_node_context_resume(&sci_dev->rnc,
+ status = scic_sds_remote_node_context_resume(&idev->rnc,
remote_device_resume_done,
- sci_dev);
+ idev);
if (status != SCI_SUCCESS)
return status;
enum sci_status status;
if (dev->parent && dev_is_expander(dev->parent))
- status = scic_remote_device_ea_construct(iport, &idev->sci);
+ status = scic_remote_device_ea_construct(iport, idev);
else
- status = scic_remote_device_da_construct(iport, &idev->sci);
+ status = scic_remote_device_da_construct(iport, idev);
if (status != SCI_SUCCESS) {
dev_dbg(&ihost->pdev->dev, "%s: construct failed: %d\n",
}
/* start the device. */
- status = scic_remote_device_start(&idev->sci, ISCI_REMOTE_DEVICE_START_TIMEOUT);
+ status = scic_remote_device_start(idev, ISCI_REMOTE_DEVICE_START_TIMEOUT);
if (status != SCI_SUCCESS)
dev_warn(&ihost->pdev->dev, "remote device start failed: %d\n",
set_bit(IDEV_STOP_PENDING, &idev->flags);
spin_lock_irqsave(&ihost->scic_lock, flags);
- status = scic_remote_device_stop(&idev->sci, 50);
+ status = scic_remote_device_stop(idev, 50);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
/* Wait for the stop complete callback. */
SCIC_REMOTE_DEVICE_NOT_READY_REASON_CODE_MAX
};
-struct scic_sds_remote_device {
- /**
- * This field contains the information for the base remote device state
- * machine.
- */
- struct sci_base_state_machine sm;
-
- /**
- * This field is the programmed device port width. This value is
- * written to the RCN data structure to tell the SCU how many open
- * connections this device can have.
- */
- u32 device_port_width;
-
- /**
- * This field is the programmed connection rate for this remote device. It is
- * used to program the TC with the maximum allowed connection rate.
- */
- enum sas_linkrate connection_rate;
-
- /**
- * This filed is assinged the value of true if the device is directly
- * attached to the port.
- */
- bool is_direct_attached;
-
- /**
- * This filed contains a pointer back to the port to which this device
- * is assigned.
- */
- struct isci_port *owning_port;
-
- /**
- * This field contains the SCU silicon remote node context specific
- * information.
- */
- struct scic_sds_remote_node_context rnc;
-
- /**
- * This field contains the stated request count for the remote device. The
- * device can not reach the SCI_DEV_STOPPED until all
- * requests are complete and the rnc_posted value is false.
- */
- u32 started_request_count;
-
- /**
- * This field contains a pointer to the working request object. It is only
- * used only for SATA requests since the unsolicited frames we get from the
- * hardware have no Tag value to look up the io request object.
- */
- struct isci_request *working_request;
-
- /**
- * This field contains the reason for the remote device going not_ready. It is
- * assigned in the state handlers and used in the state transition.
- */
- u32 not_ready_reason;
-};
-
+/**
+ * isci_remote_device - isci representation of a sas expander / end point
+ * @device_port_width: hw setting for number of simultaneous connections
+ * @connection_rate: per-taskcontext connection rate for this device
+ * @working_request: SATA requests have no tag we for unaccelerated
+ * protocols we need a method to associate unsolicited
+ * frames with a pending request
+ */
struct isci_remote_device {
#define IDEV_START_PENDING 0
#define IDEV_STOP_PENDING 1
struct domain_device *domain_dev;
struct list_head node;
struct list_head reqs_in_process;
- struct scic_sds_remote_device sci;
+ struct sci_base_state_machine sm;
+ u32 device_port_width;
+ enum sas_linkrate connection_rate;
+ bool is_direct_attached;
+ struct isci_port *owning_port;
+ struct scic_sds_remote_node_context rnc;
+ /* XXX unify with device reference counting and delete */
+ u32 started_request_count;
+ struct isci_request *working_request;
+ u32 not_ready_reason;
};
#define ISCI_REMOTE_DEVICE_START_TIMEOUT 5000
* successfully stopped.
*/
enum sci_status scic_remote_device_stop(
- struct scic_sds_remote_device *remote_device,
+ struct isci_remote_device *idev,
u32 timeout);
/**
* started.
*/
enum sci_status scic_remote_device_reset(
- struct scic_sds_remote_device *remote_device);
+ struct isci_remote_device *idev);
/**
* scic_remote_device_reset_complete() - This method informs the device object
* is resuming operation.
*/
enum sci_status scic_remote_device_reset_complete(
- struct scic_sds_remote_device *remote_device);
+ struct isci_remote_device *idev);
#define scic_remote_device_is_atapi(device_handle) false
SCI_DEV_FINAL,
};
-static inline struct scic_sds_remote_device *rnc_to_dev(struct scic_sds_remote_node_context *rnc)
+static inline struct isci_remote_device *rnc_to_dev(struct scic_sds_remote_node_context *rnc)
{
- struct scic_sds_remote_device *sci_dev;
+ struct isci_remote_device *idev;
- sci_dev = container_of(rnc, typeof(*sci_dev), rnc);
-
- return sci_dev;
-}
-
-static inline struct isci_remote_device *sci_dev_to_idev(struct scic_sds_remote_device *sci_dev)
-{
- struct isci_remote_device *idev = container_of(sci_dev, typeof(*idev), sci);
+ idev = container_of(rnc, typeof(*idev), rnc);
return idev;
}
-static inline struct domain_device *sci_dev_to_domain(struct scic_sds_remote_device *sci_dev)
-{
- return sci_dev_to_idev(sci_dev)->domain_dev;
-}
-
static inline bool dev_is_expander(struct domain_device *dev)
{
return dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV;
*
* This macro incrments the request count for this device
*/
-#define scic_sds_remote_device_increment_request_count(sci_dev) \
- ((sci_dev)->started_request_count++)
+#define scic_sds_remote_device_increment_request_count(idev) \
+ ((idev)->started_request_count++)
/**
* scic_sds_remote_device_decrement_request_count() -
* This macro decrements the request count for this device. This count will
* never decrment past 0.
*/
-#define scic_sds_remote_device_decrement_request_count(sci_dev) \
- ((sci_dev)->started_request_count > 0 ? \
- (sci_dev)->started_request_count-- : 0)
+#define scic_sds_remote_device_decrement_request_count(idev) \
+ ((idev)->started_request_count > 0 ? \
+ (idev)->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(sci_dev) \
- ((sci_dev)->started_request_count)
+#define scic_sds_remote_device_get_request_count(idev) \
+ ((idev)->started_request_count)
/**
* scic_sds_remote_device_get_controller() -
*
* This macro returns the controller object that contains this device object
*/
-#define scic_sds_remote_device_get_controller(sci_dev) \
- scic_sds_port_get_controller(scic_sds_remote_device_get_port(sci_dev))
+#define scic_sds_remote_device_get_controller(idev) \
+ scic_sds_port_get_controller(scic_sds_remote_device_get_port(idev))
/**
* scic_sds_remote_device_get_port() -
*
* This macro returns the owning port of this device
*/
-#define scic_sds_remote_device_get_port(sci_dev) \
- ((sci_dev)->owning_port)
+#define scic_sds_remote_device_get_port(idev) \
+ ((idev)->owning_port)
/**
* scic_sds_remote_device_get_controller_peg() -
*
* This macro returns the controllers protocol engine group
*/
-#define scic_sds_remote_device_get_controller_peg(sci_dev) \
+#define scic_sds_remote_device_get_controller_peg(idev) \
(\
scic_sds_controller_get_protocol_engine_group(\
scic_sds_port_get_controller(\
- scic_sds_remote_device_get_port(sci_dev) \
+ scic_sds_remote_device_get_port(idev) \
) \
) \
)
*
* This macro returns the remote node index for this device object
*/
-#define scic_sds_remote_device_get_index(sci_dev) \
- ((sci_dev)->rnc.remote_node_index)
+#define scic_sds_remote_device_get_index(idev) \
+ ((idev)->rnc.remote_node_index)
/**
* scic_sds_remote_device_build_command_context() -
((device)->working_request = (request))
enum sci_status scic_sds_remote_device_frame_handler(
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
u32 frame_index);
enum sci_status scic_sds_remote_device_event_handler(
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
u32 event_code);
enum sci_status scic_sds_remote_device_start_io(
struct scic_sds_controller *controller,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq);
enum sci_status scic_sds_remote_device_start_task(
struct scic_sds_controller *controller,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq);
enum sci_status scic_sds_remote_device_complete_io(
struct scic_sds_controller *controller,
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
struct isci_request *ireq);
enum sci_status scic_sds_remote_device_suspend(
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
u32 suspend_type);
void scic_sds_remote_device_post_request(
- struct scic_sds_remote_device *sci_dev,
+ struct isci_remote_device *idev,
u32 request);
-#define scic_sds_remote_device_is_atapi(sci_dev) false
+#define scic_sds_remote_device_is_atapi(idev) false
#endif /* !defined(_ISCI_REMOTE_DEVICE_H_) */