Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a7301f authored by Dan Williams's avatar Dan Williams
Browse files

isci: retire scic_sds_ and scic_ prefixes



The distinction between scic_sds_ scic_ and sci_ are no longer relevant
so just unify the prefixes on sci_.  The distinction between isci_ and
sci_ is historically significant, and useful for comparing the old
'core' to the current Linux driver. 'sci_' represents the former core as
well as the routines that are closer to the hardware and protocol than
their 'isci_' brethren. sci == sas controller interface.

Also unwind the 'sds1' out of the parameter structs.

Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent d9dcb4ba
Loading
Loading
Loading
Loading
+281 −461

File changed.

Preview size limit exceeded, changes collapsed.

+45 −48
Original line number Original line Diff line number Diff line
@@ -69,12 +69,12 @@ struct scu_task_context;




/**
/**
 * struct scic_power_control -
 * struct sci_power_control -
 *
 *
 * This structure defines the fields for managing power control for direct
 * This structure defines the fields for managing power control for direct
 * attached disk devices.
 * attached disk devices.
 */
 */
struct scic_power_control {
struct sci_power_control {
	/**
	/**
	 * This field is set when the power control timer is running and cleared when
	 * This field is set when the power control timer is running and cleared when
	 * it is not.
	 * it is not.
@@ -99,18 +99,18 @@ struct scic_power_control {


	/**
	/**
	 * This field is an array of phys that we are waiting on. The phys are direct
	 * This field is an array of phys that we are waiting on. The phys are direct
	 * mapped into requesters via struct scic_sds_phy.phy_index
	 * mapped into requesters via struct sci_phy.phy_index
	 */
	 */
	struct isci_phy *requesters[SCI_MAX_PHYS];
	struct isci_phy *requesters[SCI_MAX_PHYS];


};
};


struct scic_sds_port_configuration_agent;
struct sci_port_configuration_agent;
typedef void (*port_config_fn)(struct isci_host *,
typedef void (*port_config_fn)(struct isci_host *,
			       struct scic_sds_port_configuration_agent *,
			       struct sci_port_configuration_agent *,
			       struct isci_port *, struct isci_phy *);
			       struct isci_port *, struct isci_phy *);


struct scic_sds_port_configuration_agent {
struct sci_port_configuration_agent {
	u16 phy_configured_mask;
	u16 phy_configured_mask;
	u16 phy_ready_mask;
	u16 phy_ready_mask;
	struct {
	struct {
@@ -149,13 +149,13 @@ struct isci_host {
	/* XXX can we time this externally */
	/* XXX can we time this externally */
	struct sci_timer timer;
	struct sci_timer timer;
	/* XXX drop reference module params directly */
	/* XXX drop reference module params directly */
	union scic_user_parameters user_parameters;
	struct sci_user_parameters user_parameters;
	/* XXX no need to be a union */
	/* XXX no need to be a union */
	union scic_oem_parameters oem_parameters;
	struct sci_oem_params oem_parameters;
	struct scic_sds_port_configuration_agent port_agent;
	struct sci_port_configuration_agent port_agent;
	struct isci_remote_device *device_table[SCI_MAX_REMOTE_DEVICES];
	struct isci_remote_device *device_table[SCI_MAX_REMOTE_DEVICES];
	struct scic_remote_node_table available_remote_nodes;
	struct sci_remote_node_table available_remote_nodes;
	struct scic_power_control power_control;
	struct sci_power_control power_control;
	u8 io_request_sequence[SCI_MAX_IO_REQUESTS];
	u8 io_request_sequence[SCI_MAX_IO_REQUESTS];
	struct scu_task_context *task_context_table;
	struct scu_task_context *task_context_table;
	dma_addr_t task_context_dma;
	dma_addr_t task_context_dma;
@@ -165,7 +165,7 @@ struct isci_host {
	u32 logical_port_entries;
	u32 logical_port_entries;
	u32 remote_node_entries;
	u32 remote_node_entries;
	u32 task_context_entries;
	u32 task_context_entries;
	struct scic_sds_unsolicited_frame_control uf_control;
	struct sci_unsolicited_frame_control uf_control;


	/* phy startup */
	/* phy startup */
	struct sci_timer phy_timer;
	struct sci_timer phy_timer;
@@ -206,10 +206,10 @@ struct isci_host {
};
};


/**
/**
 * enum scic_sds_controller_states - This enumeration depicts all the states
 * enum sci_controller_states - This enumeration depicts all the states
 *    for the common controller state machine.
 *    for the common controller state machine.
 */
 */
enum scic_sds_controller_states {
enum sci_controller_states {
	/**
	/**
	 * Simply the initial state for the base controller state machine.
	 * Simply the initial state for the base controller state machine.
	 */
	 */
@@ -360,14 +360,14 @@ static inline struct isci_host *dev_to_ihost(struct domain_device *dev)
}
}


/**
/**
 * scic_sds_controller_get_protocol_engine_group() -
 * sci_controller_get_protocol_engine_group() -
 *
 *
 * This macro returns the protocol engine group for this controller object.
 * This macro returns the protocol engine group for this controller object.
 * Presently we only support protocol engine group 0 so just return that
 * Presently we only support protocol engine group 0 so just return that
 */
 */
#define scic_sds_controller_get_protocol_engine_group(controller) 0
#define sci_controller_get_protocol_engine_group(controller) 0


/* see scic_controller_io_tag_allocate|free for how seq and tci are built */
/* see sci_controller_io_tag_allocate|free for how seq and tci are built */
#define ISCI_TAG(seq, tci) (((u16) (seq)) << 12 | tci)
#define ISCI_TAG(seq, tci) (((u16) (seq)) << 12 | tci)


/* these are returned by the hardware, so sanitize them */
/* these are returned by the hardware, so sanitize them */
@@ -375,7 +375,7 @@ static inline struct isci_host *dev_to_ihost(struct domain_device *dev)
#define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1))
#define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1))


/* expander attached sata devices require 3 rnc slots */
/* expander attached sata devices require 3 rnc slots */
static inline int scic_sds_remote_device_node_count(struct isci_remote_device *idev)
static inline int sci_remote_device_node_count(struct isci_remote_device *idev)
{
{
	struct domain_device *dev = idev->domain_dev;
	struct domain_device *dev = idev->domain_dev;


@@ -386,23 +386,23 @@ static inline int scic_sds_remote_device_node_count(struct isci_remote_device *i
}
}


/**
/**
 * scic_sds_controller_set_invalid_phy() -
 * sci_controller_set_invalid_phy() -
 *
 *
 * This macro will set the bit in the invalid phy mask for this controller
 * This macro will set the bit in the invalid phy mask for this controller
 * object.  This is used to control messages reported for invalid link up
 * object.  This is used to control messages reported for invalid link up
 * notifications.
 * notifications.
 */
 */
#define scic_sds_controller_set_invalid_phy(controller, phy) \
#define sci_controller_set_invalid_phy(controller, phy) \
	((controller)->invalid_phy_mask |= (1 << (phy)->phy_index))
	((controller)->invalid_phy_mask |= (1 << (phy)->phy_index))


/**
/**
 * scic_sds_controller_clear_invalid_phy() -
 * sci_controller_clear_invalid_phy() -
 *
 *
 * This macro will clear the bit in the invalid phy mask for this controller
 * This macro will clear the bit in the invalid phy mask for this controller
 * object.  This is used to control messages reported for invalid link up
 * object.  This is used to control messages reported for invalid link up
 * notifications.
 * notifications.
 */
 */
#define scic_sds_controller_clear_invalid_phy(controller, phy) \
#define sci_controller_clear_invalid_phy(controller, phy) \
	((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index))
	((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index))


static inline struct device *sciphy_to_dev(struct isci_phy *iphy)
static inline struct device *sciphy_to_dev(struct isci_phy *iphy)
@@ -460,56 +460,53 @@ static inline bool is_c0(void)
	return isci_si_rev > ISCI_SI_REVB0;
	return isci_si_rev > ISCI_SI_REVB0;
}
}


void scic_sds_controller_post_request(struct isci_host *ihost,
void sci_controller_post_request(struct isci_host *ihost,
				      u32 request);
				      u32 request);
void scic_sds_controller_release_frame(struct isci_host *ihost,
void sci_controller_release_frame(struct isci_host *ihost,
				       u32 frame_index);
				       u32 frame_index);
void scic_sds_controller_copy_sata_response(void *response_buffer,
void sci_controller_copy_sata_response(void *response_buffer,
					    void *frame_header,
					    void *frame_header,
					    void *frame_buffer);
					    void *frame_buffer);
enum sci_status scic_sds_controller_allocate_remote_node_context(struct isci_host *ihost,
enum sci_status sci_controller_allocate_remote_node_context(struct isci_host *ihost,
								 struct isci_remote_device *idev,
								 struct isci_remote_device *idev,
								 u16 *node_id);
								 u16 *node_id);
void scic_sds_controller_free_remote_node_context(
void sci_controller_free_remote_node_context(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev,
	struct isci_remote_device *idev,
	u16 node_id);
	u16 node_id);
union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer(
	struct isci_host *ihost,
	u16 node_id);


struct isci_request *scic_request_by_tag(struct isci_host *ihost,
struct isci_request *sci_request_by_tag(struct isci_host *ihost,
					     u16 io_tag);
					     u16 io_tag);


void scic_sds_controller_power_control_queue_insert(
void sci_controller_power_control_queue_insert(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_phy *iphy);
	struct isci_phy *iphy);


void scic_sds_controller_power_control_queue_remove(
void sci_controller_power_control_queue_remove(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_phy *iphy);
	struct isci_phy *iphy);


void scic_sds_controller_link_up(
void sci_controller_link_up(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_port *iport,
	struct isci_port *iport,
	struct isci_phy *iphy);
	struct isci_phy *iphy);


void scic_sds_controller_link_down(
void sci_controller_link_down(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_port *iport,
	struct isci_port *iport,
	struct isci_phy *iphy);
	struct isci_phy *iphy);


void scic_sds_controller_remote_device_stopped(
void sci_controller_remote_device_stopped(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev);
	struct isci_remote_device *idev);


void scic_sds_controller_copy_task_context(
void sci_controller_copy_task_context(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_request *ireq);
	struct isci_request *ireq);


void scic_sds_controller_register_setup(struct isci_host *ihost);
void sci_controller_register_setup(struct isci_host *ihost);


enum sci_status scic_controller_continue_io(struct isci_request *ireq);
enum sci_status sci_controller_continue_io(struct isci_request *ireq);
int isci_host_scan_finished(struct Scsi_Host *, unsigned long);
int isci_host_scan_finished(struct Scsi_Host *, unsigned long);
void isci_host_scan_start(struct Scsi_Host *);
void isci_host_scan_start(struct Scsi_Host *);
u16 isci_alloc_tag(struct isci_host *ihost);
u16 isci_alloc_tag(struct isci_host *ihost);
@@ -536,33 +533,33 @@ void isci_host_remote_device_start_complete(
	struct isci_remote_device *,
	struct isci_remote_device *,
	enum sci_status);
	enum sci_status);


void scic_controller_disable_interrupts(
void sci_controller_disable_interrupts(
	struct isci_host *ihost);
	struct isci_host *ihost);


enum sci_status scic_controller_start_io(
enum sci_status sci_controller_start_io(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev,
	struct isci_remote_device *idev,
	struct isci_request *ireq);
	struct isci_request *ireq);


enum sci_task_status scic_controller_start_task(
enum sci_task_status sci_controller_start_task(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev,
	struct isci_remote_device *idev,
	struct isci_request *ireq);
	struct isci_request *ireq);


enum sci_status scic_controller_terminate_request(
enum sci_status sci_controller_terminate_request(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev,
	struct isci_remote_device *idev,
	struct isci_request *ireq);
	struct isci_request *ireq);


enum sci_status scic_controller_complete_io(
enum sci_status sci_controller_complete_io(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct isci_remote_device *idev,
	struct isci_remote_device *idev,
	struct isci_request *ireq);
	struct isci_request *ireq);


void scic_sds_port_configuration_agent_construct(
void sci_port_configuration_agent_construct(
	struct scic_sds_port_configuration_agent *port_agent);
	struct sci_port_configuration_agent *port_agent);


enum sci_status scic_sds_port_configuration_agent_initialize(
enum sci_status sci_port_configuration_agent_initialize(
	struct isci_host *ihost,
	struct isci_host *ihost,
	struct scic_sds_port_configuration_agent *port_agent);
	struct sci_port_configuration_agent *port_agent);
#endif
#endif
+2 −2
Original line number Original line Diff line number Diff line
@@ -484,7 +484,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
		orom = isci_request_oprom(pdev);
		orom = isci_request_oprom(pdev);


	for (i = 0; orom && i < ARRAY_SIZE(orom->ctrl); i++) {
	for (i = 0; orom && i < ARRAY_SIZE(orom->ctrl); i++) {
		if (scic_oem_parameters_validate(&orom->ctrl[i])) {
		if (sci_oem_parameters_validate(&orom->ctrl[i])) {
			dev_warn(&pdev->dev,
			dev_warn(&pdev->dev,
				 "[%d]: invalid oem parameters detected, falling back to firmware\n", i);
				 "[%d]: invalid oem parameters detected, falling back to firmware\n", i);
			devm_kfree(&pdev->dev, orom);
			devm_kfree(&pdev->dev, orom);
@@ -554,7 +554,7 @@ static void __devexit isci_pci_remove(struct pci_dev *pdev)
	for_each_isci_host(i, ihost, pdev) {
	for_each_isci_host(i, ihost, pdev) {
		isci_unregister(ihost);
		isci_unregister(ihost);
		isci_host_deinit(ihost);
		isci_host_deinit(ihost);
		scic_controller_disable_interrupts(ihost);
		sci_controller_disable_interrupts(ihost);
	}
	}
}
}


+3 −3
Original line number Original line Diff line number Diff line
@@ -304,7 +304,7 @@ enum sci_status {
	 * This member indicates that the operation failed, the failure is
	 * This member indicates that the operation failed, the failure is
	 * controller implementation specific, and the response data associated
	 * controller implementation specific, and the response data associated
	 * with the request is not valid.  You can query for the controller
	 * with the request is not valid.  You can query for the controller
	 * specific error information via scic_controller_get_request_status()
	 * specific error information via sci_controller_get_request_status()
	 */
	 */
	SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR,
	SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR,


@@ -395,7 +395,7 @@ enum sci_status {
	/**
	/**
	 * This value indicates that an unsupported PCI device ID has been
	 * This value indicates that an unsupported PCI device ID has been
	 * specified.  This indicates that attempts to invoke
	 * specified.  This indicates that attempts to invoke
	 * scic_library_allocate_controller() will fail.
	 * sci_library_allocate_controller() will fail.
	 */
	 */
	SCI_FAILURE_UNSUPPORTED_PCI_DEVICE_ID
	SCI_FAILURE_UNSUPPORTED_PCI_DEVICE_ID


@@ -493,7 +493,7 @@ irqreturn_t isci_error_isr(int vec, void *data);
/*
/*
 * Each timer is associated with a cancellation flag that is set when
 * Each timer is associated with a cancellation flag that is set when
 * del_timer() is called and checked in the timer callback function. This
 * del_timer() is called and checked in the timer callback function. This
 * is needed since del_timer_sync() cannot be called with scic_lock held.
 * is needed since del_timer_sync() cannot be called with sci_lock held.
 * For deinit however, del_timer_sync() is used without holding the lock.
 * For deinit however, del_timer_sync() is used without holding the lock.
 */
 */
struct sci_timer {
struct sci_timer {
+151 −234

File changed.

Preview size limit exceeded, changes collapsed.

Loading