aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-04-14 21:27:49 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:00:37 -0400
commit26bace349ecd08b1d744f7067d24fd1bedb91020 (patch)
treea9e23ef514de4b3c42e5fc571f2871670e3652f5 /drivers
parentd857d9a0adf49e332413d918322405192aafc766 (diff)
isci: replace sci_sas_link_rate with sas_linkrate
Drop duplicated enum definition. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/core/intel_sas.h14
-rw-r--r--drivers/scsi/isci/core/scic_phy.h3
-rw-r--r--drivers/scsi/isci/core/scic_remote_device.h2
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.c16
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.h3
-rw-r--r--drivers/scsi/isci/core/scic_sds_port.c10
-rw-r--r--drivers/scsi/isci/core/scic_sds_port.h2
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_device.c2
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_device.h3
9 files changed, 22 insertions, 33 deletions
diff --git a/drivers/scsi/isci/core/intel_sas.h b/drivers/scsi/isci/core/intel_sas.h
index eb9686ea35f1..d9c9f33a7af5 100644
--- a/drivers/scsi/isci/core/intel_sas.h
+++ b/drivers/scsi/isci/core/intel_sas.h
@@ -180,20 +180,6 @@ struct sas_capabilities {
180}; 180};
181 181
182/** 182/**
183 * enum _SCI_SAS_LINK_RATE - This enumeration depicts the SAS specification
184 * defined link speeds.
185 *
186 *
187 */
188enum sci_sas_link_rate {
189 SCI_SAS_NO_LINK_RATE = 0,
190 SCI_SATA_SPINUP_HOLD = 0x3,
191 SCI_SAS_150_GB = 0x8,
192 SCI_SAS_300_GB = 0x9,
193 SCI_SAS_600_GB = 0xA
194};
195
196/**
197 * enum _SCI_SAS_TASK_ATTRIBUTE - This enumeration depicts the SAM/SAS 183 * enum _SCI_SAS_TASK_ATTRIBUTE - This enumeration depicts the SAM/SAS
198 * specification defined task attribute values for a command information 184 * specification defined task attribute values for a command information
199 * unit. 185 * unit.
diff --git a/drivers/scsi/isci/core/scic_phy.h b/drivers/scsi/isci/core/scic_phy.h
index bf0d3be58eda..784c5b5c105b 100644
--- a/drivers/scsi/isci/core/scic_phy.h
+++ b/drivers/scsi/isci/core/scic_phy.h
@@ -68,6 +68,7 @@
68 68
69#include "intel_sata.h" 69#include "intel_sata.h"
70#include "intel_sas.h" 70#include "intel_sas.h"
71#include <scsi/libsas.h>
71 72
72struct scic_sds_phy; 73struct scic_sds_phy;
73struct scic_sds_port; 74struct scic_sds_port;
@@ -93,7 +94,7 @@ struct scic_phy_properties {
93 * This field specifies the link rate at which the phy is 94 * This field specifies the link rate at which the phy is
94 * currently operating. 95 * currently operating.
95 */ 96 */
96 enum sci_sas_link_rate negotiated_link_rate; 97 enum sas_linkrate negotiated_link_rate;
97 98
98 /** 99 /**
99 * This field indicates the protocols supported by the phy. 100 * This field indicates the protocols supported by the phy.
diff --git a/drivers/scsi/isci/core/scic_remote_device.h b/drivers/scsi/isci/core/scic_remote_device.h
index 1401844349e6..62fa7fd572c1 100644
--- a/drivers/scsi/isci/core/scic_remote_device.h
+++ b/drivers/scsi/isci/core/scic_remote_device.h
@@ -254,7 +254,7 @@ enum sci_status scic_remote_device_reset_complete(
254 * 254 *
255 * Return the link rate at which we transfer for the supplied remote device. 255 * Return the link rate at which we transfer for the supplied remote device.
256 */ 256 */
257enum sci_sas_link_rate scic_remote_device_get_connection_rate( 257enum sas_linkrate scic_remote_device_get_connection_rate(
258 struct scic_sds_remote_device *remote_device); 258 struct scic_sds_remote_device *remote_device);
259 259
260/** 260/**
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c
index d5bbc220ab84..40176f0729c1 100644
--- a/drivers/scsi/isci/core/scic_sds_phy.c
+++ b/drivers/scsi/isci/core/scic_sds_phy.c
@@ -696,7 +696,7 @@ static void scic_sds_phy_start_sata_link_training(
696 */ 696 */
697static void scic_sds_phy_complete_link_training( 697static void scic_sds_phy_complete_link_training(
698 struct scic_sds_phy *sci_phy, 698 struct scic_sds_phy *sci_phy,
699 enum sci_sas_link_rate max_link_rate, 699 enum sas_linkrate max_link_rate,
700 u32 next_state) 700 u32 next_state)
701{ 701{
702 sci_phy->max_negotiated_speed = max_link_rate; 702 sci_phy->max_negotiated_speed = max_link_rate;
@@ -808,21 +808,21 @@ static enum sci_status scic_sds_phy_starting_substate_await_sas_phy_speed_event_
808 case SCU_EVENT_SAS_15: 808 case SCU_EVENT_SAS_15:
809 case SCU_EVENT_SAS_15_SSC: 809 case SCU_EVENT_SAS_15_SSC:
810 scic_sds_phy_complete_link_training( 810 scic_sds_phy_complete_link_training(
811 this_phy, SCI_SAS_150_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF 811 this_phy, SAS_LINK_RATE_1_5_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
812 ); 812 );
813 break; 813 break;
814 814
815 case SCU_EVENT_SAS_30: 815 case SCU_EVENT_SAS_30:
816 case SCU_EVENT_SAS_30_SSC: 816 case SCU_EVENT_SAS_30_SSC:
817 scic_sds_phy_complete_link_training( 817 scic_sds_phy_complete_link_training(
818 this_phy, SCI_SAS_300_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF 818 this_phy, SAS_LINK_RATE_3_0_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
819 ); 819 );
820 break; 820 break;
821 821
822 case SCU_EVENT_SAS_60: 822 case SCU_EVENT_SAS_60:
823 case SCU_EVENT_SAS_60_SSC: 823 case SCU_EVENT_SAS_60_SSC:
824 scic_sds_phy_complete_link_training( 824 scic_sds_phy_complete_link_training(
825 this_phy, SCI_SAS_600_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF 825 this_phy, SAS_LINK_RATE_6_0_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
826 ); 826 );
827 break; 827 break;
828 828
@@ -1082,7 +1082,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
1082 case SCU_EVENT_SATA_15_SSC: 1082 case SCU_EVENT_SATA_15_SSC:
1083 scic_sds_phy_complete_link_training( 1083 scic_sds_phy_complete_link_training(
1084 this_phy, 1084 this_phy,
1085 SCI_SAS_150_GB, 1085 SAS_LINK_RATE_1_5_GBPS,
1086 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF 1086 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
1087 ); 1087 );
1088 break; 1088 break;
@@ -1091,7 +1091,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
1091 case SCU_EVENT_SATA_30_SSC: 1091 case SCU_EVENT_SATA_30_SSC:
1092 scic_sds_phy_complete_link_training( 1092 scic_sds_phy_complete_link_training(
1093 this_phy, 1093 this_phy,
1094 SCI_SAS_300_GB, 1094 SAS_LINK_RATE_3_0_GBPS,
1095 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF 1095 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
1096 ); 1096 );
1097 break; 1097 break;
@@ -1100,7 +1100,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
1100 case SCU_EVENT_SATA_60_SSC: 1100 case SCU_EVENT_SATA_60_SSC:
1101 scic_sds_phy_complete_link_training( 1101 scic_sds_phy_complete_link_training(
1102 this_phy, 1102 this_phy,
1103 SCI_SAS_600_GB, 1103 SAS_LINK_RATE_6_0_GBPS,
1104 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF 1104 SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
1105 ); 1105 );
1106 break; 1106 break;
@@ -2439,7 +2439,7 @@ void scic_sds_phy_construct(struct scic_sds_phy *sci_phy,
2439 sci_phy->bcn_received_while_port_unassigned = false; 2439 sci_phy->bcn_received_while_port_unassigned = false;
2440 sci_phy->protocol = SCIC_SDS_PHY_PROTOCOL_UNKNOWN; 2440 sci_phy->protocol = SCIC_SDS_PHY_PROTOCOL_UNKNOWN;
2441 sci_phy->link_layer_registers = NULL; 2441 sci_phy->link_layer_registers = NULL;
2442 sci_phy->max_negotiated_speed = SCI_SAS_NO_LINK_RATE; 2442 sci_phy->max_negotiated_speed = SAS_LINK_RATE_UNKNOWN;
2443 sci_phy->sata_timeout_timer = NULL; 2443 sci_phy->sata_timeout_timer = NULL;
2444 2444
2445 /* Clear out the identification buffer data */ 2445 /* Clear out the identification buffer data */
diff --git a/drivers/scsi/isci/core/scic_sds_phy.h b/drivers/scsi/isci/core/scic_sds_phy.h
index 97c0476570ba..fb99d472ce60 100644
--- a/drivers/scsi/isci/core/scic_sds_phy.h
+++ b/drivers/scsi/isci/core/scic_sds_phy.h
@@ -60,6 +60,7 @@
60#include "intel_sas.h" 60#include "intel_sas.h"
61#include "scu_registers.h" 61#include "scu_registers.h"
62#include "sci_base_state_machine.h" 62#include "sci_base_state_machine.h"
63#include <scsi/libsas.h>
63 64
64struct scic_sds_port; 65struct scic_sds_port;
65/** 66/**
@@ -243,7 +244,7 @@ struct scic_sds_phy {
243 * This field indicates whether the phy supports 1.5 Gb/s, 3.0 Gb/s, 244 * This field indicates whether the phy supports 1.5 Gb/s, 3.0 Gb/s,
244 * or 6.0 Gb/s operation. 245 * or 6.0 Gb/s operation.
245 */ 246 */
246 enum sci_sas_link_rate max_negotiated_speed; 247 enum sas_linkrate max_negotiated_speed;
247 248
248 /** 249 /**
249 * This member specifies the protocol being utilized on this phy. This 250 * This member specifies the protocol being utilized on this phy. This
diff --git a/drivers/scsi/isci/core/scic_sds_port.c b/drivers/scsi/isci/core/scic_sds_port.c
index ebbde7b3489f..40c1297849f3 100644
--- a/drivers/scsi/isci/core/scic_sds_port.c
+++ b/drivers/scsi/isci/core/scic_sds_port.c
@@ -684,7 +684,7 @@ void scic_sds_port_deactivate_phy(struct scic_sds_port *sci_port,
684 684
685 sci_port->active_phy_mask &= ~(1 << sci_phy->phy_index); 685 sci_port->active_phy_mask &= ~(1 << sci_phy->phy_index);
686 686
687 sci_phy->max_negotiated_speed = SCI_SAS_NO_LINK_RATE; 687 sci_phy->max_negotiated_speed = SAS_LINK_RATE_UNKNOWN;
688 688
689 /* Re-assign the phy back to the LP as if it were a narrow port */ 689 /* Re-assign the phy back to the LP as if it were a narrow port */
690 writel(sci_phy->phy_index, 690 writel(sci_phy->phy_index,
@@ -977,12 +977,12 @@ static void scic_sds_port_update_viit_entry(struct scic_sds_port *this_port)
977 * This method returns the maximum negotiated speed of the slowest phy in the 977 * This method returns the maximum negotiated speed of the slowest phy in the
978 * port. 978 * port.
979 */ 979 */
980enum sci_sas_link_rate scic_sds_port_get_max_allowed_speed( 980enum sas_linkrate scic_sds_port_get_max_allowed_speed(
981 struct scic_sds_port *this_port) 981 struct scic_sds_port *this_port)
982{ 982{
983 u16 index = 0; 983 u16 index;
984 enum sci_sas_link_rate max_allowed_speed = SCI_SAS_600_GB; 984 enum sas_linkrate max_allowed_speed = SAS_LINK_RATE_6_0_GBPS;
985 struct scic_sds_phy *phy = NULL; 985 struct scic_sds_phy *phy = NULL;
986 986
987 /* 987 /*
988 * Loop through all of the phys in this port and find the phy with the 988 * Loop through all of the phys in this port and find the phy with the
diff --git a/drivers/scsi/isci/core/scic_sds_port.h b/drivers/scsi/isci/core/scic_sds_port.h
index d79c5745e49a..a17c64a7cbf2 100644
--- a/drivers/scsi/isci/core/scic_sds_port.h
+++ b/drivers/scsi/isci/core/scic_sds_port.h
@@ -428,7 +428,7 @@ enum sci_status scic_sds_port_complete_io(
428 struct scic_sds_remote_device *the_device, 428 struct scic_sds_remote_device *the_device,
429 struct scic_sds_request *the_io_request); 429 struct scic_sds_request *the_io_request);
430 430
431enum sci_sas_link_rate scic_sds_port_get_max_allowed_speed( 431enum sas_linkrate scic_sds_port_get_max_allowed_speed(
432 struct scic_sds_port *this_port); 432 struct scic_sds_port *this_port);
433 433
434void scic_sds_port_broadcast_change_received( 434void scic_sds_port_broadcast_change_received(
diff --git a/drivers/scsi/isci/core/scic_sds_remote_device.c b/drivers/scsi/isci/core/scic_sds_remote_device.c
index d756216872b5..0976faeb4064 100644
--- a/drivers/scsi/isci/core/scic_sds_remote_device.c
+++ b/drivers/scsi/isci/core/scic_sds_remote_device.c
@@ -256,7 +256,7 @@ enum sci_status scic_remote_device_reset_complete(
256} 256}
257 257
258 258
259enum sci_sas_link_rate scic_remote_device_get_connection_rate( 259enum sas_linkrate scic_remote_device_get_connection_rate(
260 struct scic_sds_remote_device *sci_dev) 260 struct scic_sds_remote_device *sci_dev)
261{ 261{
262 return sci_dev->connection_rate; 262 return sci_dev->connection_rate;
diff --git a/drivers/scsi/isci/core/scic_sds_remote_device.h b/drivers/scsi/isci/core/scic_sds_remote_device.h
index 0e8bb0f98b1e..ebb0ac8ef3a6 100644
--- a/drivers/scsi/isci/core/scic_sds_remote_device.h
+++ b/drivers/scsi/isci/core/scic_sds_remote_device.h
@@ -59,6 +59,7 @@
59#include "intel_sas.h" 59#include "intel_sas.h"
60#include "scu_remote_node_context.h" 60#include "scu_remote_node_context.h"
61#include "scic_sds_remote_node_context.h" 61#include "scic_sds_remote_node_context.h"
62#include <scsi/libsas.h>
62 63
63/** 64/**
64 * enum scic_sds_remote_device_states - This enumeration depicts all the states 65 * enum scic_sds_remote_device_states - This enumeration depicts all the states
@@ -260,7 +261,7 @@ struct scic_sds_remote_device {
260 * This field is the programmed connection rate for this remote device. It is 261 * This field is the programmed connection rate for this remote device. It is
261 * used to program the TC with the maximum allowed connection rate. 262 * used to program the TC with the maximum allowed connection rate.
262 */ 263 */
263 enum sci_sas_link_rate connection_rate; 264 enum sas_linkrate connection_rate;
264 265
265 /** 266 /**
266 * This field contains the allowed target protocols for this remote device. 267 * This field contains the allowed target protocols for this remote device.