isci: replace sci_sas_link_rate with sas_linkrate
authorDan Williams <dan.j.williams@intel.com>
Fri, 15 Apr 2011 01:27:49 +0000 (18:27 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:00:37 +0000 (04:00 -0700)
Drop duplicated enum definition.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/core/intel_sas.h
drivers/scsi/isci/core/scic_phy.h
drivers/scsi/isci/core/scic_remote_device.h
drivers/scsi/isci/core/scic_sds_phy.c
drivers/scsi/isci/core/scic_sds_phy.h
drivers/scsi/isci/core/scic_sds_port.c
drivers/scsi/isci/core/scic_sds_port.h
drivers/scsi/isci/core/scic_sds_remote_device.c
drivers/scsi/isci/core/scic_sds_remote_device.h

index eb9686ea35f1a221881ccc7efd7765a025f53f06..d9c9f33a7af56bd756e065a3a0e5f7289a3c8772 100644 (file)
@@ -179,20 +179,6 @@ struct sas_capabilities {
 
 };
 
-/**
- * enum _SCI_SAS_LINK_RATE - This enumeration depicts the SAS specification
- *    defined link speeds.
- *
- *
- */
-enum sci_sas_link_rate {
-       SCI_SAS_NO_LINK_RATE = 0,
-       SCI_SATA_SPINUP_HOLD = 0x3,
-       SCI_SAS_150_GB = 0x8,
-       SCI_SAS_300_GB = 0x9,
-       SCI_SAS_600_GB = 0xA
-};
-
 /**
  * enum _SCI_SAS_TASK_ATTRIBUTE - This enumeration depicts the SAM/SAS
  *    specification defined task attribute values for a command information
index bf0d3be58eda610ddd6f381bb487988b8da197a4..784c5b5c105bcdb4f4705e720cdaef2e1bc036b7 100644 (file)
@@ -68,6 +68,7 @@
 
 #include "intel_sata.h"
 #include "intel_sas.h"
+#include <scsi/libsas.h>
 
 struct scic_sds_phy;
 struct scic_sds_port;
@@ -93,7 +94,7 @@ struct scic_phy_properties {
         * This field specifies the link rate at which the phy is
         * currently operating.
         */
-       enum sci_sas_link_rate negotiated_link_rate;
+       enum sas_linkrate negotiated_link_rate;
 
        /**
         * This field indicates the protocols supported by the phy.
index 1401844349e6bb61d57cf205d1b0050150bd7085..62fa7fd572c1cb517c93bcbc6bab59125eaa9476 100644 (file)
@@ -254,7 +254,7 @@ enum sci_status scic_remote_device_reset_complete(
  *
  * Return the link rate at which we transfer for the supplied remote device.
  */
-enum sci_sas_link_rate scic_remote_device_get_connection_rate(
+enum sas_linkrate scic_remote_device_get_connection_rate(
        struct scic_sds_remote_device *remote_device);
 
 /**
index d5bbc220ab84359377eb16f4c21538b9f9afaa17..40176f0729c1f7040cc132e14f9b3d53e21a47b2 100644 (file)
@@ -696,7 +696,7 @@ static void scic_sds_phy_start_sata_link_training(
  */
 static void scic_sds_phy_complete_link_training(
        struct scic_sds_phy *sci_phy,
-       enum sci_sas_link_rate max_link_rate,
+       enum sas_linkrate max_link_rate,
        u32 next_state)
 {
        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_
        case SCU_EVENT_SAS_15:
        case SCU_EVENT_SAS_15_SSC:
                scic_sds_phy_complete_link_training(
-                       this_phy, SCI_SAS_150_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
+                       this_phy, SAS_LINK_RATE_1_5_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
                        );
                break;
 
        case SCU_EVENT_SAS_30:
        case SCU_EVENT_SAS_30_SSC:
                scic_sds_phy_complete_link_training(
-                       this_phy, SCI_SAS_300_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
+                       this_phy, SAS_LINK_RATE_3_0_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
                        );
                break;
 
        case SCU_EVENT_SAS_60:
        case SCU_EVENT_SAS_60_SSC:
                scic_sds_phy_complete_link_training(
-                       this_phy, SCI_SAS_600_GB, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
+                       this_phy, SAS_LINK_RATE_6_0_GBPS, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF
                        );
                break;
 
@@ -1082,7 +1082,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
        case SCU_EVENT_SATA_15_SSC:
                scic_sds_phy_complete_link_training(
                        this_phy,
-                       SCI_SAS_150_GB,
+                       SAS_LINK_RATE_1_5_GBPS,
                        SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
                        );
                break;
@@ -1091,7 +1091,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
        case SCU_EVENT_SATA_30_SSC:
                scic_sds_phy_complete_link_training(
                        this_phy,
-                       SCI_SAS_300_GB,
+                       SAS_LINK_RATE_3_0_GBPS,
                        SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
                        );
                break;
@@ -1100,7 +1100,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sata_speed_event_han
        case SCU_EVENT_SATA_60_SSC:
                scic_sds_phy_complete_link_training(
                        this_phy,
-                       SCI_SAS_600_GB,
+                       SAS_LINK_RATE_6_0_GBPS,
                        SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF
                        );
                break;
@@ -2439,7 +2439,7 @@ void scic_sds_phy_construct(struct scic_sds_phy *sci_phy,
        sci_phy->bcn_received_while_port_unassigned = false;
        sci_phy->protocol = SCIC_SDS_PHY_PROTOCOL_UNKNOWN;
        sci_phy->link_layer_registers = NULL;
-       sci_phy->max_negotiated_speed = SCI_SAS_NO_LINK_RATE;
+       sci_phy->max_negotiated_speed = SAS_LINK_RATE_UNKNOWN;
        sci_phy->sata_timeout_timer = NULL;
 
        /* Clear out the identification buffer data */
index 97c0476570bacab387082762e37c7f7d788af24b..fb99d472ce60f22a5cbb5fcdaf969025b03082bb 100644 (file)
@@ -60,6 +60,7 @@
 #include "intel_sas.h"
 #include "scu_registers.h"
 #include "sci_base_state_machine.h"
+#include <scsi/libsas.h>
 
 struct scic_sds_port;
 /**
@@ -243,7 +244,7 @@ struct scic_sds_phy {
         * This field indicates whether the phy supports 1.5 Gb/s, 3.0 Gb/s,
         * or 6.0 Gb/s operation.
         */
-       enum sci_sas_link_rate max_negotiated_speed;
+       enum sas_linkrate max_negotiated_speed;
 
        /**
         * This member specifies the protocol being utilized on this phy.  This
index ebbde7b3489f70cad72e1dbac60a029a488b2e81..40c1297849f38e75106327916d6bfbfe4eee14a5 100644 (file)
@@ -684,7 +684,7 @@ void scic_sds_port_deactivate_phy(struct scic_sds_port *sci_port,
 
        sci_port->active_phy_mask &= ~(1 << sci_phy->phy_index);
 
-       sci_phy->max_negotiated_speed = SCI_SAS_NO_LINK_RATE;
+       sci_phy->max_negotiated_speed = SAS_LINK_RATE_UNKNOWN;
 
        /* Re-assign the phy back to the LP as if it were a narrow port */
        writel(sci_phy->phy_index,
@@ -977,12 +977,12 @@ static void scic_sds_port_update_viit_entry(struct scic_sds_port *this_port)
  * This method returns the maximum negotiated speed of the slowest phy in the
  * port.
  */
-enum sci_sas_link_rate scic_sds_port_get_max_allowed_speed(
+enum sas_linkrate scic_sds_port_get_max_allowed_speed(
        struct scic_sds_port *this_port)
 {
-       u16 index             = 0;
-       enum sci_sas_link_rate max_allowed_speed = SCI_SAS_600_GB;
-       struct scic_sds_phy *phy               = NULL;
+       u16 index;
+       enum sas_linkrate max_allowed_speed = SAS_LINK_RATE_6_0_GBPS;
+       struct scic_sds_phy *phy = NULL;
 
        /*
         * Loop through all of the phys in this port and find the phy with the
index d79c5745e49aae2f42b79eacfa6a09d3a0599d3a..a17c64a7cbf26e63e72898d765fd06e309fe8aae 100644 (file)
@@ -428,7 +428,7 @@ enum sci_status scic_sds_port_complete_io(
        struct scic_sds_remote_device *the_device,
        struct scic_sds_request *the_io_request);
 
-enum sci_sas_link_rate scic_sds_port_get_max_allowed_speed(
+enum sas_linkrate scic_sds_port_get_max_allowed_speed(
        struct scic_sds_port *this_port);
 
 void scic_sds_port_broadcast_change_received(
index d756216872b53226626c141a4ebb2279c9233a54..0976faeb4064c2df052b1fcf4444a9dca60b205e 100644 (file)
@@ -256,7 +256,7 @@ enum sci_status scic_remote_device_reset_complete(
 }
 
 
-enum sci_sas_link_rate scic_remote_device_get_connection_rate(
+enum sas_linkrate scic_remote_device_get_connection_rate(
        struct scic_sds_remote_device *sci_dev)
 {
        return sci_dev->connection_rate;
index 0e8bb0f98b1e9532de53b506717752f3764b9103..ebb0ac8ef3a6cd2e447f49edb7063991c08f8f42 100644 (file)
@@ -59,6 +59,7 @@
 #include "intel_sas.h"
 #include "scu_remote_node_context.h"
 #include "scic_sds_remote_node_context.h"
+#include <scsi/libsas.h>
 
 /**
  * enum scic_sds_remote_device_states - This enumeration depicts all the states
@@ -260,7 +261,7 @@ struct scic_sds_remote_device {
         * 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 sci_sas_link_rate connection_rate;
+       enum sas_linkrate connection_rate;
 
        /**
         * This field contains the allowed target protocols for this remote device.