Commit a3d568f0 authored by Dan Williams's avatar Dan Williams

isci: remove usage of sci_sas_address in scic_sds_remote_device

The sas address can be retrieved from the domain device and then
converted to the always little-endian format in the remote node context.
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 00d680ef
...@@ -1501,8 +1501,6 @@ static enum sci_status scic_remote_device_da_construct(struct scic_sds_port *sci ...@@ -1501,8 +1501,6 @@ static enum sci_status scic_remote_device_da_construct(struct scic_sds_port *sci
sci_dev->rnc.remote_node_index = remote_node_index; sci_dev->rnc.remote_node_index = remote_node_index;
scic_sds_port_get_attached_sas_address(sci_port, &sci_dev->device_address);
if (dev->dev_type == SAS_END_DEV) if (dev->dev_type == SAS_END_DEV)
sci_dev->has_ready_substate_machine = false; sci_dev->has_ready_substate_machine = false;
else if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) { else if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) {
...@@ -1553,7 +1551,6 @@ static enum sci_status scic_remote_device_ea_construct(struct scic_sds_port *sci ...@@ -1553,7 +1551,6 @@ static enum sci_status scic_remote_device_ea_construct(struct scic_sds_port *sci
enum sci_status status; enum sci_status status;
scic_remote_device_construct(sci_port, sci_dev); scic_remote_device_construct(sci_port, sci_dev);
memcpy(&sci_dev->device_address, dev->sas_addr, SAS_ADDR_SIZE);
status = scic_sds_controller_allocate_remote_node_context( status = scic_sds_controller_allocate_remote_node_context(
scic, sci_dev, &sci_dev->rnc.remote_node_index); scic, sci_dev, &sci_dev->rnc.remote_node_index);
......
...@@ -99,11 +99,6 @@ struct scic_sds_remote_device { ...@@ -99,11 +99,6 @@ struct scic_sds_remote_device {
*/ */
enum sas_linkrate connection_rate; enum sas_linkrate connection_rate;
/**
* This field contains the device SAS address.
*/
struct sci_sas_address device_address;
/** /**
* This filed is assinged the value of true if the device is directly * This filed is assinged the value of true if the device is directly
* attached to the port. * attached to the port.
......
...@@ -110,6 +110,7 @@ static void scic_sds_remote_node_context_construct_buffer( ...@@ -110,6 +110,7 @@ static void scic_sds_remote_node_context_construct_buffer(
struct domain_device *dev = sci_dev_to_domain(sci_dev); struct domain_device *dev = sci_dev_to_domain(sci_dev);
union scu_remote_node_context *rnc; union scu_remote_node_context *rnc;
struct scic_sds_controller *scic; struct scic_sds_controller *scic;
__le64 sas_addr;
scic = scic_sds_remote_device_get_controller(sci_dev); scic = scic_sds_remote_device_get_controller(sci_dev);
...@@ -124,9 +125,10 @@ static void scic_sds_remote_node_context_construct_buffer( ...@@ -124,9 +125,10 @@ static void scic_sds_remote_node_context_construct_buffer(
rnc->ssp.logical_port_index = rnc->ssp.logical_port_index =
scic_sds_remote_device_get_port_index(sci_dev); scic_sds_remote_device_get_port_index(sci_dev);
/* address is always big endian, destination is always little */ /* sas address is __be64, context ram format is __le64 */
rnc->ssp.remote_sas_address_hi = swab32(sci_dev->device_address.high); sas_addr = cpu_to_le64(SAS_ADDR(dev->sas_addr));
rnc->ssp.remote_sas_address_lo = swab32(sci_dev->device_address.low); rnc->ssp.remote_sas_address_hi = upper_32_bits(sas_addr);
rnc->ssp.remote_sas_address_lo = lower_32_bits(sas_addr);
rnc->ssp.nexus_loss_timer_enable = true; rnc->ssp.nexus_loss_timer_enable = true;
rnc->ssp.check_bit = false; rnc->ssp.check_bit = false;
......
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