aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-08-20 03:52:39 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 10:35:07 -0400
commitcc0f5207664f85da8d0b2ebdacec5daaee0ce95f (patch)
tree226eefb4c32e7bae31ae7fb7a4a43d2a0c74acad /drivers/scsi
parent155dd4c763694222c125e65438d823f58ea653bc (diff)
[SCSI] mpt2sas: Removed wrapper funtions _scsih_link_change.
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h2
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c44
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_transport.c4
3 files changed, 17 insertions, 33 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 15827582a90e..39dc69627bc7 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -798,7 +798,7 @@ int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
798 *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev); 798 *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev);
799int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy 799int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
800 *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev); 800 *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev);
801void mpt2sas_transport_update_phy_link_change(struct MPT2SAS_ADAPTER *ioc, u16 handle, 801void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, u16 handle,
802 u16 attached_handle, u8 phy_number, u8 link_rate); 802 u16 attached_handle, u8 phy_number, u8 link_rate);
803extern struct sas_function_template mpt2sas_transport_functions; 803extern struct sas_function_template mpt2sas_transport_functions;
804extern struct scsi_transport_template *mpt2sas_transport_template; 804extern struct scsi_transport_template *mpt2sas_transport_template;
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 195f5e5aabf1..c0d5d5e1f9c8 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -3124,25 +3124,6 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply)
3124} 3124}
3125 3125
3126/** 3126/**
3127 * _scsih_link_change - process phy link changes
3128 * @ioc: per adapter object
3129 * @handle: phy handle
3130 * @attached_handle: valid for devices attached to link
3131 * @phy_number: phy number
3132 * @link_rate: new link rate
3133 * Context: user.
3134 *
3135 * Return nothing.
3136 */
3137static void
3138_scsih_link_change(struct MPT2SAS_ADAPTER *ioc, u16 handle, u16 attached_handle,
3139 u8 phy_number, u8 link_rate)
3140{
3141 mpt2sas_transport_update_phy_link_change(ioc, handle, attached_handle,
3142 phy_number, link_rate);
3143}
3144
3145/**
3146 * _scsih_sas_host_refresh - refreshing sas host object contents 3127 * _scsih_sas_host_refresh - refreshing sas host object contents
3147 * @ioc: per adapter object 3128 * @ioc: per adapter object
3148 * @update: update link information 3129 * @update: update link information
@@ -3186,7 +3167,8 @@ _scsih_sas_host_refresh(struct MPT2SAS_ADAPTER *ioc, u8 update)
3186 le16_to_cpu(sas_iounit_pg0->PhyData[i]. 3167 le16_to_cpu(sas_iounit_pg0->PhyData[i].
3187 ControllerDevHandle); 3168 ControllerDevHandle);
3188 if (update) 3169 if (update)
3189 _scsih_link_change(ioc, 3170 mpt2sas_transport_update_links(
3171 ioc,
3190 ioc->sas_hba.phy[i].handle, 3172 ioc->sas_hba.phy[i].handle,
3191 le16_to_cpu(sas_iounit_pg0->PhyData[i]. 3173 le16_to_cpu(sas_iounit_pg0->PhyData[i].
3192 AttachedDevHandle), i, 3174 AttachedDevHandle), i,
@@ -3868,9 +3850,10 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
3868 case MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED: 3850 case MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED:
3869 if (!parent_handle) { 3851 if (!parent_handle) {
3870 if (phy_number < ioc->sas_hba.num_phys) 3852 if (phy_number < ioc->sas_hba.num_phys)
3871 _scsih_link_change(ioc, 3853 mpt2sas_transport_update_links(
3872 ioc->sas_hba.phy[phy_number].handle, 3854 ioc,
3873 handle, phy_number, link_rate_); 3855 ioc->sas_hba.phy[phy_number].handle,
3856 handle, phy_number, link_rate_);
3874 } else { 3857 } else {
3875 spin_lock_irqsave(&ioc->sas_node_lock, flags); 3858 spin_lock_irqsave(&ioc->sas_node_lock, flags);
3876 sas_expander = 3859 sas_expander =
@@ -3880,11 +3863,12 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
3880 flags); 3863 flags);
3881 if (sas_expander) { 3864 if (sas_expander) {
3882 if (phy_number < sas_expander->num_phys) 3865 if (phy_number < sas_expander->num_phys)
3883 _scsih_link_change(ioc, 3866 mpt2sas_transport_update_links(
3884 sas_expander-> 3867 ioc,
3885 phy[phy_number].handle, 3868 sas_expander->
3886 handle, phy_number, 3869 phy[phy_number].handle,
3887 link_rate_); 3870 handle, phy_number,
3871 link_rate_);
3888 } 3872 }
3889 } 3873 }
3890 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) { 3874 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) {
@@ -4400,7 +4384,7 @@ _scsih_sas_pd_add(struct MPT2SAS_ADAPTER *ioc,
4400 return; 4384 return;
4401 } 4385 }
4402 4386
4403 _scsih_link_change(ioc, 4387 mpt2sas_transport_update_links(ioc,
4404 le16_to_cpu(sas_device_pg0.ParentDevHandle), 4388 le16_to_cpu(sas_device_pg0.ParentDevHandle),
4405 handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5); 4389 handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
4406 4390
@@ -4689,7 +4673,7 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
4689 return; 4673 return;
4690 } 4674 }
4691 4675
4692 _scsih_link_change(ioc, 4676 mpt2sas_transport_update_links(ioc,
4693 le16_to_cpu(sas_device_pg0.ParentDevHandle), 4677 le16_to_cpu(sas_device_pg0.ParentDevHandle),
4694 handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5); 4678 handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
4695 4679
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c
index a53086d0381a..742324a0a11e 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_transport.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c
@@ -792,7 +792,7 @@ mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
792} 792}
793 793
794/** 794/**
795 * mpt2sas_transport_update_phy_link_change - refreshing phy link changes and attached devices 795 * mpt2sas_transport_update_links - refreshing phy link changes
796 * @ioc: per adapter object 796 * @ioc: per adapter object
797 * @handle: handle to sas_host or expander 797 * @handle: handle to sas_host or expander
798 * @attached_handle: attached device handle 798 * @attached_handle: attached device handle
@@ -802,7 +802,7 @@ mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
802 * Returns nothing. 802 * Returns nothing.
803 */ 803 */
804void 804void
805mpt2sas_transport_update_phy_link_change(struct MPT2SAS_ADAPTER *ioc, 805mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
806 u16 handle, u16 attached_handle, u8 phy_number, u8 link_rate) 806 u16 handle, u16 attached_handle, u8 phy_number, u8 link_rate)
807{ 807{
808 unsigned long flags; 808 unsigned long flags;