[SCSI] mpt2sas: Removed wrapper funtions _scsih_link_change.
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 20 Aug 2009 07:52:39 +0000 (13:22 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 5 Sep 2009 14:35:07 +0000 (09:35 -0500)
Deleted the wrapper function called _scsih_link_change. This function was
implemented for compatibility reasons only, between different kernel versions.
Currently this function is no longer needed.  The calling function are
converted to calling mpt2sas_transport_update_phy_link_change directly in the
transport layer.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_base.h
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/mpt2sas/mpt2sas_transport.c

index 15827582a90e1bd9144f7cf5e27749a6508b66a1..39dc69627bc7bc5167466690f6862b04c6709b86 100644 (file)
@@ -798,7 +798,7 @@ int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
     *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev);
 int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
     *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev);
-void mpt2sas_transport_update_phy_link_change(struct MPT2SAS_ADAPTER *ioc, u16 handle,
+void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, u16 handle,
    u16 attached_handle, u8 phy_number, u8 link_rate);
 extern struct sas_function_template mpt2sas_transport_functions;
 extern struct scsi_transport_template *mpt2sas_transport_template;
index 195f5e5aabf1b0131e40c09f37bd026fe1ab1edc..c0d5d5e1f9c8c869e8e29b74dad0c1fdfe2b29d4 100644 (file)
@@ -3123,25 +3123,6 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply)
        scmd->scsi_done(scmd);
 }
 
-/**
- * _scsih_link_change - process phy link changes
- * @ioc: per adapter object
- * @handle: phy handle
- * @attached_handle: valid for devices attached to link
- * @phy_number: phy number
- * @link_rate: new link rate
- * Context: user.
- *
- * Return nothing.
- */
-static void
-_scsih_link_change(struct MPT2SAS_ADAPTER *ioc, u16 handle, u16 attached_handle,
-   u8 phy_number, u8 link_rate)
-{
-       mpt2sas_transport_update_phy_link_change(ioc, handle, attached_handle,
-           phy_number, link_rate);
-}
-
 /**
  * _scsih_sas_host_refresh - refreshing sas host object contents
  * @ioc: per adapter object
@@ -3186,7 +3167,8 @@ _scsih_sas_host_refresh(struct MPT2SAS_ADAPTER *ioc, u8 update)
                            le16_to_cpu(sas_iounit_pg0->PhyData[i].
                                ControllerDevHandle);
                        if (update)
-                               _scsih_link_change(ioc,
+                               mpt2sas_transport_update_links(
+                                   ioc,
                                    ioc->sas_hba.phy[i].handle,
                                    le16_to_cpu(sas_iounit_pg0->PhyData[i].
                                    AttachedDevHandle), i,
@@ -3868,9 +3850,10 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
                case MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED:
                        if (!parent_handle) {
                                if (phy_number < ioc->sas_hba.num_phys)
-                                       _scsih_link_change(ioc,
-                                          ioc->sas_hba.phy[phy_number].handle,
-                                          handle, phy_number, link_rate_);
+                                       mpt2sas_transport_update_links(
+                                       ioc,
+                                       ioc->sas_hba.phy[phy_number].handle,
+                                       handle, phy_number, link_rate_);
                        } else {
                                spin_lock_irqsave(&ioc->sas_node_lock, flags);
                                sas_expander =
@@ -3880,11 +3863,12 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
                                    flags);
                                if (sas_expander) {
                                        if (phy_number < sas_expander->num_phys)
-                                               _scsih_link_change(ioc,
-                                                  sas_expander->
-                                                  phy[phy_number].handle,
-                                                  handle, phy_number,
-                                                  link_rate_);
+                                               mpt2sas_transport_update_links(
+                                               ioc,
+                                               sas_expander->
+                                               phy[phy_number].handle,
+                                               handle, phy_number,
+                                               link_rate_);
                                }
                        }
                        if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) {
@@ -4400,7 +4384,7 @@ _scsih_sas_pd_add(struct MPT2SAS_ADAPTER *ioc,
                return;
        }
 
-       _scsih_link_change(ioc,
+       mpt2sas_transport_update_links(ioc,
            le16_to_cpu(sas_device_pg0.ParentDevHandle),
            handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
 
@@ -4689,7 +4673,7 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
                        return;
                }
 
-               _scsih_link_change(ioc,
+               mpt2sas_transport_update_links(ioc,
                    le16_to_cpu(sas_device_pg0.ParentDevHandle),
                    handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
 
index a53086d0381a4fd00771da4cedd2a5ec3c4f1ebf..742324a0a11eecda3ac5f1530b81bf0a1492a147 100644 (file)
@@ -792,7 +792,7 @@ mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
 }
 
 /**
- * mpt2sas_transport_update_phy_link_change - refreshing phy link changes and attached devices
+ * mpt2sas_transport_update_links - refreshing phy link changes
  * @ioc: per adapter object
  * @handle: handle to sas_host or expander
  * @attached_handle: attached device handle
@@ -802,7 +802,7 @@ mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
  * Returns nothing.
  */
 void
-mpt2sas_transport_update_phy_link_change(struct MPT2SAS_ADAPTER *ioc,
+mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
     u16 handle, u16 attached_handle, u8 phy_number, u8 link_rate)
 {
        unsigned long flags;